Merge "Improve the slow query instrumentation." into ics-mr0