QueryProfilerFactory to use Query::getHash