April 2018
Intermediate to advanced
508 pages
15h 22m
English
Only if you can't get the statistics or cost data to work as expected should you then take drastic measures such as disabling optimizer features. But bear in mind that flags such as enable_hashjoin and enable_seqscan can be valuable for another reason altogether. Sometimes, bad optimizer behavior can result from a database bug or limitation. If you know or suspect that, toggling optimizer features off can help you determine which code path may be involved in your issue. Also, there's nothing wrong with temporarily working around a bad plan by putting one of these optimizer hacks into place as a triage measure, to buy yourself time to figure out what's really wrong. Resist doing that in the server configuration ...
Read now
Unlock full access