Sometimes I want to compare the performance of two queries by running them multiple times while an extended events session is capturing the metrics. To avoid too much filtering and/or noise I would like to filter my extended events based on the query hashes.
In order to do that I need the query hash. So far I have had to look them up in the DMOs based on the text. But then I spend as much time finding the query hashes as I do just filtering the extended event session in other ways.
So is there an easier/quicker way to retrieve/get the query hash?