SlideShare a Scribd company logo
Cost-based OptimizationandStatistics in FirebirdDmitry YemanovThe Firebird Projecthttp://www.firebirdsql.org
IntroductionOptimizer decides how to find all the information required in the most efficient way it can
Different queries and/or fetch strategies may benefit from different data access paths
Some information should exist in order to help the optimizer in guessing about the best access path
Optimization strategies
Rule-based (heuristics)
Cost-based (statistics)Rule-based OptimizationHeuristical definitions
Indexed retrieval is better than a full table scan(and indexed loop join is better than a merge join)
B-tree has three levels of depth
Compound indices are better than simple ones
Drawbacks
Indices could be bad for some operations
User intentions are not taken into account
Not ready for “ad hoc” queriesCost-based OptimizationKey points
Every operation has an associated cost value
Cost value is calculated using statistical data
Cost is aggregated from bottom up in the access path
Drawbacks
Complex implementation

More Related Content

ODP
Understandung Firebird optimizer, by Dmitry Yemanov (in English)
PPT
Statistics
PPTX
MT6702 Unit 4 Analysis of Data
PPTX
Visuals & Analysis Planner
PPTX
Query evaluation and optimization
PPTX
Splunk Search
PPTX
Algorithms for Query Processing and Optimization of Spatial Operations
PDF
Improved Query Performance With Variant Indexes - review presentation
Understandung Firebird optimizer, by Dmitry Yemanov (in English)
Statistics
MT6702 Unit 4 Analysis of Data
Visuals & Analysis Planner
Query evaluation and optimization
Splunk Search
Algorithms for Query Processing and Optimization of Spatial Operations
Improved Query Performance With Variant Indexes - review presentation

What's hot (20)

PDF
Query trees
PPT
Vldb14
PPT
Textmining Retrieval And Clustering
PPTX
Business Analytics Foundation with R Tools - Part 3
PPTX
Business Analytics Foundation with R tools - Part 2
PPTX
Cost estimation for Query Optimization
PPSX
Geographical information system unit 5
PPTX
How Bird Atlas Data is getting used
PPTX
CS 542 -- Query Optimization
PDF
Stochastic Model-Based Analysis of Energy Consumption in a Rail Road Switch ...
PPTX
Basic of Data Structure - Data Structure - Notes
PPTX
Dfg & sg ppt (1)
PDF
SQL: Query optimization in practice
PDF
Au 2008 Gs100 1 P Getting Spatial With
PPTX
Spatial databases
PPTX
Business Analytics Foundation with R Tools Part 1
PPT
Query optimization
PPT
13. Query Processing in DBMS
PDF
Semi automatic vortex extraction in 4 d pc-mri cardiac blood flow data using ...
Query trees
Vldb14
Textmining Retrieval And Clustering
Business Analytics Foundation with R Tools - Part 3
Business Analytics Foundation with R tools - Part 2
Cost estimation for Query Optimization
Geographical information system unit 5
How Bird Atlas Data is getting used
CS 542 -- Query Optimization
Stochastic Model-Based Analysis of Energy Consumption in a Rail Road Switch ...
Basic of Data Structure - Data Structure - Notes
Dfg & sg ppt (1)
SQL: Query optimization in practice
Au 2008 Gs100 1 P Getting Spatial With
Spatial databases
Business Analytics Foundation with R Tools Part 1
Query optimization
13. Query Processing in DBMS
Semi automatic vortex extraction in 4 d pc-mri cardiac blood flow data using ...
Ad

Similar to Firebird: cost-based optimization and statistics, by Dmitry Yemanov (in English) (20)

PPT
Cost Based Optimizer - Part 1 of 2
PDF
How to Analyze and Tune MySQL Queries for Better Performance
PPT
Indexing Strategies
PPTX
PDF
R07_Senegacnik_CBO.pdf
PDF
Cost-Based Optimizer in Apache Spark 2.2 Ron Hu, Sameer Agarwal, Wenchen Fan ...
PDF
Cost-Based Optimizer in Apache Spark 2.2
PPTX
Cost-Based-Query-Optimization-in-DBMS.pptx
PDF
Statistics and Indexes Internals
PDF
MySQL Optimizer Cost Model
PPT
Unit08 dbms
PPT
Indexing
PPSX
Cost Based Oracle
PDF
Query optimizer vivek sharma
PDF
Managing Statistics for Optimal Query Performance
PPT
PPTX
Tuning a database for millions of users
PPTX
Elegant and Efficient Database Design
PDF
Index management in depth
PDF
Managing Statistics for Optimal Query Performance
Cost Based Optimizer - Part 1 of 2
How to Analyze and Tune MySQL Queries for Better Performance
Indexing Strategies
R07_Senegacnik_CBO.pdf
Cost-Based Optimizer in Apache Spark 2.2 Ron Hu, Sameer Agarwal, Wenchen Fan ...
Cost-Based Optimizer in Apache Spark 2.2
Cost-Based-Query-Optimization-in-DBMS.pptx
Statistics and Indexes Internals
MySQL Optimizer Cost Model
Unit08 dbms
Indexing
Cost Based Oracle
Query optimizer vivek sharma
Managing Statistics for Optimal Query Performance
Tuning a database for millions of users
Elegant and Efficient Database Design
Index management in depth
Managing Statistics for Optimal Query Performance
Ad

More from Alexey Kovyazin (20)

PPTX
High-load performance testing: Firebird 2.5, 3.0, 4.0
PPTX
Fail-Safe Cluster for FirebirdSQL and something more
PPTX
Новые возможности языка SQL в Firebird 3.0
ODP
Firebird recovery tools and techniques by IBSurgeon
ODP
How Firebird transactions work
PDF
Life with big Firebird databases
PDF
Professional tools for Firebird optimization and maintenance from IBSurgeon
PPTX
Resolving Firebird performance problems
PDF
Firebird migration: from Firebird 1.5 to Firebird 2.5
PPTX
Firebird migration: from Firebird 1.5 to Firebird 2.5
PPTX
Firebird Anti-Corruption Approach
PPTX
Firebird's Big Databases (in English)
PDF
Firebird Dataguard (Russian)
PPT
Решения на базе СУБД Firebird в крупных компаниях и государственных учреждени...
PDF
Firebird DataGuard - Еще раз об уверенности в завтрашнем дне
PDF
Firebird usage promo draft
PPTX
FBScanner: IBSurgeon's tool to solve all types of performance problems with F...
ODP
Firebird 2.5 - вектор дальнейшего развития, Dmitry Yemanov, (in Russian)
ODP
СУБД Firebird: Краткий обзор, Дмитрий Еманов (in Russian)
ODP
Open Source: взгляд изнутри, Дмитрий Еманов (The Firebird Project) (in Russian)
High-load performance testing: Firebird 2.5, 3.0, 4.0
Fail-Safe Cluster for FirebirdSQL and something more
Новые возможности языка SQL в Firebird 3.0
Firebird recovery tools and techniques by IBSurgeon
How Firebird transactions work
Life with big Firebird databases
Professional tools for Firebird optimization and maintenance from IBSurgeon
Resolving Firebird performance problems
Firebird migration: from Firebird 1.5 to Firebird 2.5
Firebird migration: from Firebird 1.5 to Firebird 2.5
Firebird Anti-Corruption Approach
Firebird's Big Databases (in English)
Firebird Dataguard (Russian)
Решения на базе СУБД Firebird в крупных компаниях и государственных учреждени...
Firebird DataGuard - Еще раз об уверенности в завтрашнем дне
Firebird usage promo draft
FBScanner: IBSurgeon's tool to solve all types of performance problems with F...
Firebird 2.5 - вектор дальнейшего развития, Dmitry Yemanov, (in Russian)
СУБД Firebird: Краткий обзор, Дмитрий Еманов (in Russian)
Open Source: взгляд изнутри, Дмитрий Еманов (The Firebird Project) (in Russian)

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Cloud computing and distributed systems.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
sap open course for s4hana steps from ECC to s4
Dropbox Q2 2025 Financial Results & Investor Presentation
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
Spectroscopy.pptx food analysis technology
Cloud computing and distributed systems.
MIND Revenue Release Quarter 2 2025 Press Release
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
Encapsulation_ Review paper, used for researhc scholars
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
sap open course for s4hana steps from ECC to s4

Firebird: cost-based optimization and statistics, by Dmitry Yemanov (in English)