Postgres Plus Advanced Server Performance and Scalability Guide: 7.2 Query Optimization Hints

Previous PageTable Of ContentsNext Page

Postgres Plus Advanced Server Performance and Scalability Guide

 

7.2 Query Optimization Hints

The Advanced Server query planner performs the task of determining how the result set should be produced for DELETE, SELECT, and UPDATE SQL commands. The query planner uses cost based optimization to determine the least cost plan.

There may be cases where you want to force the query planner to either utilize (or not to utilize) a certain access method to determine the plan (for example, use a sequential scan instead of an index scan).

The query hints feature (also called optimizer hints) of Advanced Server allows you to embed these directives within the SQL command to force the query planner to use a certain access method.

Query hints are typically used with the EXPLAIN command so you can see the estimated costs associated with the generated plan based on the query hint you supplied.

This technique allows you to perform a more detailed cost comparison of how certain queries are expected to perform.

For more information about optimizer hints, see the Oracle Compatibility Developer's Guide, available from the EnterpriseDB website at:

http://www.enterprisedb.com/documentation

Previous PageTable Of ContentsNext Page