Gather timing statistics for sql