News for hackers. Stuff that matters.
Re:The Revival of Great SQL Ideas by mrighele on Saturday December 15, 2018 @01:05PM (#18689521)
What database are you using? Oracle [1] and MySQL [2] for example let you embed hints in the query in order to change the execution plan. I think that PostreSQL doesn't have such a feature though (at least it did not a few years ago).

[1] https://docs.oracle.com/cd/B19306_01/server.102/b14211/hints...

[2] https://dev.mysql.com/doc/refman/8.0/en/optimizer-hints.html

Re:The Revival of Great SQL Ideas by iracic on Saturday December 15, 2018 @03:47PM (#18690264)
You can also record and save plan you are happy with. So, no need to fix hints in code. It is more flexible and may be practical when you upgrade version or environment changes.
Re:The Revival of Great SQL Ideas by lixtra on Saturday December 15, 2018 @04:23PM (#18690410)
Can you do that in MySQL? For Oracle you AFIAK need special permission to save a plan. In larger corporations this means you have call the db admin which makes total sense for OLTP (and is a good feature of SQL dbs). If you’re exploring something in OLAP this is not so great.