Initial work of query profiler