Appendix A. Hints list

# pg_hint_plan 1.4 Appendices

## Appendix A. Hints list

The available hints are listed below.

Group | Format | Description
--- | --- | ---
Scan method | SeqScan(table) | Forces sequential scan on the table
TidScan(table) | Forces TID scan on the table.
IndexScan(table[ index...]) | Forces index scan on the table. Restricts to specified indexes if any.
IndexOnlyScan(table[ index...]) | Forces index only scan on the table. Restricts to specified indexes if any. Index scan may be used if index only scan is not available. Available for PostgreSQL 9.2 and later.
BitmapScan(table[ index...]) | Forces bitmap scan on the table. Restricts to specified indexes if any.
IndexScanRegexp(table[ POSIX Regexp...])IndexOnlyScanRegexp(table[ POSIX Regexp...])BitmapScanRegexp(table[ POSIX Regexp...]) | Forces index scan or index only scan (For PostgreSQL 9.2 and later) or bitmap scan on the table. Restricts to indexes that matches the specified POSIX regular expression pattern
NoSeqScan(table) | Forces not to do sequential scan on the table.
NoTidScan(table) | Forces not to do TID scan on the table.
NoIndexScan(table) | Forces not to do index scan and index only scan (For PostgreSQL 9.2 and later) on the table.
NoIndexOnlyScan(table) | Forces not to do index only scan on the table. Available for PostgreSQL 9.2 and later.
NoBitmapScan(table) | Forces not to do bitmap scan on the table.
Join method | NestLoop(table table[ table...]) | Forces nested loop for the joins consist of the specified tables.
HashJoin(table table[ table...]) | Forces hash join for the joins consist of the specified tables.
MergeJoin(table table[ table...]) | Forces merge join for the joins consist of the specified tables.
NoNestLoop(table table[ table...]) | Forces not to do nested loop for the joins consist of the specified tables.
NoHashJoin(table table[ table...]) | Forces not to do hash join for the joins consist of the specified tables.
NoMergeJoin(table table[ table...]) | Forces not to do merge join for the joins consist of the specified tables.
Join order | Leading(table table[ table...]) | Forces join order as specified.
Leading(<join pair>) | Forces join order and directions as specified. A join pair is a pair of tables and/or other join pairs enclosed by parentheses, which can make a nested structure.
Behavior control on Join | Memoize(table table[ table...]) | Allow the topmost join of a join among the specified tables to memoize the inner result. (Note that this doesn't enforce.)
NoMemoize(table table[ table...]) | Inhibit the topmost join of a join among the specified tables from memoizing the inner result.
Row number correction | Rows(table table[ table...] correction) | Corrects row number of a result of the joins consist of the specified tables. The available correction methods are absolute (#<n>), addition (+<n>), subtract (-<n>) and multiplication (*<n>). <n> should be a string that strtod() can read.
Parallel query configuration | Parallel(table <# of workers> [soft|hard]) | Enforce or inhibit parallel execution of specified table. <# of workers> is the desired number of parallel workers, where zero means inhibiting parallel execution. If the third parameter is soft (default), it just changes max_parallel_workers_per_gather and leave everything else to planner. Hard means enforcing the specified number of workers.
GUC | Set(GUC-param value) | Set the GUC parameter to the value while planner is running.