Using optimizer hints v17
When you invoke a DELETE
, INSERT
, SELECT
, or UPDATE
command, the server generates a set of execution plans. After analyzing those execution plans, the server selects a plan that generally returns the result set in the least amount of time. The server's choice of plan depends on several factors:
- The estimated execution cost of data handling operations
- Parameter values assigned to parameters in the
Query Tuning
section of thepostgresql.conf
file - Column statistics that were gathered by the ANALYZE command
As a rule, the query planner selects the least expensive plan. You can use an optimizer hint to influence the server as it selects a query plan.