• Media type: E-Book; Video
  • Title: Seamless SQL optimization
  • Contributor: Samokhvalov, Nikolay [Author]; Langille, Dan (Moderator) [Other]
  • Published: [Erscheinungsort nicht ermittelbar]: PGCon - PostgreSQL Conference for Users and Developers, 2020
  • Published in: PGCon 2020 ; (Jan. 2020)
  • Extent: 1 Online-Ressource (338 MB, 02:15:26:11)
  • Language: English
  • DOI: 10.5446/52146
  • Identifier:
  • Origination:
  • Footnote: Audiovisuelles Material
  • Description: There are two types of analysis and optimization. The first, macro-analysis, is analyzing the workload as a whole. Usually, it is done using pg_stat_statements or pgBadger The second one is micro-analysis and the central tool here is the EXPLAIN command. And there is a huge gap between them, partially covered by auto_explain and pg_qualstats extensions. In this tutorial, we learn how to establish a smooth and seamless SQL optimization process in your organization? Topics we'll cover: What are the pros and cons of using pg_stat_statements compared to log analysis performed by pgBadger? What are the key metrics in macro-analysis and how to choose the most applicable in each case (is it total time consumed by an SQL query group? or average timing, or maybe shared buffers hit and read by the query group per second?); Closing the gap: how to switch from macro-analysis to micro-analysis (you identified a "bad" SQL group, how to start optimizing it and what is needed to make this process faster / more automated?). How to simplify the process of adaption of using EXPLAIN command by a wide range of backend developers, what metrics matter and how (timing vs buffers involved). EXPLAIN visualization technics and their pros and cons (PEV, and FlameGraphs for EXPLAIN). How to accumulate knowledge about SQL optimization, share it with teammates and improve collaboration
  • Access State: Open Access
  • Rights information: Attribution - Non Commercial (CC BY-NC)