current position:Home>Configuration (enable_*) parameter related to execution plan in PG

Configuration (enable_*) parameter related to execution plan in PG

2022-06-24 12:46:40PHP Development Engineer

ENABLE_* Parameters

stay pg in , Some with “ENABLE_*” Parameters at the beginning , These parameters provide methods that affect the query optimizer's choice of different execution plans .

If the execution plan chosen by the optimizer for a particular query is not optimal , These parameters can be set to force the optimizer to choose a better execution plan to solve this problem in the near future ,

But generally not in pg Change the default values of these parameter values in .

enable_seqscan:boolean

Whether to select full table scanning . In fact, full table scanning cannot be completely disabled , But turning this variable off will give the optimizer priority over other methods when they exist

enable_indexscan:boolean

Whether to select index scan

enable_bitmapscan:boolean

Whether to select bitmap scanning

enable_tidscan:boolean

Whether to select bitmap scanning

enable_nestloop:boolean

When multiple meters are connected , Whether to select nested loop connection . If set to “off”, The execution plan can only be connected by nested loops , The optimizer can only choose this path ,

But if there are other ways to connect , The optimizer will give preference to other methods .

enable_hashjoin:boolean

When multiple meters are connected , Whether to choose hash Connect

enable_mergejoin:boolean

When multiple meters are connected , Whether to choose merge Connect

enable_hashagg:boolean

Whether to use hash polymerization

enable_sort:boolean

Use explicit sort , If set to “off”, When there is only one way to sort the execution plan , The optimizer can only choose this path ,

But if there are other ways to connect , The optimizer will give preference to other methods .

Complete example :http://github.crmeb.net/u/defu

come from “ Open source world ” , link :http://ym.baisou.ltd/post/617.html, If you want to reprint , Please indicate the source , Otherwise, the legal liability will be investigated .

copyright notice
author[PHP Development Engineer ],Please bring the original link to reprint, thank you.
https://en.chowdera.com/2022/175/20210526103538926h.html

Random recommended