How can I compare two queries X and Y and say that X is better than Y, when they both take almost the same time in small cases scenarios?
The problem is that I have two
Have you examined the query plans? If the queries are returning the same data and are taking the same amount of time to execute, my guess is that the query plans will be nearly identical meaning that there is no meaningful difference between the two queries.
Also, have you taken into account that queries perform differently as the database size changes?
I'm wondering if you are prematurely optimizing the code. In my mind, if I have a query that works and is understandable, I can address performance issues through indexes. And that is usually easier than changing the queries to improve performance.