achfrag.net/2025/06/03/art-of-query-optimization.html
Preview meta tags from the achfrag.net website.
Linked Hostnames
13- 12 links toachfrag.net
- 3 links togithub.com
- 3 links tojnidzwetzki.github.io
- 2 links towww.linkedin.com
- 1 link todl.acm.org
- 1 link topglite.dev
- 1 link toscholar.google.com
- 1 link totwitter.com
Thumbnail
Search Engine Appearance
The Art of SQL Query Optimization
SQL is a declarative language; only the result of the query is specified. The exact steps to produce the result must be determined by the DBMS. Often, multiple ways exist to calculate a query result. For example, the DBMS can choose to use an index or perform a sequential scan on a table to find the needed tuples. The query optimizer is responsible for finding the most efficient plan for a given query. The plan generator creates possible plans, which are then evaluated based on their costs. Afterward, the cheapest plan is chosen and executed. When the DBMS expects to return a large portion of the table, a full table scan can be more efficient than following the pointers in an index structure. However, it is hard to determine when the DBMS prefers one plan over another and when the switch between plans occurs. In a few evenings, I implemented the plan explorer for PostgreSQL. It iterates over a search space and generates visualizations that show when the plan changes and how many tuples are expected versus the actual number returned. This blog post examines the “art” of query optimization. It discusses the plan explorer tool, the images the tool generates, and the insights the tool provides into the decisions made by the PostgreSQL query optimizer.
Bing
The Art of SQL Query Optimization
SQL is a declarative language; only the result of the query is specified. The exact steps to produce the result must be determined by the DBMS. Often, multiple ways exist to calculate a query result. For example, the DBMS can choose to use an index or perform a sequential scan on a table to find the needed tuples. The query optimizer is responsible for finding the most efficient plan for a given query. The plan generator creates possible plans, which are then evaluated based on their costs. Afterward, the cheapest plan is chosen and executed. When the DBMS expects to return a large portion of the table, a full table scan can be more efficient than following the pointers in an index structure. However, it is hard to determine when the DBMS prefers one plan over another and when the switch between plans occurs. In a few evenings, I implemented the plan explorer for PostgreSQL. It iterates over a search space and generates visualizations that show when the plan changes and how many tuples are expected versus the actual number returned. This blog post examines the “art” of query optimization. It discusses the plan explorer tool, the images the tool generates, and the insights the tool provides into the decisions made by the PostgreSQL query optimizer.
DuckDuckGo
The Art of SQL Query Optimization
SQL is a declarative language; only the result of the query is specified. The exact steps to produce the result must be determined by the DBMS. Often, multiple ways exist to calculate a query result. For example, the DBMS can choose to use an index or perform a sequential scan on a table to find the needed tuples. The query optimizer is responsible for finding the most efficient plan for a given query. The plan generator creates possible plans, which are then evaluated based on their costs. Afterward, the cheapest plan is chosen and executed. When the DBMS expects to return a large portion of the table, a full table scan can be more efficient than following the pointers in an index structure. However, it is hard to determine when the DBMS prefers one plan over another and when the switch between plans occurs. In a few evenings, I implemented the plan explorer for PostgreSQL. It iterates over a search space and generates visualizations that show when the plan changes and how many tuples are expected versus the actual number returned. This blog post examines the “art” of query optimization. It discusses the plan explorer tool, the images the tool generates, and the insights the tool provides into the decisions made by the PostgreSQL query optimizer.
General Meta Tags
9- titleThe Art of SQL Query Optimization | Jan’s website and blog
- charsetutf-8
- viewportwidth=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=5
- generatorJekyll v3.10.0
- authorJan Nidzwetzki
Open Graph Meta Tags
8- og:imagehttps://jnidzwetzki.github.io/assets/img/plan_explorer_query2.svg
- og:typewebsite
- og:titleThe Art of SQL Query Optimization
og:locale
en_US- og:descriptionSQL is a declarative language; only the result of the query is specified. The exact steps to produce the result must be determined by the DBMS. Often, multiple ways exist to calculate a query result. For example, the DBMS can choose to use an index or perform a sequential scan on a table to find the needed tuples. The query optimizer is responsible for finding the most efficient plan for a given query. The plan generator creates possible plans, which are then evaluated based on their costs. Afterward, the cheapest plan is chosen and executed. When the DBMS expects to return a large portion of the table, a full table scan can be more efficient than following the pointers in an index structure. However, it is hard to determine when the DBMS prefers one plan over another and when the switch between plans occurs. In a few evenings, I implemented the plan explorer for PostgreSQL. It iterates over a search space and generates visualizations that show when the plan changes and how many tuples are expected versus the actual number returned. This blog post examines the “art” of query optimization. It discusses the plan explorer tool, the images the tool generates, and the insights the tool provides into the decisions made by the PostgreSQL query optimizer.
Twitter Meta Tags
6- twitter:cardsummary
- twitter:titleThe Art of SQL Query Optimization
- twitter:descriptionSQL is a declarative language; only the result of the query is specified. The exact steps to produce the result must be determined by the DBMS. Often, multip...
- twitter:cardsummary
- twitter:imagehttps://jnidzwetzki.github.io/assets/img/plan_explorer_query2.svg
Link Tags
5- alternatehttps://jnidzwetzki.github.io/feed.xml
- alternatehttps://jnidzwetzki.github.io/feed.xml
- canonicalhttps://jnidzwetzki.github.io/2025/06/03/art-of-query-optimization.html
- shortcut icon/assets/favicon.ico
- stylesheet/assets/css/main.css
Emails
1Links
29- https://achfrag.net
- https://achfrag.net/2025/05/18/building-a-query-plan-explorer.html
- https://achfrag.net/2025/07/05/postgresql-flamegraph.html
- https://achfrag.net/about
- https://achfrag.net/feed.xml