Fix bug 1072407 - Add db query timings with custom parameters