4 ms·
It is forcing the engine to do more work though, because it demands a distinct result set, so it adds extra nodes to the plan to remove duplicates. If you know
by Tostino 6y ago
It is forcing the engine to do more work though, because it demands a distinct result set, so it adds extra nodes to the plan to remove duplicates. If you know your query doesn't have duplicates, it's much smarter to not add an extra whole sort/distinct when totally unnecessary for correct results.
- adrianN 6y agoI'm fairly sure that a bakery doesn't produce the amounts of data where you need to worry about such things.
- Tostino 6y agoEh, it's all relative. You can make some queries perform pretty terrible even with tiny data. It's something that has had measurable performance impacts on queries I've had to tune and deal with with over the years.
- FroshKiller 6y agoI don't know, when a baker needs a dozen of something, they tend to bake 13. Maybe things get out of hand.