add extra logging to the db function, have timings show up first