Improved profiling of queries by adding sub-times