pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/c2main/pg_track_optimizer

crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-b55097560d244c08.css" /> GitHub - c2main/pg_track_optimizer: Explore query plan and execution statistics to find signs of non-optimal optimization · GitHub
Skip to content

c2main/pg_track_optimizer

 
 

Repository files navigation

pg_track_optimizer

Lightweight (dynamically loaded) extension to explore query plan and execution statistics to find signs of non-optimal optimisation. Designed for PostgreSQL v.17 and above.

Abstract

Occasionally, blunders in the optimiser predictions cause a non-optimal query plan. In an extensive database with a lot of queries, it is challenging to find poorly designed plans. So far, I don't know any tools that can help detect such problems. Here, we introduce trivial criteria based on the difference between estimated and actual (after the execution) cardinalities. Of course, it is not proof of the problem, but we can filter candidates from a vast set of queries using this value. This extension can gather statistics in shared memory and show it on-demand. Also, setting error threshold you can obtain explains of queries with high value of the error in the instance log.

Interface

GUCs

  • pg_track_optimizer.mode = {normal | forced | disabled (default)}. disabled mode switches off all activity of the library; normal mode gathers statistics only when the value of log_min_error is exceeded; forced mode gathers data on each incoming query.
  • pg_track_optimizer.log_min_error - logging threshold. Criteria for pushing the query explain into the log.
  • pg_track_optimizer.hash_mem - memory limit for the hash table size. Right now doesn't include query texts - looks like very soft limit.

Routines

  • pg_track_optimizer() - show all data gathered.
  • pg_track_optimizer_flush() - save statistic data to the disk. We don't have any automatization yet to avoid overheads.
  • pg_track_optimizer_reset() - cleanup statistics data.

About

Explore query plan and execution statistics to find signs of non-optimal optimization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 97.6%
  • Makefile 2.4%
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy