SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Modern Query Optimisation
Features In MySQL 8


Karthik P R
CEO, Mydbops
Apr 24, 2021
Mydbops Webinar
Interested in Open Source Database technologies
11 Years of Experience with MySQL
Ex-Yahoo!
Tech Speaker/ Blogger 
CEO Mydbops
Karthik P R 
About Me
Database
Consulting
Services
Managed
Database
Services
Focuses on Top Opensource database MySQL,MariaDB,
MongoDB and PostgreSQL ON Premises and Cloud
Mydbops Services
MySQL 8 (A Major Leap)
Indexing features
Execution Plan Improvements
Optimiser Imporvements
Others Improvements
Agenda
MySQL 8 is a Major Leap
MySQL 8 is a Major Leap
MySQL 8
InnoDB Performance Enhancement
Faster Parallel Replication
Security Enhancements
Operational Improvements ( Shell,Clone Plugin )
CTE , Window Function and Lateral Derived tables
Indexing Features
Indexing Features
Functional Index
Descending Index
Invisible Index
Functional Index
Functional Index
MySQL do Support Functional Index 8.0.13
A functional key part of queries can be indexed
JSON based Queries benefits a lot
Functional Index ( Before )
EXPLAIN SELECT VERSION,TILE FROM NODES_BACKUP WHERE DATE(TIMESTAMP)='2021-04-04';

+----+-------------+--------------+------------+------+---------------+------+---------+------+----------+----------+-------------+

| ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA |

+----+-------------+--------------+------------+------+---------------+------+---------+------+----------+----------+-------------+

| 1 | SIMPLE | NODES_BACKUP | NULL | ALL | NULL | NULL | NULL | NULL | 47378283 | 100.00 | USING WHERE |

+----+-------------+--------------+------------+------+---------------+------+---------+------+----------+----------+-------------+

ROWS SCANNED	 : 47M
TYPE	 	 : FULL TABLE SCAN
Functional Index ( Possible Solutions )
Query Rewrites
	 Application Rewrites
Rewriter Plugin
ProxySQL Rewrites
Virtual Column ( Again needs a Rewrite )
Functional Index ( After )
CREATE INDEX IDX_FUN_DATE ON NODES_BACKUP((DATE(TIMESTAMP)))

QUERY OK, 0 ROWS AFFECTED (5 MIN 30.38 SEC)

RECORDS: 0 DUPLICATES: 0 WARNINGS: 0

SELECT VERSION,TILE FROM NODES_BACKUP WHERE DATE(TIMESTAMP)='2021-04-04';

+----+-------------+--------------+------------+------+---------------+--------------+---------+-------+------+----------+-------+

| ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA |

+----+-------------+--------------+------------+------+---------------+--------------+---------+-------+------+----------+-------+

| 1 | SIMPLE | NODES_BACKUP | NULL | REF | IDX_FUN_DATE | IDX_FUN_DATE | 4 | CONST | 423 | 100.00 | NULL |

+----+-------------+--------------+------------+------+---------------+--------------+---------+-------+------+----------+-------+

1 ROW IN SET, 1 WARNING (0.01 SEC)
Descending Index
Descending Index
MySQL do Support Functional Index 8.0
B+Tree Indexing ( InnoDB )
Index are generally Forward Scan
Queries with different sorting orders are benefited a lot
ASC / DESC Keywords must be used while indexing
Idenitify the queries for optimisation via "Backward index scan" in Extra
filed.
Descending Index
EXPLAIN SELECT EMAIL,DESCRIPTION FROM USERS ORDER BY CREATION_TIME DESC ,DISPLAY_NAME DESC LIMIT 10;

+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+

| ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA |

+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+

| 1 | SIMPLE | USERS | NULL | ALL | NULL | NULL | NULL | NULL | 3941 | 100.00 | USING FILESORT |

+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+

CREATE INDEX IDX_CT_DN ON USERS(CREATION_TIME,DISPLAY_NAME);

QUERY OK, 0 ROWS AFFECTED (0.03 SEC)

EXPLAIN SELECT EMAIL,DESCRIPTION FROM USERS ORDER BY CREATION_TIME DESC ,DISPLAY_NAME DESC LIMIT 10;

+----+-------------+-------+------------+-------+---------------+-----------+---------+------+------+----------+---------------------+

| ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA |

+----+-------------+-------+------------+-------+---------------+-----------+---------+------+------+----------+---------------------+

| 1 | SIMPLE | USERS | NULL | INDEX | NULL | IDX_CT_DN | 772 | NULL | 10 | 100.00 | BACKWARD INDEX SCAN |

+----+-------------+-------+------------+-------+---------------+-----------+---------+------+------+----------+---------------------+
Descending Index
Query uses the Composite Index ( Creation Time , Display name )
No ordering is mentioned in while Indexing
Query uses Backward Scan ( Explain Plan )
But Forwards scan will have 15% Performance gain
Descending Index
CREATE INDEX IDX_CT_DN_DESC ON USERS(CREATION_TIME DESC,DISPLAY_NAME DESC);

QUERY OK, 0 ROWS AFFECTED (0.03 SEC)

RECORDS: 0 DUPLICATES: 0 WARNINGS: 0

EXPLAIN SELECT EMAIL,DESCRIPTION FROM USERS ORDER BY CREATION_TIME DESC ,DISPLAY_NAME DESC LIMIT 10;

+----+-------------+-------+------------+-------+---------------+----------------+---------+------+------+----------+-------+

| ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA |

+----+-------------+-------+------------+-------+---------------+----------------+---------+------+------+----------+-------+

| 1 | SIMPLE | USERS | NULL | INDEX | NULL | IDX_CT_DN_DESC | 772 | NULL | 10 | 100.00 | NULL |

+----+-------------+-------+------------+-------+---------------+----------------+---------+------+------+----------+-------+
Descending Index ( Limitation )
Only Supports InnoDB Engine
Full text is not supported
They are not Buffered in Change Buffer
Invisible Index
Indexing for Performance ( Process followed Before )
Find the Query for optimisation
Create the index ( Affects Optimiser )
Evaluate the Query Performane
Retain the Index if it benefits queries
Drop the Index if it is not much benefit
Indexing for Performance ( After )
Note : Can be followed for dropping an unused index too.
Find the Query for optimisation
Create the index using Invisible as Keyword
Turn on Switch 'use_invisible-indexes=on' ( session )
Evaluate the Query Performane now.
Make the index Visible if it benefits.
Drop the Index if it is not much benefit.
Execution Plan Improvements
Execution Plan Improvements
Explain Format in Tree
Explain Analyze
Explain Format=Tree
Explain Format=Tree
Explain Format in Tree was introduced in MySQL 8.0.16
Shows Query Plans and Cost estimations
Easy understanding on internal operations
Identation helps understanding the execution orders
Explain ( Traditional / Tabular )
explain SELECT 'node' as type, node_id as id FROM node_tags WHERE k='bridge' and v='memorial' UNION SELECT 'way' as type, way_id as id FROM
way_tags WHERE k='lanes' and v='cafe' UNION SELECT 'relation' as type, relation_id as id FROM relation_tags WHERE k='tunnel' and
v='Barkingside';
+----+--------------+---------------+------------+------+---------------+------+---------+------+---------+----------+-----------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+--------------+---------------+------------+------+---------------+------+---------+------+---------+----------+-----------------+
| 1 | PRIMARY | node_tags | NULL | ALL | NULL | NULL | NULL | NULL | 822783 | 1.00 | Using where |
| 2 | UNION | way_tags | NULL | ALL | NULL | NULL | NULL | NULL | 1347360 | 1.00 | Using where |
| 3 | UNION | relation_tags | NULL | ALL | NULL | NULL | NULL | NULL | 62797 | 1.00 | Using where |
|NULL| UNION RESULT | <union1,2,3> | NULL | ALL | NULL | NULL | NULL | NULL | NULL | NULL | Using temporary |
+----+--------------+---------------+------------+------+---------------+------+---------+------+---------+----------+-----------------+
Explain Format=Tree
explain format=tree SELECT 'node' as type, node_id as id FROM node_tags WHERE k='bridge' and v='memorial' UNION SELECT 'way' as type, way_id
as id FROM
way_tags WHERE k='lanes' and v='cafe' UNION SELECT 'relation' as type, relation_id as id FROM relation_tags WHERE k='tunnel' and
v='Barkingside'G
*************************** 1. row ***************************
EXPLAIN: -> Table scan on <union temporary> (cost=0.01..281.61 rows=22329)
-> Union materialize with deduplication (cost=227556.45..227838.05 rows=22329)
-> Filter: ((node_tags.k = 'bridge') and (node_tags.v = 'memorial')) (cost=83072.55 rows=8228)
-> Table scan on node_tags (cost=83072.55 rows=822783)
-> Filter: ((way_tags.k = 'lanes') and (way_tags.v = 'cafe')) (cost=135899.00 rows=13474)
-> Table scan on way_tags (cost=135899.00 rows=1347360)
-> Filter: ((relation_tags.k = 'tunnel') and (relation_tags.v = 'Barkingside')) (cost=6351.95 rows=628)
-> Table scan on relation_tags (cost=6351.95 rows=62797)
Explain Analyze
Explain Analyze
Explain Analyse was introduced in MySQL 8.0.18
Actual Time spent on each Iterator.
Time to fetch first row
Time to fetch all rows
Better than Optimiser Trace
Explain Analyze
explain analyze SELECT 'node' as type, node_id as id FROM node_tags WHERE k='bridge' and v='memorial' UNION SELECT 'way' as type, way_id as
id FROM way_tags WHERE k='lanes' and v='cafe' UNION SELECT 'relation' as type, relation_id as id FROM relation_tags WHERE k='tunnel' and
v='Barkingside'G
*************************** 1. row ***************************
EXPLAIN: -> Table scan on <union temporary> (cost=0.01..281.61 rows=22329) (actual time=0.002..0.002 rows=0 loops=1)
-> Union materialize with deduplication (cost=227556.45..227838.05 rows=22329) (actual time=636.728..636.728 rows=0 loops=1)
-> Filter: ((node_tags.k = 'bridge') and (node_tags.v = 'memorial')) (cost=83072.55 rows=8228) (actual time=233.393..233.393 rows=0
loops=1)
-> Table scan on node_tags (cost=83072.55 rows=822783) (actual time=0.039..182.413 rows=833423 loops=1)
-> Filter: ((way_tags.k = 'lanes') and (way_tags.v = 'cafe')) (cost=135899.00 rows=13474) (actual time=385.278..385.278 rows=0
loops=1)
-> Table scan on way_tags (cost=135899.00 rows=1347360) (actual time=0.039..299.565 rows=1343477 loops=1)
-> Filter: ((relation_tags.k = 'tunnel') and (relation_tags.v = 'Barkingside')) (cost=6351.95 rows=628) (actual time=18.046..18.046
rows=0 loops=1)
-> Table scan on relation_tags (cost=6351.95 rows=62797) (actual time=0.039..14.101 rows=63220 loops=1)
Explain Analyze
Explain Tree ( Cost ) Analyze (time in ms)
Primary 83072 233
UNION 135899 385
UNION 6352 18
 UNION Result 227556  636 
Note : Analyze result is 15-30% slower than actual time
Optimiser Improvements
Optimiser Improvements
Optimiser is the brain of any RDBMS , better algorithms and better statistics will
make its intelligence better.
Histogram
Hash Joins
Histogram
Histogram
Syntax :
analyze table table_name update/drop histogram with N buckets ;
The Data distribution is not uniform
Histogram helps in Better stat to DB.
MySQL has Histogram from 8.0.3 ( before GA )
Histogram can be applied for single column / multi columns.
Histogram
Title
0
500
1,000
1,500
2,000
2,500
3,000
3,500
4,000
0 1​ 2​
​
series1
Count value
1 1 0
2 3874 1
3 116 2
Data Distribution
Histogram (Before)
Optimizer Guesstimate the row filtering is common
Histogram (After)
Row filtering has improved post Histogram
Histogram
Histograms are better than indexes at cases.
Lesser maintenance over head.
Controlled by condition_fanout_filter.
1024 is the maximum buckets allowed.
Histogram stats for table can be visualised on
COLUMN_STATISTICS ( IS table ).
Hash Join
Optimiser Improvements
Hash Join
MySQL Support Hash Join from 8.0.18
Improved further in 8.0.20 ( Left Join )
HASH Join algorithm help in better Join Optimisation than BNL.
Equi Joins are much benefitted
BNL Support was removed from MySQL 8.0.20
Hash Join
In memory Hash table
Join Buffer Size Prevents over flow
Optimiser switch hash_join=ON (can't be disabled )
Other Optimisation
	 	 	 Perfer_orderding_index
	 	 	 sub_query_to-derived
CTE ( Common Table expression )
Lateral Derived Tables
Window Function
Switches
Reach Us : Info@mydbops.com
Thank You

Weitere Àhnliche Inhalte

Was ist angesagt?

PMM database open source monitoring solution
PMM database open source monitoring solutionPMM database open source monitoring solution
PMM database open source monitoring solutionLior Altarescu
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsFrederic Descamps
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query TuningAlexander Rubin
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLJim Mlodgenski
 
[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo
[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo
[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyoyoyamasaki
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLChristian Antognini
 
Optimizing queries MySQL
Optimizing queries MySQLOptimizing queries MySQL
Optimizing queries MySQLGeorgi Sotirov
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL AdministrationEDB
 
QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0
QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0
QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0Byeong-Hyeok Yu
 
Advanced Postgres Monitoring
Advanced Postgres MonitoringAdvanced Postgres Monitoring
Advanced Postgres MonitoringDenish Patel
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQLJim Mlodgenski
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Alexey Lesovsky
 
Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performanceoysteing
 
[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
 
Vacuum in PostgreSQL
Vacuum in PostgreSQLVacuum in PostgreSQL
Vacuum in PostgreSQLRafia Sabih
 
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
[Pgday.Seoul 2021] 2. Porting Oracle UDF and OptimizationPgDay.Seoul
 
Redshift performance tuning
Redshift performance tuningRedshift performance tuning
Redshift performance tuningCarlos del Cacho
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PGConf APAC
 
Parallel Query in AWS Aurora MySQL
Parallel Query in AWS Aurora MySQLParallel Query in AWS Aurora MySQL
Parallel Query in AWS Aurora MySQLMydbops
 

Was ist angesagt? (20)

PMM database open source monitoring solution
PMM database open source monitoring solutionPMM database open source monitoring solution
PMM database open source monitoring solution
 
RivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and HistogramsRivieraJUG - MySQL Indexes and Histograms
RivieraJUG - MySQL Indexes and Histograms
 
Advanced MySQL Query Tuning
Advanced MySQL Query TuningAdvanced MySQL Query Tuning
Advanced MySQL Query Tuning
 
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQLTop 10 Mistakes When Migrating From Oracle to PostgreSQL
Top 10 Mistakes When Migrating From Oracle to PostgreSQL
 
[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo
[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo
[D14] MySQL 5.6æ™‚ä»Łăźăƒ‘ăƒ•ă‚©ăƒŒăƒžăƒłă‚čăƒăƒ„ăƒŒăƒ‹ăƒłă‚°ă€€*db tech showcase 2013 Tokyo
 
Query Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQLQuery Optimizer – MySQL vs. PostgreSQL
Query Optimizer – MySQL vs. PostgreSQL
 
Optimizing queries MySQL
Optimizing queries MySQLOptimizing queries MySQL
Optimizing queries MySQL
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0
QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0
QGISë„Œ 활용한 êł”ê°„ë¶„ì„ ìž…ëŹž ver.1.0
 
Advanced Postgres Monitoring
Advanced Postgres MonitoringAdvanced Postgres Monitoring
Advanced Postgres Monitoring
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performance
 
[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 êž°ì—…ì‚ŹëĄ€ - ì†Ąì¶˜ìž
 
Vacuum in PostgreSQL
Vacuum in PostgreSQLVacuum in PostgreSQL
Vacuum in PostgreSQL
 
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
 
Redshift performance tuning
Redshift performance tuningRedshift performance tuning
Redshift performance tuning
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
Parallel Query in AWS Aurora MySQL
Parallel Query in AWS Aurora MySQLParallel Query in AWS Aurora MySQL
Parallel Query in AWS Aurora MySQL
 

Ähnlich wie Modern query optimisation features in MySQL 8.

New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12Sergey Petrunya
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015Dave Stokes
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015Dave Stokes
 
Applied Partitioning And Scaling Your Database System Presentation
Applied Partitioning And Scaling Your Database System PresentationApplied Partitioning And Scaling Your Database System Presentation
Applied Partitioning And Scaling Your Database System PresentationRichard Crowley
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
Short Intro to PHP and MySQL
Short Intro to PHP and MySQLShort Intro to PHP and MySQL
Short Intro to PHP and MySQLJussi Pohjolainen
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatFranck Pachot
 
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...Alkin Tezuysal
 
MySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersMySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersSveta Smirnova
 
The Current State of Table API in 2022
The Current State of Table API in 2022The Current State of Table API in 2022
The Current State of Table API in 2022Flink Forward
 
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)Valeriy Kravchuk
 
Need for Speed: MySQL Indexing
Need for Speed: MySQL IndexingNeed for Speed: MySQL Indexing
Need for Speed: MySQL IndexingMYXPLAIN
 
4. Data Manipulation.ppt
4. Data Manipulation.ppt4. Data Manipulation.ppt
4. Data Manipulation.pptKISHOYIANKISH
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?Mahesh Vallampati
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
Window functions in MariaDB 10.2
Window functions in MariaDB 10.2Window functions in MariaDB 10.2
Window functions in MariaDB 10.2Sergey Petrunya
 
BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7Georgi Kodinov
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 

Ähnlich wie Modern query optimisation features in MySQL 8. (20)

New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015MySQL 5.7 Tutorial Dutch PHP Conference 2015
MySQL 5.7 Tutorial Dutch PHP Conference 2015
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015MySQL 5.7. Tutorial - Dutch PHP Conference 2015
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
 
Applied Partitioning And Scaling Your Database System Presentation
Applied Partitioning And Scaling Your Database System PresentationApplied Partitioning And Scaling Your Database System Presentation
Applied Partitioning And Scaling Your Database System Presentation
 
MySQL SQL Tutorial
MySQL SQL TutorialMySQL SQL Tutorial
MySQL SQL Tutorial
 
Explain
ExplainExplain
Explain
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Short Intro to PHP and MySQL
Short Intro to PHP and MySQLShort Intro to PHP and MySQL
Short Intro to PHP and MySQL
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor format
 
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
 
MySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for DevelopersMySQL Cookbook: Recipes for Developers
MySQL Cookbook: Recipes for Developers
 
The Current State of Table API in 2022
The Current State of Table API in 2022The Current State of Table API in 2022
The Current State of Table API in 2022
 
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
 
Need for Speed: MySQL Indexing
Need for Speed: MySQL IndexingNeed for Speed: MySQL Indexing
Need for Speed: MySQL Indexing
 
4. Data Manipulation.ppt
4. Data Manipulation.ppt4. Data Manipulation.ppt
4. Data Manipulation.ppt
 
Do You Know The 11g Plan?
Do You Know The 11g Plan?Do You Know The 11g Plan?
Do You Know The 11g Plan?
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
Window functions in MariaDB 10.2
Window functions in MariaDB 10.2Window functions in MariaDB 10.2
Window functions in MariaDB 10.2
 
BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7BGOUG15: JSON support in MySQL 5.7
BGOUG15: JSON support in MySQL 5.7
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 

Mehr von Mydbops

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024Mydbops
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Mydbops
 
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMydbops
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Mydbops
 
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15Mydbops
 
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventData-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventMydbops
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...Mydbops
 
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Mydbops
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mydbops
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLMydbops
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsMydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDBMydbops
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mydbops
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesMydbops
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsMydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLMydbops
 
Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Mydbops
 

Mehr von Mydbops (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
 
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
 
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster RecoveryMastering Aurora PostgreSQL Clusters for Disaster Recovery
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
 
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
AWS RDS in MySQL 2023 Vinoth Kanna @ Mydbops OpenSource Database Meetup 15
 
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE EventData-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
Data-at-scale-with-TIDB Mydbops Co-Founder Kabilesh PR at LSPE Event
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
 
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
Scaling-MongoDB-with-Horizontal-and-Vertical-Sharding Mydbops Opensource Data...
 
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
Mastering MongoDB Atlas: Essentials of Diagnostics and Debugging in the Cloud...
 
Data Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQLData Organisation: Table Partitioning in PostgreSQL
Data Organisation: Table Partitioning in PostgreSQL
 
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - MydbopsNavigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
Navigating MongoDB's Queryable Encryption for Ultimate Security - Mydbops
 
Data High Availability With TIDB
Data High Availability With TIDBData High Availability With TIDB
Data High Availability With TIDB
 
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
Mastering Database Migration_ Native replication (8.0) to InnoDB Cluster (8.0...
 
Enhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificatesEnhancing Security of MySQL Connections using SSL certificates
Enhancing Security of MySQL Connections using SSL certificates
 
Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops Exploring the Fundamentals of YugabyteDB - Mydbops
Exploring the Fundamentals of YugabyteDB - Mydbops
 
Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops Time series in MongoDB - Mydbops
Time series in MongoDB - Mydbops
 
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - MydbopsTiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
TiDB in a Nutshell - Power of Open-Source Distributed SQL Database - Mydbops
 
Achieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQLAchieving High Availability in PostgreSQL
Achieving High Availability in PostgreSQL
 
Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding Scaling MongoDB with Horizontal and Vertical Sharding
Scaling MongoDB with Horizontal and Vertical Sharding
 

KĂŒrzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

KĂŒrzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Modern query optimisation features in MySQL 8.

  • 1. Modern Query Optimisation Features In MySQL 8 Karthik P R CEO, Mydbops Apr 24, 2021 Mydbops Webinar
  • 2. Interested in Open Source Database technologies 11 Years of Experience with MySQL Ex-Yahoo! Tech Speaker/ Blogger  CEO Mydbops Karthik P R  About Me
  • 3. Database Consulting Services Managed Database Services Focuses on Top Opensource database MySQL,MariaDB, MongoDB and PostgreSQL ON Premises and Cloud Mydbops Services
  • 4. MySQL 8 (A Major Leap) Indexing features Execution Plan Improvements Optimiser Imporvements Others Improvements Agenda
  • 5. MySQL 8 is a Major Leap
  • 6. MySQL 8 is a Major Leap MySQL 8 InnoDB Performance Enhancement Faster Parallel Replication Security Enhancements Operational Improvements ( Shell,Clone Plugin ) CTE , Window Function and Lateral Derived tables
  • 10. Functional Index MySQL do Support Functional Index 8.0.13 A functional key part of queries can be indexed JSON based Queries benefits a lot
  • 11. Functional Index ( Before ) EXPLAIN SELECT VERSION,TILE FROM NODES_BACKUP WHERE DATE(TIMESTAMP)='2021-04-04'; +----+-------------+--------------+------------+------+---------------+------+---------+------+----------+----------+-------------+ | ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA | +----+-------------+--------------+------------+------+---------------+------+---------+------+----------+----------+-------------+ | 1 | SIMPLE | NODES_BACKUP | NULL | ALL | NULL | NULL | NULL | NULL | 47378283 | 100.00 | USING WHERE | +----+-------------+--------------+------------+------+---------------+------+---------+------+----------+----------+-------------+ ROWS SCANNED : 47M TYPE : FULL TABLE SCAN
  • 12. Functional Index ( Possible Solutions ) Query Rewrites Application Rewrites Rewriter Plugin ProxySQL Rewrites Virtual Column ( Again needs a Rewrite )
  • 13. Functional Index ( After ) CREATE INDEX IDX_FUN_DATE ON NODES_BACKUP((DATE(TIMESTAMP))) QUERY OK, 0 ROWS AFFECTED (5 MIN 30.38 SEC) RECORDS: 0 DUPLICATES: 0 WARNINGS: 0 SELECT VERSION,TILE FROM NODES_BACKUP WHERE DATE(TIMESTAMP)='2021-04-04'; +----+-------------+--------------+------------+------+---------------+--------------+---------+-------+------+----------+-------+ | ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA | +----+-------------+--------------+------------+------+---------------+--------------+---------+-------+------+----------+-------+ | 1 | SIMPLE | NODES_BACKUP | NULL | REF | IDX_FUN_DATE | IDX_FUN_DATE | 4 | CONST | 423 | 100.00 | NULL | +----+-------------+--------------+------------+------+---------------+--------------+---------+-------+------+----------+-------+ 1 ROW IN SET, 1 WARNING (0.01 SEC)
  • 15. Descending Index MySQL do Support Functional Index 8.0 B+Tree Indexing ( InnoDB ) Index are generally Forward Scan Queries with different sorting orders are benefited a lot ASC / DESC Keywords must be used while indexing Idenitify the queries for optimisation via "Backward index scan" in Extra filed.
  • 16. Descending Index EXPLAIN SELECT EMAIL,DESCRIPTION FROM USERS ORDER BY CREATION_TIME DESC ,DISPLAY_NAME DESC LIMIT 10; +----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+ | ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA | +----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+ | 1 | SIMPLE | USERS | NULL | ALL | NULL | NULL | NULL | NULL | 3941 | 100.00 | USING FILESORT | +----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+ CREATE INDEX IDX_CT_DN ON USERS(CREATION_TIME,DISPLAY_NAME); QUERY OK, 0 ROWS AFFECTED (0.03 SEC) EXPLAIN SELECT EMAIL,DESCRIPTION FROM USERS ORDER BY CREATION_TIME DESC ,DISPLAY_NAME DESC LIMIT 10; +----+-------------+-------+------------+-------+---------------+-----------+---------+------+------+----------+---------------------+ | ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA | +----+-------------+-------+------------+-------+---------------+-----------+---------+------+------+----------+---------------------+ | 1 | SIMPLE | USERS | NULL | INDEX | NULL | IDX_CT_DN | 772 | NULL | 10 | 100.00 | BACKWARD INDEX SCAN | +----+-------------+-------+------------+-------+---------------+-----------+---------+------+------+----------+---------------------+
  • 17. Descending Index Query uses the Composite Index ( Creation Time , Display name ) No ordering is mentioned in while Indexing Query uses Backward Scan ( Explain Plan ) But Forwards scan will have 15% Performance gain
  • 18. Descending Index CREATE INDEX IDX_CT_DN_DESC ON USERS(CREATION_TIME DESC,DISPLAY_NAME DESC); QUERY OK, 0 ROWS AFFECTED (0.03 SEC) RECORDS: 0 DUPLICATES: 0 WARNINGS: 0 EXPLAIN SELECT EMAIL,DESCRIPTION FROM USERS ORDER BY CREATION_TIME DESC ,DISPLAY_NAME DESC LIMIT 10; +----+-------------+-------+------------+-------+---------------+----------------+---------+------+------+----------+-------+ | ID | SELECT_TYPE | TABLE | PARTITIONS | TYPE | POSSIBLE_KEYS | KEY | KEY_LEN | REF | ROWS | FILTERED | EXTRA | +----+-------------+-------+------------+-------+---------------+----------------+---------+------+------+----------+-------+ | 1 | SIMPLE | USERS | NULL | INDEX | NULL | IDX_CT_DN_DESC | 772 | NULL | 10 | 100.00 | NULL | +----+-------------+-------+------------+-------+---------------+----------------+---------+------+------+----------+-------+
  • 19. Descending Index ( Limitation ) Only Supports InnoDB Engine Full text is not supported They are not Buffered in Change Buffer
  • 21. Indexing for Performance ( Process followed Before ) Find the Query for optimisation Create the index ( Affects Optimiser ) Evaluate the Query Performane Retain the Index if it benefits queries Drop the Index if it is not much benefit
  • 22. Indexing for Performance ( After ) Note : Can be followed for dropping an unused index too. Find the Query for optimisation Create the index using Invisible as Keyword Turn on Switch 'use_invisible-indexes=on' ( session ) Evaluate the Query Performane now. Make the index Visible if it benefits. Drop the Index if it is not much benefit.
  • 24. Execution Plan Improvements Explain Format in Tree Explain Analyze
  • 26. Explain Format=Tree Explain Format in Tree was introduced in MySQL 8.0.16 Shows Query Plans and Cost estimations Easy understanding on internal operations Identation helps understanding the execution orders
  • 27. Explain ( Traditional / Tabular ) explain SELECT 'node' as type, node_id as id FROM node_tags WHERE k='bridge' and v='memorial' UNION SELECT 'way' as type, way_id as id FROM way_tags WHERE k='lanes' and v='cafe' UNION SELECT 'relation' as type, relation_id as id FROM relation_tags WHERE k='tunnel' and v='Barkingside'; +----+--------------+---------------+------------+------+---------------+------+---------+------+---------+----------+-----------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+--------------+---------------+------------+------+---------------+------+---------+------+---------+----------+-----------------+ | 1 | PRIMARY | node_tags | NULL | ALL | NULL | NULL | NULL | NULL | 822783 | 1.00 | Using where | | 2 | UNION | way_tags | NULL | ALL | NULL | NULL | NULL | NULL | 1347360 | 1.00 | Using where | | 3 | UNION | relation_tags | NULL | ALL | NULL | NULL | NULL | NULL | 62797 | 1.00 | Using where | |NULL| UNION RESULT | <union1,2,3> | NULL | ALL | NULL | NULL | NULL | NULL | NULL | NULL | Using temporary | +----+--------------+---------------+------------+------+---------------+------+---------+------+---------+----------+-----------------+
  • 28. Explain Format=Tree explain format=tree SELECT 'node' as type, node_id as id FROM node_tags WHERE k='bridge' and v='memorial' UNION SELECT 'way' as type, way_id as id FROM way_tags WHERE k='lanes' and v='cafe' UNION SELECT 'relation' as type, relation_id as id FROM relation_tags WHERE k='tunnel' and v='Barkingside'G *************************** 1. row *************************** EXPLAIN: -> Table scan on <union temporary> (cost=0.01..281.61 rows=22329) -> Union materialize with deduplication (cost=227556.45..227838.05 rows=22329) -> Filter: ((node_tags.k = 'bridge') and (node_tags.v = 'memorial')) (cost=83072.55 rows=8228) -> Table scan on node_tags (cost=83072.55 rows=822783) -> Filter: ((way_tags.k = 'lanes') and (way_tags.v = 'cafe')) (cost=135899.00 rows=13474) -> Table scan on way_tags (cost=135899.00 rows=1347360) -> Filter: ((relation_tags.k = 'tunnel') and (relation_tags.v = 'Barkingside')) (cost=6351.95 rows=628) -> Table scan on relation_tags (cost=6351.95 rows=62797)
  • 30. Explain Analyze Explain Analyse was introduced in MySQL 8.0.18 Actual Time spent on each Iterator. Time to fetch first row Time to fetch all rows Better than Optimiser Trace
  • 31. Explain Analyze explain analyze SELECT 'node' as type, node_id as id FROM node_tags WHERE k='bridge' and v='memorial' UNION SELECT 'way' as type, way_id as id FROM way_tags WHERE k='lanes' and v='cafe' UNION SELECT 'relation' as type, relation_id as id FROM relation_tags WHERE k='tunnel' and v='Barkingside'G *************************** 1. row *************************** EXPLAIN: -> Table scan on <union temporary> (cost=0.01..281.61 rows=22329) (actual time=0.002..0.002 rows=0 loops=1) -> Union materialize with deduplication (cost=227556.45..227838.05 rows=22329) (actual time=636.728..636.728 rows=0 loops=1) -> Filter: ((node_tags.k = 'bridge') and (node_tags.v = 'memorial')) (cost=83072.55 rows=8228) (actual time=233.393..233.393 rows=0 loops=1) -> Table scan on node_tags (cost=83072.55 rows=822783) (actual time=0.039..182.413 rows=833423 loops=1) -> Filter: ((way_tags.k = 'lanes') and (way_tags.v = 'cafe')) (cost=135899.00 rows=13474) (actual time=385.278..385.278 rows=0 loops=1) -> Table scan on way_tags (cost=135899.00 rows=1347360) (actual time=0.039..299.565 rows=1343477 loops=1) -> Filter: ((relation_tags.k = 'tunnel') and (relation_tags.v = 'Barkingside')) (cost=6351.95 rows=628) (actual time=18.046..18.046 rows=0 loops=1) -> Table scan on relation_tags (cost=6351.95 rows=62797) (actual time=0.039..14.101 rows=63220 loops=1)
  • 32. Explain Analyze Explain Tree ( Cost ) Analyze (time in ms) Primary 83072 233 UNION 135899 385 UNION 6352 18  UNION Result 227556  636  Note : Analyze result is 15-30% slower than actual time
  • 34. Optimiser Improvements Optimiser is the brain of any RDBMS , better algorithms and better statistics will make its intelligence better. Histogram Hash Joins
  • 36. Histogram Syntax : analyze table table_name update/drop histogram with N buckets ; The Data distribution is not uniform Histogram helps in Better stat to DB. MySQL has Histogram from 8.0.3 ( before GA ) Histogram can be applied for single column / multi columns.
  • 38. Histogram (Before) Optimizer Guesstimate the row filtering is common
  • 39. Histogram (After) Row filtering has improved post Histogram
  • 40. Histogram Histograms are better than indexes at cases. Lesser maintenance over head. Controlled by condition_fanout_filter. 1024 is the maximum buckets allowed. Histogram stats for table can be visualised on COLUMN_STATISTICS ( IS table ).
  • 43. Hash Join MySQL Support Hash Join from 8.0.18 Improved further in 8.0.20 ( Left Join ) HASH Join algorithm help in better Join Optimisation than BNL. Equi Joins are much benefitted BNL Support was removed from MySQL 8.0.20
  • 44. Hash Join In memory Hash table Join Buffer Size Prevents over flow Optimiser switch hash_join=ON (can't be disabled )
  • 45. Other Optimisation Perfer_orderding_index sub_query_to-derived CTE ( Common Table expression ) Lateral Derived Tables Window Function Switches
  • 46. Reach Us : Info@mydbops.com Thank You