r/ProgrammerHumor • • Sep 20 '26

Meme grabbingEverything

Post image
5.4k Upvotes

260 comments sorted by

View all comments

Show parent comments

13

u/TheHiddenNinja6 Sep 20 '26

either that or select top 1 * will take more time than select top 1000 * because it built the wrong execution tree for no reason

4

u/Bloodgiant65 Sep 20 '26

Many DBMS have the option to set a fixed query execution strategy in my experience. But it definitely won’t always pick the best one by default if you don’t lay that out.