Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the PostgreSQL DBA settings option

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the knowledge of "how to understand PostgreSQL DBA settings options". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

PostgreSQL 12 provides the settings option for the explain command to view setting changes that affect the execution plan.

The parameters that affect the PG execution plan include:

Enable_seqscan, enable_indexscan enable_index only scan, enable_bitmapscan

Temp_buffers, work_mem

Max_parallel_workers_per_gather, max_parallel_workers, enable_gathermerge

Effective_cache_size

Min_parallel_table_scan_size, min_parallel_index_scan_size

Enable_parallel_append, enable_parallel_hash, enable_partition_pruning

Enable_nestloop, enable_mergejoin, enable_hashjoin

Enable_tidscan

Enable_sort

Enable_hashagg

Enable_material

Enable_partitionwise_join

Enable_partitionwise_aggregate

Geqo

Optimize_bounded_sort

Parallel_leader_participation

Jit

From_collapse_limit

Join_collapse_limit

Geqo_threshold

Geqo_effort

Geqo_pool_size

Geqo_generations

Effective_io_concurrency

[local:/data/run/pg12]: 5120 pg12@testdb=# explain (format text,settings on) select * from t_mvcc QUERY PLAN-Seq Scan on t_mvcc (cost=0.00..35.50 rows=2550 width=4) (1 row) [local:/data/run/pg12]: 5120 pg12@testdb=# set enable_seqscan=off SET [local:/data/run/pg12]: 5120 pg12@testdb=# explain (format text,settings on) select * from t_mvcc QUERY PLAN-Seq Scan on t_mvcc ( Cost=10000000000.00..10000000035.50 rows=2550 width=4) Settings: enable_seqscan = 'off' (2 rows) [local:/data/run/pg12]: 5120 pg12@testdb=#

It is worth mentioning that setting enable_XXXscan=off does not really disable but sets the cost of the path to a large value (10000000000).

That's all for "how to understand PostgreSQL DBA settings options". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report