Appendix A. Hints list

# pg_hint_plan 1.3 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. Rstricts to specfied 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. Restoricts to specfied 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 specifiled tables.
HashJoin(table table[ table...]) | Forces hash join for the joins consist of the specifiled tables.
MergeJoin(table table[ table...]) | Forces merge join for the joins consist of the specifiled tables.
NoNestLoop(table table[ table...]) | Forces not to do nested loop for the joins consist of the specifiled tables.
NoHashJoin(table table[ table...]) | Forces not to do hash join for the joins consist of the specifiled tables.
NoMergeJoin(table table[ table...]) | Forces not to do merge join for the joins consist of the specifiled 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.
Row number correction | Rows(table table[ table...] correction) | Corrects row number of a result of the joins consist of the specfied 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 specfied 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.