How to know and set the thread of a query calculation?

I want to compare the calculate time of different thread