4 ms·
In a database supporting several applications or even just a large data model it can be rather difficult to ensure a global setting to the query planner doesn't
by Yeroc 3y ago
In a database supporting several applications or even just a large data model it can be rather difficult to ensure a global setting to the query planner doesn't cause a regression to other queries. A query hint can be a nice way to quickly solve a performance issue without risk of regressing elsewhere. Agree they should be used as a last resort and as a sort term fix while a better, longer term fix is investigated but they are a critical tool to have in your tool box especially as postgres moves into the business critical domains occupied by the commercial database vendors.
- phamilton 3y ago`set local` allows tuning query planner settings scoped to a transaction, so you don't have to do it globally.