added aggregation queries to better analyze profiling information for slow queries