database: Log how long it took to retrieve an AS