You can specify the hints with pg_hint_plan below
Group | Format | Description |
---|---|---|
Scan method | SeqScan(table) | Force an Seq Scan on table |
TidScan(table) | Force a Tid Scan on table. Only in searching with ctid | |
IndexScan(table[ index...]) | Force an Index Scan on table. Yous can specify indexes and force to use the lower-cost index(es) among thr specified indexes. | |
IndexOnlyScan(table[ index...]) | Force an Index Only Scan or Index Scan on table. Yous can specify indexes like IndexScan() above | |
BitmapScan(table[ index...]) | Force a Bitmap Scan on table. Yous can specify indexes like IndexScan() above | |
NoSeqScan(table) | Restraint a Seq Scan on table. | |
NoTidScan(table) | Restraint a Tid Scan on table. | |
NoIndexScan(table) | Restraint Index Scan or Index Only Scan on table. | |
NoIndexOnlyScan(table) | Restraint an Index Only Scan on table. PostgreSQL 9.2 or after. | |
NoBitmapScan(table) | Restraint a Bitmap Scan on table. | |
Join method | NestLoop(table table[ table...]) | Force a Nested Loop as a Join method among specifiled tables. |
HashJoin(table table[ table...]) | Force a Hash Join as a Join method among specifiled tables. | |
MergeJoin(table table[ table...]) | Force a Merge Join as a Join method among specifiled tables. | |
NoNestLoop(table table[ table...]) | Restraint a Nested Loop as a Join method among specifiled tables. | |
NoHashJoin(table table[ table...]) | Restraint Hash Join as a Join method among specifiled tables. | |
NoMergeJoin(table table[ table...]) | Restraint a Merge Join as a Join method among specifiled tables. | |
Join order | Leading(table table[ table...]) | Force join order in which table is specified. |
GUC | Set(GUC value) | While creating execution plan for this query , GUC is changed to specified value. |