SlideShare ist ein Scribd-Unternehmen logo
1 von 38
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
@ChrisAntognini antognini.ch/blog
Christian Antognini
Query Optimizer – MySQL vs. PostgreSQL
Percona Live, Frankfurt (DE), 7 November 2018
@ChrisAntognini
Query Optimizer – MySQL vs. PostgreSQL2 2018-11-07
Senior principal consultant, trainer and partner at Trivadis
christian.antognini@trivadis.com
http://antognini.ch
Focus: get the most out of database engines
Logical and physical database design
Query optimizer
Application performance management
Author of Troubleshooting Oracle Performance (Apress, 2008/14)
OakTable Network, Oracle ACE Director
Agenda
Query Optimizer – MySQL vs. PostgreSQL3 2018-11-07
1. Introduction
2. Controlling the Query Optimizer
3. Statistics about Data
4. Data Dictionary Metadata
5. Single-Table Access Paths
6. Joins and Sub-queries
7. Conclusion
8. References
Query Optimizer – MySQL vs. PostgreSQL4 2018-11-07
Introduction
Compared Products
Query Optimizer – MySQL vs. PostgreSQL5 2018-11-07
MySQL Community Server 8.0.13
Release date: 10 October 2018
Only the InnoDB engine is covered
PostgreSQL 11.0
Release date: 18 October 2018
Disclaimer
Query Optimizer – MySQL vs. PostgreSQL6 2018-11-07
No performance tests were performed
No comparison between the execution plans generated by the two query
optimizers were performed
To compare and to evaluate the two query optimizers only the availability of
key features and the ability of the query optimizer to correctly recognize
common data patterns was considered
Inputs Considered to Produce an Execution Plan
Query Optimizer – MySQL vs. PostgreSQL7 2018-11-07
Query
Optimizer
SQL statement
Execution plan
Configuration
Metadata
Object statistics
Runtime information?
Others?
How Is Data Stored?
Query Optimizer – MySQL vs. PostgreSQL8 2018-11-07
InnoDB uses a B-tree index Heap table
Query Optimizer – MySQL vs. PostgreSQL9 2018-11-07
Controlling the Query Optimizer
Configuration
Query Optimizer – MySQL vs. PostgreSQL10 2018-11-07
Three system variables control the
behavior of the query optimizer
Limit the number of evaluated
plans (2)
Control specific features
(1 parameter for 21 features)
The default (system) values can be
overwritten at session and statement
level
45 parameters control the behavior
of the query optimizer
Limit the number of evaluated
plans (2)
Control specific features (25)
Control the genetic optimizer (7)
The default (system) values can be
overwritten at session level
Configuration – Cost Model
Query Optimizer – MySQL vs. PostgreSQL11 2018-11-07
A cost model database contains cost
estimate information for a number of
operations (8)
The default values can be changed
at the system level only
A number of parameters provide cost
estimate information for a number of
operations (11)
The default (system) values can be
overwritten at session level
Hints
Query Optimizer – MySQL vs. PostgreSQL12 2018-11-07
SELECT statement modifiers (4)
Impact statement syntax
Index hints (3)
Impact statement syntax
Cause error when index missing
Optimizer hints (23)
Similar to Oracle Database hints
Global, query block and object-level
Cause warning when syntax is wrong
(Available in EDB Advanced Server)
hints_modifiers.sql
hints_index.sql
hints_optimizer.sql
Query Optimizer – MySQL vs. PostgreSQL13 2018-11-07
Statistics about Data
Gathering Statistics
Query Optimizer – MySQL vs. PostgreSQL14 2018-11-07
The ANALYZE statement gathers
and, by default, stores statistics in
the data dictionary
By default, an asynchronous
automatic statistics recalculation
takes place
Persistent (default) as well as non-
persistent statistics exist
The ANALYZE statement gathers
and stores statistics in the data
dictionary
By default, the autovacuum daemon
recalculate statistics of modified
tables
Table Statistics
Query Optimizer – MySQL vs. PostgreSQL15 2018-11-07
Clustered index size (pages)
Number of rows
Table size (pages)
Number of rows
Number of pages marked all-visible
statistics.sql
Column Statistics
Query Optimizer – MySQL vs. PostgreSQL16 2018-11-07
Data distribution (optional)
Including fraction of entries that
are null
Fraction of values that are null
Average column width (bytes)
Number of distinct values
Statistical correlation between
physical and logical row ordering
Data distribution (optional)
Most common values and their
frequency (optional)
statistics.sql
Cross-Column Statistics
Query Optimizer – MySQL vs. PostgreSQL17 2018-11-07
Functional dependencies (optional)
Number of distinct values (optional)
statistics.sql
Index Statistics
Query Optimizer – MySQL vs. PostgreSQL18 2018-11-07
Index size (pages)
Number of leaf pages
Number of distinct keys
Several values are stored
E.g. for index “a,b,c”
 “a”, “a,b”, “a,b,c”, “a,b,c,PK”
Index size (pages)
Number of indexed rows
statistics.sql
Query Optimizer – MySQL vs. PostgreSQL20 2018-11-07
Data Dictionary Metadata
Constraints – Primary Key and Unique Key
Query Optimizer – MySQL vs. PostgreSQL21 2018-11-07
Because of the clustered index, PK
has precedence over other indexes
Predicates based on UK take
precedence over non-UK indexes
Equality predicates based on PK/UK
are probed
No particular precedence is given to
predicates based on PK/UK
Statistical correlation between
physical and logical row ordering
determines which index is used
constraints_pk_uk.sql
Constraints – Foreign Key
Query Optimizer – MySQL vs. PostgreSQL22 2018-11-07
No usage of FK to avoid loss-less
joins has been observed
No usage of FK to avoid loss-less
joins has been observed
constraints_fk.sql
Constraints – NOT NULL
Query Optimizer – MySQL vs. PostgreSQL23 2018-11-07
NOT NULL constraints are used to
verify the validity of predicates
By default the usage of NOT NULL
constraints to verify the validity of
predicates is enabled for specific
cases only
constraint_exclusion = partition
Statistics are used instead
constraints_not_null.sql
Constraints – CHECK
Query Optimizer – MySQL vs. PostgreSQL24 2018-11-07
No usage of CHECK constraints to
verify the validity of predicates has
been observed
Statistics are used instead
By default the usage of CHECK
constraints to verify the validity of
predicates is enabled for specific
cases only
constraint_exclusion = partition
Statistics are used instead
constraints_check.sql
Query Optimizer – MySQL vs. PostgreSQL25 2018-11-07
Single-Table Access Paths
Available Index Types
Query Optimizer – MySQL vs. PostgreSQL26 2018-11-07
Supported index types
B-tree (default)
R-tree (for spatial indexes)
Indexes can be created on
expressions and, for string columns,
on the leading part of column values
B-tree indexes store NULL values
Support for invisible indexes
Supported index types
B-tree (default)
Hash, GiST, SP-GiST, GIN, BRIN
Indexes can be created on
expressions as well as on a subset
of the rows
B-tree indexes store NULL values
and support non-key columns
indexes_expression.sql
indexes_invisible.sql
indexes_non_key.sql
indexes_nulls.sql
indexes_partial.sql
indexes_prefix.sql
Optimization of ORDER BY, MIN and MAX
Query Optimizer – MySQL vs. PostgreSQL27 2018-11-07
B-tree indexes can be used to
optimize ORDER BY, MIN and MAX
Index scans can be performed in
both directions
Keys are stored according to the
specified order
NULLS FIRST/LAST not
supported
B-tree indexes can be used to
optimize ORDER BY, MIN and MAX
Index scans can be performed in
both directions
Keys are stored according to the
specified order
NULLS FIRST/LAST supported
indexes_order_by.sql
indexes_min_max.sql
Merging Indexes
Query Optimizer – MySQL vs. PostgreSQL28 2018-11-07
Two or more B-tree indexes can be
merged at runtime to evaluate
multiple predicates combined with
AND or OR
When appropriate, B-tree indexes
are dynamically converted to
bitmaps in memory
One utilization of this feature is to
merge indexes to evaluate multiple
predicates combined with AND or
OR
indexes_merge.sql
(Declarative) Partitioning
Query Optimizer – MySQL vs. PostgreSQL29 2018-11-07
Available methods:
Multi-column range and list
Single-column hash
Sub-partitioning by hash
Only local indexes (incl. PK/UK)
FK not supported
Partition pruning
Available methods:
Multi-column range and hash
Single-column list
Sub-partitioning by range/hash/list
Only local indexes (incl. PK/UK)
FK cannot reference a partitioned table
Partition pruning
partitioning_hash.sql
partitioning_list.sql
partitioning_range.sql
partitioning_sub.sql
Query Optimizer – MySQL vs. PostgreSQL30 2018-11-07
Joins and Sub-queries
Available Kind of Joins
Query Optimizer – MySQL vs. PostgreSQL31 2018-11-07
Available join methods
(Block) Nested loops join
(Hash join available in MariaDB)
Bushy plans are considered only
when no other possibility exists
Full outer joins are not supported
Available join methods
Nested loops join
Hash join
Merge join
Bushy plans are considered
Full outer joins are supported and
optimized with hash/merge joins
joins_methods.sql
joins_order.sql
joins_syntax.sql
joins_bushy.sql
Sub-queries in WHERE Clause
Query Optimizer – MySQL vs. PostgreSQL32 2018-11-07
Simple sub-queries that are not
correctly optimized were observed
For optimal performance a rewrite
might be necessary
Problematic cases observed
Correlated NOT IN
Correlated (NOT) EXISTS
Simple sub-queries that are not
correctly optimized were observed
For optimal performance a rewrite
might be necessary
Problematic case observed
Correlated (NOT) IN
Uncorrelated NOT IN
joins_subqueries.sql
Query Optimizer – MySQL vs. PostgreSQL35 2018-11-07
Conclusion
Summary
Query Optimizer – MySQL vs. PostgreSQL36 2018-11-07
Good configuration capabilities
Hints available
Fairly good object statistics
Metadata only partially used
Good indexing capabilities
Average partition capabilities
Limited join capabilities
Good configuration capabilities
Hints missing
Very good object statistics
Metadata only partially used
Good indexing capabilities
Average partition capabilities
Good join capabilities
Query Optimizer – MySQL vs. PostgreSQL37 2018-11-07
Core Messages
The query optimizer of PostgreSQL is more advanced than the one of MySQL
In general, the query optimizer of MySQL can only do a good job with
transactional loads; the one of PostgreSQL is also suitable for analytical loads
Query Optimizer – MySQL vs. PostgreSQL38 2018-11-07
References
References (1)
Query Optimizer – MySQL vs. PostgreSQL39 2018-11-07
MySQL 8.0 Reference Manual
The Unofficial MySQL 8.0 Optimizer
Guide
MySQL Internals
MySQL Server Blog
PostgreSQL 11 Documentation
Planner source code “readme”
PostgreSQL Wiki
References (2)
Query Optimizer – MySQL vs. PostgreSQL40 2018-11-07
The verification scripts I wrote are available on GitHub
How Well a Query Optimizer Handles Subqueries?
Q&A
2018-11-07 Query Optimizer – MySQL vs. PostgreSQL41

Weitere ähnliche Inhalte

Was ist angesagt?

[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자PgDay.Seoul
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsAlexander Korotkov
 
Using ClickHouse for Experimentation
Using ClickHouse for ExperimentationUsing ClickHouse for Experimentation
Using ClickHouse for ExperimentationGleb Kanterov
 
[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL TuningPgDay.Seoul
 
How to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better PerformanceHow to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better Performanceoysteing
 
State of the Trino Project
State of the Trino ProjectState of the Trino Project
State of the Trino ProjectMartin Traverso
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바NeoClova
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookThe Hive
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZENorvald Ryeng
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceMark Ginnebaugh
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBMydbops
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinStåle Deraas
 
RocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesRocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesYoshinori Matsunobu
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsMaaz Anjum
 

Was ist angesagt? (20)

[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
[Pgday.Seoul 2017] 7. PostgreSQL DB Tuning 기업사례 - 송춘자
 
Solving PostgreSQL wicked problems
Solving PostgreSQL wicked problemsSolving PostgreSQL wicked problems
Solving PostgreSQL wicked problems
 
Using ClickHouse for Experimentation
Using ClickHouse for ExperimentationUsing ClickHouse for Experimentation
Using ClickHouse for Experimentation
 
[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL Tuning
 
How to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better PerformanceHow to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better Performance
 
State of the Trino Project
State of the Trino ProjectState of the Trino Project
State of the Trino Project
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Get to know PostgreSQL!
Get to know PostgreSQL!Get to know PostgreSQL!
Get to know PostgreSQL!
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database Performance
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
 
The PostgreSQL Query Planner
The PostgreSQL Query PlannerThe PostgreSQL Query Planner
The PostgreSQL Query Planner
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublinDd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
RocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesRocksDB Performance and Reliability Practices
RocksDB Performance and Reliability Practices
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM Metrics
 
Sql query patterns, optimized
Sql query patterns, optimizedSql query patterns, optimized
Sql query patterns, optimized
 

Ähnlich wie Query Optimizer – MySQL vs. PostgreSQL

The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)theijes
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresSteven Johnson
 
E132833
E132833E132833
E132833irjes
 
Tunning sql query
Tunning sql queryTunning sql query
Tunning sql queryvuhaininh88
 
Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems
Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems
Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems Jiaheng Lu
 
How to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better PerformanceHow to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better Performanceoysteing
 
Analytic Views in Oracle 12.2
Analytic Views in Oracle 12.2Analytic Views in Oracle 12.2
Analytic Views in Oracle 12.2Kim Berg Hansen
 
Oracle performance tuning for java developers
Oracle performance tuning for java developersOracle performance tuning for java developers
Oracle performance tuning for java developersSaeed Shahsavan
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cRonald Francisco Vargas Quesada
 
Query-porcessing-& Query optimization
Query-porcessing-& Query optimizationQuery-porcessing-& Query optimization
Query-porcessing-& Query optimizationSaranya Natarajan
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
FIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE
 
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2tovetrivel
 
Ch 7 Physical D B Design
Ch 7  Physical D B  DesignCh 7  Physical D B  Design
Ch 7 Physical D B Designguest8fdbdd
 
Latest Features in Power BI
Latest Features in Power BILatest Features in Power BI
Latest Features in Power BIHARIHARAN R
 

Ähnlich wie Query Optimizer – MySQL vs. PostgreSQL (20)

The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)The International Journal of Engineering and Science (The IJES)
The International Journal of Engineering and Science (The IJES)
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
E132833
E132833E132833
E132833
 
Tunning sql query
Tunning sql queryTunning sql query
Tunning sql query
 
Sadcw 6e chapter12
Sadcw 6e chapter12Sadcw 6e chapter12
Sadcw 6e chapter12
 
Bo4301369372
Bo4301369372Bo4301369372
Bo4301369372
 
Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems
Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems
Auto­matic Para­meter Tun­ing for Data­bases and Big Data Sys­tems
 
How to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better PerformanceHow to Analyze and Tune MySQL Queries for Better Performance
How to Analyze and Tune MySQL Queries for Better Performance
 
DataAnalysis
DataAnalysisDataAnalysis
DataAnalysis
 
Analytic Views in Oracle 12.2
Analytic Views in Oracle 12.2Analytic Views in Oracle 12.2
Analytic Views in Oracle 12.2
 
Oracle performance tuning for java developers
Oracle performance tuning for java developersOracle performance tuning for java developers
Oracle performance tuning for java developers
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 
Query-porcessing-& Query optimization
Query-porcessing-& Query optimizationQuery-porcessing-& Query optimization
Query-porcessing-& Query optimization
 
Database aggregation using metadata
Database aggregation using metadataDatabase aggregation using metadata
Database aggregation using metadata
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
Column oriented Transactions
Column oriented TransactionsColumn oriented Transactions
Column oriented Transactions
 
FIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data ModelsFIWARE Training: Introduction to Smart Data Models
FIWARE Training: Introduction to Smart Data Models
 
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
 
Ch 7 Physical D B Design
Ch 7  Physical D B  DesignCh 7  Physical D B  Design
Ch 7 Physical D B Design
 
Latest Features in Power BI
Latest Features in Power BILatest Features in Power BI
Latest Features in Power BI
 

Mehr von Christian Antognini

Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?Christian Antognini
 
Identification of Performance Problems without the Diagnostic Pack
Identification of Performance Problems without the Diagnostic PackIdentification of Performance Problems without the Diagnostic Pack
Identification of Performance Problems without the Diagnostic PackChristian Antognini
 
Designing for Performance: Database Related Worst Practices
Designing for Performance: Database Related Worst PracticesDesigning for Performance: Database Related Worst Practices
Designing for Performance: Database Related Worst PracticesChristian Antognini
 
Oracle Database 12.1.0.2 New Performance Features
Oracle Database 12.1.0.2 New Performance FeaturesOracle Database 12.1.0.2 New Performance Features
Oracle Database 12.1.0.2 New Performance FeaturesChristian Antognini
 
Oracle Database In-Memory and the Query Optimizer
Oracle Database In-Memory and the Query OptimizerOracle Database In-Memory and the Query Optimizer
Oracle Database In-Memory and the Query OptimizerChristian Antognini
 
Indexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsIndexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsChristian Antognini
 

Mehr von Christian Antognini (7)

Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?Free Load Testing Tools for Oracle Database – Which One Do I Use?
Free Load Testing Tools for Oracle Database – Which One Do I Use?
 
Identification of Performance Problems without the Diagnostic Pack
Identification of Performance Problems without the Diagnostic PackIdentification of Performance Problems without the Diagnostic Pack
Identification of Performance Problems without the Diagnostic Pack
 
Designing for Performance: Database Related Worst Practices
Designing for Performance: Database Related Worst PracticesDesigning for Performance: Database Related Worst Practices
Designing for Performance: Database Related Worst Practices
 
Oracle Database 12.1.0.2 New Performance Features
Oracle Database 12.1.0.2 New Performance FeaturesOracle Database 12.1.0.2 New Performance Features
Oracle Database 12.1.0.2 New Performance Features
 
Oracle Database In-Memory and the Query Optimizer
Oracle Database In-Memory and the Query OptimizerOracle Database In-Memory and the Query Optimizer
Oracle Database In-Memory and the Query Optimizer
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 
Indexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsIndexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management Internals
 

Kürzlich hochgeladen

Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 

Kürzlich hochgeladen (20)

Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 

Query Optimizer – MySQL vs. PostgreSQL

  • 1. BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH @ChrisAntognini antognini.ch/blog Christian Antognini Query Optimizer – MySQL vs. PostgreSQL Percona Live, Frankfurt (DE), 7 November 2018
  • 2. @ChrisAntognini Query Optimizer – MySQL vs. PostgreSQL2 2018-11-07 Senior principal consultant, trainer and partner at Trivadis christian.antognini@trivadis.com http://antognini.ch Focus: get the most out of database engines Logical and physical database design Query optimizer Application performance management Author of Troubleshooting Oracle Performance (Apress, 2008/14) OakTable Network, Oracle ACE Director
  • 3. Agenda Query Optimizer – MySQL vs. PostgreSQL3 2018-11-07 1. Introduction 2. Controlling the Query Optimizer 3. Statistics about Data 4. Data Dictionary Metadata 5. Single-Table Access Paths 6. Joins and Sub-queries 7. Conclusion 8. References
  • 4. Query Optimizer – MySQL vs. PostgreSQL4 2018-11-07 Introduction
  • 5. Compared Products Query Optimizer – MySQL vs. PostgreSQL5 2018-11-07 MySQL Community Server 8.0.13 Release date: 10 October 2018 Only the InnoDB engine is covered PostgreSQL 11.0 Release date: 18 October 2018
  • 6. Disclaimer Query Optimizer – MySQL vs. PostgreSQL6 2018-11-07 No performance tests were performed No comparison between the execution plans generated by the two query optimizers were performed To compare and to evaluate the two query optimizers only the availability of key features and the ability of the query optimizer to correctly recognize common data patterns was considered
  • 7. Inputs Considered to Produce an Execution Plan Query Optimizer – MySQL vs. PostgreSQL7 2018-11-07 Query Optimizer SQL statement Execution plan Configuration Metadata Object statistics Runtime information? Others?
  • 8. How Is Data Stored? Query Optimizer – MySQL vs. PostgreSQL8 2018-11-07 InnoDB uses a B-tree index Heap table
  • 9. Query Optimizer – MySQL vs. PostgreSQL9 2018-11-07 Controlling the Query Optimizer
  • 10. Configuration Query Optimizer – MySQL vs. PostgreSQL10 2018-11-07 Three system variables control the behavior of the query optimizer Limit the number of evaluated plans (2) Control specific features (1 parameter for 21 features) The default (system) values can be overwritten at session and statement level 45 parameters control the behavior of the query optimizer Limit the number of evaluated plans (2) Control specific features (25) Control the genetic optimizer (7) The default (system) values can be overwritten at session level
  • 11. Configuration – Cost Model Query Optimizer – MySQL vs. PostgreSQL11 2018-11-07 A cost model database contains cost estimate information for a number of operations (8) The default values can be changed at the system level only A number of parameters provide cost estimate information for a number of operations (11) The default (system) values can be overwritten at session level
  • 12. Hints Query Optimizer – MySQL vs. PostgreSQL12 2018-11-07 SELECT statement modifiers (4) Impact statement syntax Index hints (3) Impact statement syntax Cause error when index missing Optimizer hints (23) Similar to Oracle Database hints Global, query block and object-level Cause warning when syntax is wrong (Available in EDB Advanced Server) hints_modifiers.sql hints_index.sql hints_optimizer.sql
  • 13. Query Optimizer – MySQL vs. PostgreSQL13 2018-11-07 Statistics about Data
  • 14. Gathering Statistics Query Optimizer – MySQL vs. PostgreSQL14 2018-11-07 The ANALYZE statement gathers and, by default, stores statistics in the data dictionary By default, an asynchronous automatic statistics recalculation takes place Persistent (default) as well as non- persistent statistics exist The ANALYZE statement gathers and stores statistics in the data dictionary By default, the autovacuum daemon recalculate statistics of modified tables
  • 15. Table Statistics Query Optimizer – MySQL vs. PostgreSQL15 2018-11-07 Clustered index size (pages) Number of rows Table size (pages) Number of rows Number of pages marked all-visible statistics.sql
  • 16. Column Statistics Query Optimizer – MySQL vs. PostgreSQL16 2018-11-07 Data distribution (optional) Including fraction of entries that are null Fraction of values that are null Average column width (bytes) Number of distinct values Statistical correlation between physical and logical row ordering Data distribution (optional) Most common values and their frequency (optional) statistics.sql
  • 17. Cross-Column Statistics Query Optimizer – MySQL vs. PostgreSQL17 2018-11-07 Functional dependencies (optional) Number of distinct values (optional) statistics.sql
  • 18. Index Statistics Query Optimizer – MySQL vs. PostgreSQL18 2018-11-07 Index size (pages) Number of leaf pages Number of distinct keys Several values are stored E.g. for index “a,b,c”  “a”, “a,b”, “a,b,c”, “a,b,c,PK” Index size (pages) Number of indexed rows statistics.sql
  • 19. Query Optimizer – MySQL vs. PostgreSQL20 2018-11-07 Data Dictionary Metadata
  • 20. Constraints – Primary Key and Unique Key Query Optimizer – MySQL vs. PostgreSQL21 2018-11-07 Because of the clustered index, PK has precedence over other indexes Predicates based on UK take precedence over non-UK indexes Equality predicates based on PK/UK are probed No particular precedence is given to predicates based on PK/UK Statistical correlation between physical and logical row ordering determines which index is used constraints_pk_uk.sql
  • 21. Constraints – Foreign Key Query Optimizer – MySQL vs. PostgreSQL22 2018-11-07 No usage of FK to avoid loss-less joins has been observed No usage of FK to avoid loss-less joins has been observed constraints_fk.sql
  • 22. Constraints – NOT NULL Query Optimizer – MySQL vs. PostgreSQL23 2018-11-07 NOT NULL constraints are used to verify the validity of predicates By default the usage of NOT NULL constraints to verify the validity of predicates is enabled for specific cases only constraint_exclusion = partition Statistics are used instead constraints_not_null.sql
  • 23. Constraints – CHECK Query Optimizer – MySQL vs. PostgreSQL24 2018-11-07 No usage of CHECK constraints to verify the validity of predicates has been observed Statistics are used instead By default the usage of CHECK constraints to verify the validity of predicates is enabled for specific cases only constraint_exclusion = partition Statistics are used instead constraints_check.sql
  • 24. Query Optimizer – MySQL vs. PostgreSQL25 2018-11-07 Single-Table Access Paths
  • 25. Available Index Types Query Optimizer – MySQL vs. PostgreSQL26 2018-11-07 Supported index types B-tree (default) R-tree (for spatial indexes) Indexes can be created on expressions and, for string columns, on the leading part of column values B-tree indexes store NULL values Support for invisible indexes Supported index types B-tree (default) Hash, GiST, SP-GiST, GIN, BRIN Indexes can be created on expressions as well as on a subset of the rows B-tree indexes store NULL values and support non-key columns indexes_expression.sql indexes_invisible.sql indexes_non_key.sql indexes_nulls.sql indexes_partial.sql indexes_prefix.sql
  • 26. Optimization of ORDER BY, MIN and MAX Query Optimizer – MySQL vs. PostgreSQL27 2018-11-07 B-tree indexes can be used to optimize ORDER BY, MIN and MAX Index scans can be performed in both directions Keys are stored according to the specified order NULLS FIRST/LAST not supported B-tree indexes can be used to optimize ORDER BY, MIN and MAX Index scans can be performed in both directions Keys are stored according to the specified order NULLS FIRST/LAST supported indexes_order_by.sql indexes_min_max.sql
  • 27. Merging Indexes Query Optimizer – MySQL vs. PostgreSQL28 2018-11-07 Two or more B-tree indexes can be merged at runtime to evaluate multiple predicates combined with AND or OR When appropriate, B-tree indexes are dynamically converted to bitmaps in memory One utilization of this feature is to merge indexes to evaluate multiple predicates combined with AND or OR indexes_merge.sql
  • 28. (Declarative) Partitioning Query Optimizer – MySQL vs. PostgreSQL29 2018-11-07 Available methods: Multi-column range and list Single-column hash Sub-partitioning by hash Only local indexes (incl. PK/UK) FK not supported Partition pruning Available methods: Multi-column range and hash Single-column list Sub-partitioning by range/hash/list Only local indexes (incl. PK/UK) FK cannot reference a partitioned table Partition pruning partitioning_hash.sql partitioning_list.sql partitioning_range.sql partitioning_sub.sql
  • 29. Query Optimizer – MySQL vs. PostgreSQL30 2018-11-07 Joins and Sub-queries
  • 30. Available Kind of Joins Query Optimizer – MySQL vs. PostgreSQL31 2018-11-07 Available join methods (Block) Nested loops join (Hash join available in MariaDB) Bushy plans are considered only when no other possibility exists Full outer joins are not supported Available join methods Nested loops join Hash join Merge join Bushy plans are considered Full outer joins are supported and optimized with hash/merge joins joins_methods.sql joins_order.sql joins_syntax.sql joins_bushy.sql
  • 31. Sub-queries in WHERE Clause Query Optimizer – MySQL vs. PostgreSQL32 2018-11-07 Simple sub-queries that are not correctly optimized were observed For optimal performance a rewrite might be necessary Problematic cases observed Correlated NOT IN Correlated (NOT) EXISTS Simple sub-queries that are not correctly optimized were observed For optimal performance a rewrite might be necessary Problematic case observed Correlated (NOT) IN Uncorrelated NOT IN joins_subqueries.sql
  • 32. Query Optimizer – MySQL vs. PostgreSQL35 2018-11-07 Conclusion
  • 33. Summary Query Optimizer – MySQL vs. PostgreSQL36 2018-11-07 Good configuration capabilities Hints available Fairly good object statistics Metadata only partially used Good indexing capabilities Average partition capabilities Limited join capabilities Good configuration capabilities Hints missing Very good object statistics Metadata only partially used Good indexing capabilities Average partition capabilities Good join capabilities
  • 34. Query Optimizer – MySQL vs. PostgreSQL37 2018-11-07 Core Messages The query optimizer of PostgreSQL is more advanced than the one of MySQL In general, the query optimizer of MySQL can only do a good job with transactional loads; the one of PostgreSQL is also suitable for analytical loads
  • 35. Query Optimizer – MySQL vs. PostgreSQL38 2018-11-07 References
  • 36. References (1) Query Optimizer – MySQL vs. PostgreSQL39 2018-11-07 MySQL 8.0 Reference Manual The Unofficial MySQL 8.0 Optimizer Guide MySQL Internals MySQL Server Blog PostgreSQL 11 Documentation Planner source code “readme” PostgreSQL Wiki
  • 37. References (2) Query Optimizer – MySQL vs. PostgreSQL40 2018-11-07 The verification scripts I wrote are available on GitHub How Well a Query Optimizer Handles Subqueries?
  • 38. Q&A 2018-11-07 Query Optimizer – MySQL vs. PostgreSQL41