3 ms·
The right way to execute the query depends on the data in the database, and parameters in your query. I think overall a lot of database time and development tim
by ako 6y ago
The right way to execute the query depends on the data in the database, and parameters in your query. I think overall a lot of database time and development time has been saved by depending on query planners.
- CaptainZapp 6y agoDon't forget index statistics, which can turn any query into a full fledged catastrophy if they're not up to date. In my experience it's extremely rare for an optimizer to go awry on a well maintained database. And for the rare case where your data - and access patterns are so weird that it does happen you can always employ hints. Which is a bit nasty, granted. But it's not that you would use them excessively on a well designed and maintained database. It's probably obvious that I very much agree with your take.
- ethbr0 6y agoHints are required in an efficient, general purpose system. Either you can have everything fully-specified at all times (a waste of time an effort, as parent noted), or you can limit general application (no overriding defaults), or you can allow a method for overriding defaults (when necessary). Of those, it seems shortsighted for people to complain about the last, given it's strongly arguably the best of the three options.
- sharadov 6y agoAbsolutely agree.