Fix for Bug 456311 - Add log for DB preparation time and effective query
text.

Signed-off-by: xinzhao-acutate <xzhao@actuate.com>