SlideShare a Scribd company logo
INNODB MERGE/SPLIT PAGES
Marco Tusa
September 2020
3
• Open source enthusiast
• MySQL tech lead; principal architect
• Working in DB world over 33 years
• Open source developer and community contributor
About Me
WHY WE SHOULD CARE?
• MySQL/InnoDB constantly performs SPLIT and MERGE operations
• We have very limited visibility of them.
• The sad story is there is also very little we can do to optimize this on the server side
using parameters or some other magic.
• But the good news is there is A LOT that can be done at design time.
• Use a proper Primary Key and design a secondary index, keeping in mind that
you shouldn’t abuse of them.
• Plan proper maintenance windows on the tables that you know will have very
high levels of inserts/deletes/updates.
DISCLAIMER
Mumbo
Jumbo
ahead
THE MATRYOSHKA DOLL
[split]>select id, uuid,processid,points, date, active,time, substring(short,1,4) short,substring(longc,1,4) longc from tbinc
limit 5 ;
+----+--------------------------------------+-----------+--------+------------+--------+---------------------+-------+-------+
| id | uuid | processid | points | date | active | time | short | longc |
+----+--------------------------------------+-----------+--------+------------+--------+---------------------+-------+-------+
| 1 | 1c0bc1cc-ef69-11ea-ad30-9eca1c2a7efa | 127 | 2707 | 2020-04-01 | 1 | 2020-09-05 13:15:30 | That | Whic |
| 2 | 1c0bc1b8-ef69-11ea-ad30-9eca1c2a7efa | 136 | 1810 | 2020-04-01 | 1 | 2020-09-05 13:15:30 | That | All |
| 3 | 1c0bc172-ef69-11ea-ad30-9eca1c2a7efa | 163 | 4752 | 2020-04-01 | 0 | 2020-09-05 13:15:30 | That | When |
| 4 | 1c0bc17c-ef69-11ea-ad30-9eca1c2a7efa | 71 | 3746 | 2020-04-01 | 1 | 2020-09-05 13:15:30 | That | 87F |
| 5 | 1c5b0002-ef69-11ea-ad30-9eca1c2a7efa | 14 | 2339 | 2020-04-01 | 0 | 2020-09-05 13:15:31 | That | adve |
+----+--------------------------------------+-----------+--------+------------+--------+---------------------+-------+-------+
THE MATRYOSHKA DOLL
A well-known statement
“Inside InnoDB all is an INDEX”
What it means?
In the examples we will use:
Schema: split
Tables:
tbinc
tbpcid
tbUUID
data/split/
|-- db.opt
|-- tbinc.frm
|-- tbinc.ibd
|-- tbpcid.frm
|-- tbpcid.ibd
|-- tbUUID.frm
`-- tbUUID.ibd
THE MATRYOSHKA DOLL
➤ data is in one segment and each associated
index is in its own segment. Segments grow
and shrink as data is inserted and deleted.
When a segment needs more room, it is
extended by one extent (1 megabyte) at a time.
➤ A group of pages within a tablespace. Extent
size is always 1MB.
➤ A page can contain one or more rows,
depending on how much data is in each row. If
a row does not fit entirely into a single page,
InnoDB sets up additional pointer-style data
structures so that the information about the
row can be stored in one page.
➤ Maximum row size for the default
innodb_page_size of 16KB is about 8000 bytes
INNODB B-TREE
➤ InnoDB uses B-trees to organize your data inside pages across extents, within segments.
➤ Roots, Branches, and Leaves
➤ Each page (leaf) contains 2-N rows(s) organized by the primary key. The tree has special
pages to manage the different branch(es). These are known as internal nodes (INodes).
LEAVES AS LINKED LIST
➤ Pages are also referenced as linked list
➤ Linked list follow the logical order of the index (or Primary Key)
➤ Linked list order may not follow the phisical order of the pages in the extents
Next Page #7
Page #6
Next Page #8
Page #7
Previous
Page #6
Next
Page #120
Page #8
Previous
Page #7
Next
Page #12
Page
#120
Previous
Page #8
Page
#N
A RECORD IN A PAGE - TBINC
ROOT NODE #3: 169 records, 2873 bytes
NODE POINTER RECORD ≥ (id=2) → #6
LEAF NODE #6: 12 records, 7560 bytes
RECORD: (id=2) →
(uuid="a993ee0c-e7a4-11ea-bde9-08002734ed50",
processid=14,
points=3531,
date="2020-04-01",
short="Art.. have",
longc="France.. To-mo",
active=1,
time="2020-08-26 14:01:39")
RECORD: (id=5) → …
NODE POINTER RECORD ≥ (id=38) → #7
LEAF NODE #7: 24 records, 15120 bytes
RECORD: (id=38) →
CREATE TABLE `tbinc` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`processid` smallint(6) NOT NULL,
`points` int(11) NOT NULL,
`date` date NOT NULL,
`short` varchar(50) NOT NULL,
`longc` varchar(500)NOT NULL,
`active` tinyint(2) NOT NULL DEFAULT '1',
`time` timestamp NOT NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `IDX_processid` (`processid`,`active`),
KEY `IDX_active` (`id`,`active`)
) ENGINE=InnoDB
A RECORD IN A PAGE - TBPCID
ROOT NODE #3: 270 records, 5130 bytes
NODE POINTER RECORD ≥ (processid=7, id=17) → #6
LEAF NODE #6: 24 records, 14901 bytes
RECORD: (processid=0, id=137) →
(uuid="ad1353d3-e7a4-11ea-bde9-08002734ed50",
points=3729,
date="2020-04-01",
short="Nor ... the",
longc="From ...",
active=1,
time="2020-08-26 14:01:45")
NODE POINTER RECORD ≥ (processid=1, id=3827) →
#209
LEAF NODE #209: 15 records, 9450 bytes
RECORD: (processid=1, id=3827) →
Create Table: CREATE TABLE `tbpcid` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`processid` smallint(6) NOT NULL,
`points` int(11) NOT NULL,
`date` date NOT NULL,
`short` varchar(50) NOT NULL,
`longc` varchar(500)NOT NULL,
`active` tinyint(2) NOT NULL DEFAULT '1',
`time` timestamp NOT NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`processid`,`id`),
KEY `IDX_id` (`id`),
KEY `IDX_mid` (`processid`,`active`)
) ENGINE=InnoDB
A RECORD IN A PAGE - TBUUID
ROOT NODE #3: 235 records, 11280 bytes
NODE POINTER RECORD ≥ (uuid="05de43720080-9edb-
ae11-268e-0d216866", processid=12) → #6
LEAF NODE #6: 24 records, 15120 bytes
RECORD:
(uuid="05de43720080-9edb-ae11-268e-00252077",
processid=73) →
(id=632,
points=3740,
date="2020-01-10",
short="So ... p",
longc="The s.. w",
active=0,
time="2020-08-27 12:40:18")
NODE POINTER RECORD ≥ (uuid="05de43720080-9edb-
ae11-268e-03b393c6", processid=192) → #136
LEAF NODE #136: 4 records, 2520 bytes
RECORD: (uuid="05de43720080-9edb-ae11-268e-
03b393c6", processid=192) →
Create Table: CREATE TABLE `tbUUID` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`processid` smallint(6) NOT NULL,
`points` int(11) NOT NULL,
`date` date NOT NULL,
`short` varchar(50) NOT NULL,
`longc` varchar(500) NOT NULL,
`active` tinyint(2) NOT NULL DEFAULT '1',
`time` timestamp NOT NULL DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`uuid`,`processid`),
UNIQUE KEY `IDX_id` (`id`),
KEY `IDX_mid` (`processid`,`active`)
) ENGINE=InnoDB
SEGMENTS, EXTENTS
AND PAGES
Same number of rows.
Different physical distribution:
PK tbinc: id autoinc
PK tbpcid: process id, id
PK tbUUID: reverse UUID,
process id
SEGMENTS, EXTENTS
AND PAGES
Same number of rows.
Different physical distribution:
PK tbinc: id autoinc
PK tbpcid: process id, id
PK tbUUID: reverse UUID,
process id
REMINDER
The concept here is that while you organize your data in
tables and rows, InnoDB organizes it in branches, pages,
and records.
It is very important to keep in mind that InnoDB does not
work on a single row basis.
InnoDB always operates on pages.
Once a page is loaded, it will then scan the page for the
requested row/record.
PAGE INTERNALS
A page can be empty or fully filled (100%).
The row-records will be organized by PK. For example, if your table is using
an AUTO_INCREMENT, you will have the sequence ID = 1, 2, 3, 4, etc.
A page also has another important attribute: MERGE_THRESHOLD. The default value of
this parameter is 50% of the page, and it plays a very important role in InnoDB merge
activity.
PAGE INTERNALS
While you insert data, the page is filled up sequentially if the incoming record can be
accommodated inside the page.
PAGE INTERNALS
When a page is full, the next record will be inserted into the NEXT page (SPLIT counter
incremented):
Browse is not only top down but also by linked list, page #6 refer to #5 and #7
But what happens if I start to delete values?
PAGE MERGES
When you delete a record, the record is not physically deleted. Instead, it flags the
record as deleted and the space it used becomes reclaimable.
When a page has received enough deletes to match the MERGE_THRESHOLD (50% of the
page size by default), InnoDB starts to look to the closest pages (NEXT and PREVIOUS) to
see if there is any chance to optimize the space utilization by merging the two pages.
PAGE INTERNALS
In this example, Page #6 is utilizing less than half of its space. Page #5 received many
deletes and is also now less than 50% used. From InnoDB’s perspective, they are
mergeable:
The merge operation results in Page #5 containing its previous data plus the data from Page
#6
Page #6 will be empty after the merge
THE TAKEOUT
The rule is: Merges happen on delete and update operations involving close
linked pages.
If a merge operation is successful, the index_page_merge_successful metric in
INFORMATION_SCHEMA.INNODB_METRICS is incremented.
select name,count from INFORMATION_SCHEMA.INNODB_METRICS where name like 'index_page%';
+-----------------------------+--------+
| name | count |
+-----------------------------+--------+
| index_page_splits | 25391 |
| index_page_merge_attempts | 135259 |
| index_page_merge_successful | 15534 |
| index_page_reorg_attempts | 83949 |
| index_page_reorg_successful | 83949 |
| index_page_discards | 29 |
+-----------------------------+--------+
PAGE SPLIT
As mentioned above, a
page can be filled up to
100%. When this happens,
the next page takes new
records.
PAGE SPLIT
When next Page is full
split will happen
Records from page #10 will be moved to the split page #12 up to the merge threshold.
PAGE SPLIT
What InnoDB will do is (simplifying):
➤ Create a new page
➤ Identify where the original page (Page #10) can be split (at the record level)
➤ Move records
➤ Redefine the page relationships
Page #11 stays as it is.
The thing that changes is the relationship
between the pages:
• Page #10 will have Prev=9 and Next=12
• Page #12 Prev=10 and Next=11
• Page #11 Prev=12 and Next=13
THE TAKEOUT
The rule is: Page splits happens on Insert or Update, and cause page
dislocation (in many cases on different extents).
If a merge operation is successful, the index_page_splits,
index_page_reorg_attempts / successful metrics in
INFORMATION_SCHEMA.INNODB_METRICS is incremented.
select name,count from INFORMATION_SCHEMA.INNODB_METRICS where name like 'index_page%';
+-----------------------------+--------+
| name | count |
+-----------------------------+--------+
| index_page_splits | 25391 |
| index_page_merge_attempts | 135259 |
| index_page_merge_successful | 15534 |
| index_page_reorg_attempts | 83949 |
| index_page_reorg_successful | 83949 |
| index_page_discards | 29 |
+-----------------------------+--------+
LET US VISUALIZE - AUTOINCREMENT
• Insert
• Update
• Delete
LET US VISUALIZE - PROCESSED - INC
• Insert
• Update
• Delete
LET US VISUALIZE - REVERSE UUID
• Insert
• Update
• Delete
LET US VISUALIZE – AFTER OPTIMIZE
SOME GRAPHS AND NUMBERS – SPLITS
The first case will have more
“compact” data distribution.
This means it will also have
better space utilization,
while Processid with
autoinc, and the semi-
random nature of the UUID
will cause a significant
“sparse” page distribution
(causing a higher number of
pages and related split
operations).
Autoinc processid-AutoInc Reverse UUID-processid
Splits 2472 7881 6569
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
Splits
SOME GRAPHS AND NUMBERS – MERGES
auto-increment has less page
merge attempts and success
ratio than the other two
types. The PK with
Processis-autoinc (on the
side other of the spectrum)
has a higher number of
merge attempts, but at the
same time also a
significantly higher success
ratio at 16,42%, given that
the “sparse” distribution left
many pages partially empty.
3697
32974 34521
295
5414 3454
7,98
16,42
10,01
0,00
2,00
4,00
6,00
8,00
10,00
12,00
14,00
16,00
18,00
0
5000
10000
15000
20000
25000
30000
35000
40000
45000
Ins-Del-Up Ins-Del-Up Ins-Del-Up
AutoInc processid-AutoInc Reverse UUID-processid
Merges
index_page_merge_attempts index_page_merge_successful Merge_success_ratio
SO WHAT?
During merge and split operations, InnoDB acquires an x-latch to the
index tree.
On a busy system, this can easily become a source of concern.
This can cause index latch contention.
If no merges and splits (aka writes) touch only a single page, this is called
an “optimistic” update in InnoDB, and the latch is only taken in S.
Merges and splits are called “pessimistic” updates, and take the latch in X.
CONCLUSIONS
➤ MySQL/InnoDB constantly performs these operations, and you have very limited visibility of them.
But they can bite you, and bite hard, especially if using a spindle storage VS SSD (which have
different issues, by the way).
➤ The sad story is there is also very little we can do to optimize this on the server side using
parameters or some other magic. But the good news is there is A LOT that can be done at design
time.
➤ Use a proper Primary Key and design a secondary index, keeping in mind that you shouldn’t abuse
of them. Plan proper maintenance windows on the tables that you know will have very high levels of
inserts/deletes/updates.
➤ This is an important point to keep in mind. In InnoDB you cannot have fragmented records, but you
can have a nightmare at the page-extent level. Ignoring table maintenance will cause more work at
the IO level, memory and InnoDB buffer pool.
➤ You must rebuild some tables at regular intervals. Use whatever tricks it requires, including
partitioning and external tools (pt-osc). Do not let a table to become gigantic and fully fragmented.
➤ Wasting disk space? Need to load three pages instead one to retrieve the record set you need? Each
search causes significantly more reads?
That’s your fault; there is no excuse for being sloppy!
MySQL innoDB split and merge pages
MySQL innoDB split and merge pages
MySQL innoDB split and merge pages

More Related Content

What's hot

RocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesRocksDB Performance and Reliability Practices
RocksDB Performance and Reliability Practices
Yoshinori Matsunobu
 
Apache Spark Architecture
Apache Spark ArchitectureApache Spark Architecture
Apache Spark Architecture
Alexey Grishchenko
 
Dynamic Partition Pruning in Apache Spark
Dynamic Partition Pruning in Apache SparkDynamic Partition Pruning in Apache Spark
Dynamic Partition Pruning in Apache Spark
Databricks
 
InnoDB MVCC Architecture (by 권건우)
InnoDB MVCC Architecture (by 권건우)InnoDB MVCC Architecture (by 권건우)
InnoDB MVCC Architecture (by 권건우)
I Goo Lee.
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
SolarWinds
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
John Beresniewicz
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
Databricks
 
Top 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsTop 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applications
hadooparchbook
 
MySQL Buffer Management
MySQL Buffer ManagementMySQL Buffer Management
MySQL Buffer Management
MIJIN AN
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
I Goo Lee
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
Norvald Ryeng
 
Low Level CPU Performance Profiling Examples
Low Level CPU Performance Profiling ExamplesLow Level CPU Performance Profiling Examples
Low Level CPU Performance Profiling Examples
Tanel Poder
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
Flink Forward
 
Apache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsApache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic Datasets
Alluxio, Inc.
 
Optimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsOptimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL Joins
Databricks
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Databricks
 
Apache Hudi: The Path Forward
Apache Hudi: The Path ForwardApache Hudi: The Path Forward
Apache Hudi: The Path Forward
Alluxio, Inc.
 
Making Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta LakeMaking Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta Lake
Databricks
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Noritaka Sekiyama
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
Frederic Descamps
 

What's hot (20)

RocksDB Performance and Reliability Practices
RocksDB Performance and Reliability PracticesRocksDB Performance and Reliability Practices
RocksDB Performance and Reliability Practices
 
Apache Spark Architecture
Apache Spark ArchitectureApache Spark Architecture
Apache Spark Architecture
 
Dynamic Partition Pruning in Apache Spark
Dynamic Partition Pruning in Apache SparkDynamic Partition Pruning in Apache Spark
Dynamic Partition Pruning in Apache Spark
 
InnoDB MVCC Architecture (by 권건우)
InnoDB MVCC Architecture (by 권건우)InnoDB MVCC Architecture (by 권건우)
InnoDB MVCC Architecture (by 권건우)
 
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
Stop the Chaos! Get Real Oracle Performance by Query Tuning Part 1
 
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
 
Top 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsTop 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applications
 
MySQL Buffer Management
MySQL Buffer ManagementMySQL Buffer Management
MySQL Buffer Management
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
 
Low Level CPU Performance Profiling Examples
Low Level CPU Performance Profiling ExamplesLow Level CPU Performance Profiling Examples
Low Level CPU Performance Profiling Examples
 
Evening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in FlinkEvening out the uneven: dealing with skew in Flink
Evening out the uneven: dealing with skew in Flink
 
Apache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsApache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic Datasets
 
Optimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsOptimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL Joins
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 
Apache Hudi: The Path Forward
Apache Hudi: The Path ForwardApache Hudi: The Path Forward
Apache Hudi: The Path Forward
 
Making Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta LakeMaking Apache Spark Better with Delta Lake
Making Apache Spark Better with Delta Lake
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 

Similar to MySQL innoDB split and merge pages

15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance
guest9912e5
 
MySQL Indexing
MySQL IndexingMySQL Indexing
MySQL Indexing
BADR
 
Индексируем базу: как делать хорошо и не делать плохо Winter saint p 2021 m...
Индексируем базу: как делать хорошо и не делать плохо   Winter saint p 2021 m...Индексируем базу: как делать хорошо и не делать плохо   Winter saint p 2021 m...
Индексируем базу: как делать хорошо и не делать плохо Winter saint p 2021 m...
Андрей Новиков
 
MongoDB Europe 2016 - Big Data meets Big Compute
MongoDB Europe 2016 - Big Data meets Big ComputeMongoDB Europe 2016 - Big Data meets Big Compute
MongoDB Europe 2016 - Big Data meets Big Compute
MongoDB
 
Star schema my sql
Star schema   my sqlStar schema   my sql
Star schema my sql
deathsubte
 
Db2 performance tuning for dummies
Db2 performance tuning for dummiesDb2 performance tuning for dummies
Db2 performance tuning for dummies
Angel Dueñas Neyra
 
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 20197 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
Dave Stokes
 
Kill mysql-performance
Kill mysql-performanceKill mysql-performance
Kill mysql-performance
kriptonium
 
Challenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop EngineChallenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop Engine
Nicolas Morales
 
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
Dave Stokes
 
MongoDB 3.2 - a giant leap. What’s new?
MongoDB 3.2 - a giant leap. What’s new?MongoDB 3.2 - a giant leap. What’s new?
MongoDB 3.2 - a giant leap. What’s new?
Binary Studio
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy
Ryan Robson
 
Optimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usageOptimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usage
Zarafa
 
Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics
MongoDB
 
Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"
Lviv Startup Club
 
MySQL configuration - The most important Variables
MySQL configuration - The most important VariablesMySQL configuration - The most important Variables
MySQL configuration - The most important Variables
FromDual GmbH
 
MongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB Aggregation Performance
MongoDB Aggregation Performance
MongoDB
 
Challenges of Implementing an Advanced SQL Engine on Hadoop
Challenges of Implementing an Advanced SQL Engine on HadoopChallenges of Implementing an Advanced SQL Engine on Hadoop
Challenges of Implementing an Advanced SQL Engine on Hadoop
DataWorks Summit
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Citus Data
 
Btree. Explore the heart of PostgreSQL.
Btree. Explore the heart of PostgreSQL. Btree. Explore the heart of PostgreSQL.
Btree. Explore the heart of PostgreSQL.
Anastasia Lubennikova
 

Similar to MySQL innoDB split and merge pages (20)

15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance
 
MySQL Indexing
MySQL IndexingMySQL Indexing
MySQL Indexing
 
Индексируем базу: как делать хорошо и не делать плохо Winter saint p 2021 m...
Индексируем базу: как делать хорошо и не делать плохо   Winter saint p 2021 m...Индексируем базу: как делать хорошо и не делать плохо   Winter saint p 2021 m...
Индексируем базу: как делать хорошо и не делать плохо Winter saint p 2021 m...
 
MongoDB Europe 2016 - Big Data meets Big Compute
MongoDB Europe 2016 - Big Data meets Big ComputeMongoDB Europe 2016 - Big Data meets Big Compute
MongoDB Europe 2016 - Big Data meets Big Compute
 
Star schema my sql
Star schema   my sqlStar schema   my sql
Star schema my sql
 
Db2 performance tuning for dummies
Db2 performance tuning for dummiesDb2 performance tuning for dummies
Db2 performance tuning for dummies
 
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 20197 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
7 Database Mistakes YOU Are Making -- Linuxfest Northwest 2019
 
Kill mysql-performance
Kill mysql-performanceKill mysql-performance
Kill mysql-performance
 
Challenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop EngineChallenges of Building a First Class SQL-on-Hadoop Engine
Challenges of Building a First Class SQL-on-Hadoop Engine
 
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
 
MongoDB 3.2 - a giant leap. What’s new?
MongoDB 3.2 - a giant leap. What’s new?MongoDB 3.2 - a giant leap. What’s new?
MongoDB 3.2 - a giant leap. What’s new?
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy
 
Optimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usageOptimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usage
 
Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics Precog & MongoDB User Group: Skyrocket Your Analytics
Precog & MongoDB User Group: Skyrocket Your Analytics
 
Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"
 
MySQL configuration - The most important Variables
MySQL configuration - The most important VariablesMySQL configuration - The most important Variables
MySQL configuration - The most important Variables
 
MongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB Aggregation Performance
MongoDB Aggregation Performance
 
Challenges of Implementing an Advanced SQL Engine on Hadoop
Challenges of Implementing an Advanced SQL Engine on HadoopChallenges of Implementing an Advanced SQL Engine on Hadoop
Challenges of Implementing an Advanced SQL Engine on Hadoop
 
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
Data Modeling, Normalization, and De-Normalization | PostgresOpen 2019 | Dimi...
 
Btree. Explore the heart of PostgreSQL.
Btree. Explore the heart of PostgreSQL. Btree. Explore the heart of PostgreSQL.
Btree. Explore the heart of PostgreSQL.
 

More from Marco Tusa

Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Marco Tusa
 
My sql on kubernetes demystified
My sql on kubernetes demystifiedMy sql on kubernetes demystified
My sql on kubernetes demystified
Marco Tusa
 
Comparing high availability solutions with percona xtradb cluster and percona...
Comparing high availability solutions with percona xtradb cluster and percona...Comparing high availability solutions with percona xtradb cluster and percona...
Comparing high availability solutions with percona xtradb cluster and percona...
Marco Tusa
 
Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...
Marco Tusa
 
Best practice-high availability-solution-geo-distributed-final
Best practice-high availability-solution-geo-distributed-finalBest practice-high availability-solution-geo-distributed-final
Best practice-high availability-solution-geo-distributed-final
Marco Tusa
 
Robust ha solutions with proxysql
Robust ha solutions with proxysqlRobust ha solutions with proxysql
Robust ha solutions with proxysql
Marco Tusa
 
Fortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleuFortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleu
Marco Tusa
 
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Marco Tusa
 
Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...
Marco Tusa
 
Improve aws withproxysql
Improve aws withproxysqlImprove aws withproxysql
Improve aws withproxysql
Marco Tusa
 
Fortify aws aurora_proxy
Fortify aws aurora_proxyFortify aws aurora_proxy
Fortify aws aurora_proxy
Marco Tusa
 
Mysql8 advance tuning with resource group
Mysql8 advance tuning with resource groupMysql8 advance tuning with resource group
Mysql8 advance tuning with resource group
Marco Tusa
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql sharding
Marco Tusa
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deployment
Marco Tusa
 
Sync rep aurora_2016
Sync rep aurora_2016Sync rep aurora_2016
Sync rep aurora_2016
Marco Tusa
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
Marco Tusa
 
Empower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instrumentsEmpower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instruments
Marco Tusa
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3
Marco Tusa
 
Plmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalPlmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_final
Marco Tusa
 
Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2
Marco Tusa
 

More from Marco Tusa (20)

Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
 
My sql on kubernetes demystified
My sql on kubernetes demystifiedMy sql on kubernetes demystified
My sql on kubernetes demystified
 
Comparing high availability solutions with percona xtradb cluster and percona...
Comparing high availability solutions with percona xtradb cluster and percona...Comparing high availability solutions with percona xtradb cluster and percona...
Comparing high availability solutions with percona xtradb cluster and percona...
 
Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...Accessing data through hibernate: what DBAs should tell to developers and vic...
Accessing data through hibernate: what DBAs should tell to developers and vic...
 
Best practice-high availability-solution-geo-distributed-final
Best practice-high availability-solution-geo-distributed-finalBest practice-high availability-solution-geo-distributed-final
Best practice-high availability-solution-geo-distributed-final
 
Robust ha solutions with proxysql
Robust ha solutions with proxysqlRobust ha solutions with proxysql
Robust ha solutions with proxysql
 
Fortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleuFortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleu
 
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
Accessing Data Through Hibernate; What DBAs Should Tell Developers and Vice V...
 
Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...Are we there Yet?? (The long journey of Migrating from close source to opens...
Are we there Yet?? (The long journey of Migrating from close source to opens...
 
Improve aws withproxysql
Improve aws withproxysqlImprove aws withproxysql
Improve aws withproxysql
 
Fortify aws aurora_proxy
Fortify aws aurora_proxyFortify aws aurora_proxy
Fortify aws aurora_proxy
 
Mysql8 advance tuning with resource group
Mysql8 advance tuning with resource groupMysql8 advance tuning with resource group
Mysql8 advance tuning with resource group
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql sharding
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deployment
 
Sync rep aurora_2016
Sync rep aurora_2016Sync rep aurora_2016
Sync rep aurora_2016
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynote
 
Empower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instrumentsEmpower my sql server administration with 5.7 instruments
Empower my sql server administration with 5.7 instruments
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3
 
Plmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalPlmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_final
 
Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2Scaling with sync_replication using Galera and EC2
Scaling with sync_replication using Galera and EC2
 

Recently uploaded

一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
u86oixdj
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
g4dpvqap0
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
mzpolocfi
 

Recently uploaded (20)

一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
原版制作(Deakin毕业证书)迪肯大学毕业证学位证一模一样
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
 

MySQL innoDB split and merge pages

  • 1. INNODB MERGE/SPLIT PAGES Marco Tusa September 2020
  • 2. 3 • Open source enthusiast • MySQL tech lead; principal architect • Working in DB world over 33 years • Open source developer and community contributor About Me
  • 3. WHY WE SHOULD CARE? • MySQL/InnoDB constantly performs SPLIT and MERGE operations • We have very limited visibility of them. • The sad story is there is also very little we can do to optimize this on the server side using parameters or some other magic. • But the good news is there is A LOT that can be done at design time. • Use a proper Primary Key and design a secondary index, keeping in mind that you shouldn’t abuse of them. • Plan proper maintenance windows on the tables that you know will have very high levels of inserts/deletes/updates.
  • 5. THE MATRYOSHKA DOLL [split]>select id, uuid,processid,points, date, active,time, substring(short,1,4) short,substring(longc,1,4) longc from tbinc limit 5 ; +----+--------------------------------------+-----------+--------+------------+--------+---------------------+-------+-------+ | id | uuid | processid | points | date | active | time | short | longc | +----+--------------------------------------+-----------+--------+------------+--------+---------------------+-------+-------+ | 1 | 1c0bc1cc-ef69-11ea-ad30-9eca1c2a7efa | 127 | 2707 | 2020-04-01 | 1 | 2020-09-05 13:15:30 | That | Whic | | 2 | 1c0bc1b8-ef69-11ea-ad30-9eca1c2a7efa | 136 | 1810 | 2020-04-01 | 1 | 2020-09-05 13:15:30 | That | All | | 3 | 1c0bc172-ef69-11ea-ad30-9eca1c2a7efa | 163 | 4752 | 2020-04-01 | 0 | 2020-09-05 13:15:30 | That | When | | 4 | 1c0bc17c-ef69-11ea-ad30-9eca1c2a7efa | 71 | 3746 | 2020-04-01 | 1 | 2020-09-05 13:15:30 | That | 87F | | 5 | 1c5b0002-ef69-11ea-ad30-9eca1c2a7efa | 14 | 2339 | 2020-04-01 | 0 | 2020-09-05 13:15:31 | That | adve | +----+--------------------------------------+-----------+--------+------------+--------+---------------------+-------+-------+
  • 6. THE MATRYOSHKA DOLL A well-known statement “Inside InnoDB all is an INDEX” What it means? In the examples we will use: Schema: split Tables: tbinc tbpcid tbUUID data/split/ |-- db.opt |-- tbinc.frm |-- tbinc.ibd |-- tbpcid.frm |-- tbpcid.ibd |-- tbUUID.frm `-- tbUUID.ibd
  • 7. THE MATRYOSHKA DOLL ➤ data is in one segment and each associated index is in its own segment. Segments grow and shrink as data is inserted and deleted. When a segment needs more room, it is extended by one extent (1 megabyte) at a time. ➤ A group of pages within a tablespace. Extent size is always 1MB. ➤ A page can contain one or more rows, depending on how much data is in each row. If a row does not fit entirely into a single page, InnoDB sets up additional pointer-style data structures so that the information about the row can be stored in one page. ➤ Maximum row size for the default innodb_page_size of 16KB is about 8000 bytes
  • 8. INNODB B-TREE ➤ InnoDB uses B-trees to organize your data inside pages across extents, within segments. ➤ Roots, Branches, and Leaves ➤ Each page (leaf) contains 2-N rows(s) organized by the primary key. The tree has special pages to manage the different branch(es). These are known as internal nodes (INodes).
  • 9. LEAVES AS LINKED LIST ➤ Pages are also referenced as linked list ➤ Linked list follow the logical order of the index (or Primary Key) ➤ Linked list order may not follow the phisical order of the pages in the extents Next Page #7 Page #6 Next Page #8 Page #7 Previous Page #6 Next Page #120 Page #8 Previous Page #7 Next Page #12 Page #120 Previous Page #8 Page #N
  • 10. A RECORD IN A PAGE - TBINC ROOT NODE #3: 169 records, 2873 bytes NODE POINTER RECORD ≥ (id=2) → #6 LEAF NODE #6: 12 records, 7560 bytes RECORD: (id=2) → (uuid="a993ee0c-e7a4-11ea-bde9-08002734ed50", processid=14, points=3531, date="2020-04-01", short="Art.. have", longc="France.. To-mo", active=1, time="2020-08-26 14:01:39") RECORD: (id=5) → … NODE POINTER RECORD ≥ (id=38) → #7 LEAF NODE #7: 24 records, 15120 bytes RECORD: (id=38) → CREATE TABLE `tbinc` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `uuid` char(36) NOT NULL, `processid` smallint(6) NOT NULL, `points` int(11) NOT NULL, `date` date NOT NULL, `short` varchar(50) NOT NULL, `longc` varchar(500)NOT NULL, `active` tinyint(2) NOT NULL DEFAULT '1', `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `IDX_processid` (`processid`,`active`), KEY `IDX_active` (`id`,`active`) ) ENGINE=InnoDB
  • 11. A RECORD IN A PAGE - TBPCID ROOT NODE #3: 270 records, 5130 bytes NODE POINTER RECORD ≥ (processid=7, id=17) → #6 LEAF NODE #6: 24 records, 14901 bytes RECORD: (processid=0, id=137) → (uuid="ad1353d3-e7a4-11ea-bde9-08002734ed50", points=3729, date="2020-04-01", short="Nor ... the", longc="From ...", active=1, time="2020-08-26 14:01:45") NODE POINTER RECORD ≥ (processid=1, id=3827) → #209 LEAF NODE #209: 15 records, 9450 bytes RECORD: (processid=1, id=3827) → Create Table: CREATE TABLE `tbpcid` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `uuid` char(36) NOT NULL, `processid` smallint(6) NOT NULL, `points` int(11) NOT NULL, `date` date NOT NULL, `short` varchar(50) NOT NULL, `longc` varchar(500)NOT NULL, `active` tinyint(2) NOT NULL DEFAULT '1', `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`processid`,`id`), KEY `IDX_id` (`id`), KEY `IDX_mid` (`processid`,`active`) ) ENGINE=InnoDB
  • 12. A RECORD IN A PAGE - TBUUID ROOT NODE #3: 235 records, 11280 bytes NODE POINTER RECORD ≥ (uuid="05de43720080-9edb- ae11-268e-0d216866", processid=12) → #6 LEAF NODE #6: 24 records, 15120 bytes RECORD: (uuid="05de43720080-9edb-ae11-268e-00252077", processid=73) → (id=632, points=3740, date="2020-01-10", short="So ... p", longc="The s.. w", active=0, time="2020-08-27 12:40:18") NODE POINTER RECORD ≥ (uuid="05de43720080-9edb- ae11-268e-03b393c6", processid=192) → #136 LEAF NODE #136: 4 records, 2520 bytes RECORD: (uuid="05de43720080-9edb-ae11-268e- 03b393c6", processid=192) → Create Table: CREATE TABLE `tbUUID` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `uuid` char(36) NOT NULL, `processid` smallint(6) NOT NULL, `points` int(11) NOT NULL, `date` date NOT NULL, `short` varchar(50) NOT NULL, `longc` varchar(500) NOT NULL, `active` tinyint(2) NOT NULL DEFAULT '1', `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`uuid`,`processid`), UNIQUE KEY `IDX_id` (`id`), KEY `IDX_mid` (`processid`,`active`) ) ENGINE=InnoDB
  • 13. SEGMENTS, EXTENTS AND PAGES Same number of rows. Different physical distribution: PK tbinc: id autoinc PK tbpcid: process id, id PK tbUUID: reverse UUID, process id
  • 14. SEGMENTS, EXTENTS AND PAGES Same number of rows. Different physical distribution: PK tbinc: id autoinc PK tbpcid: process id, id PK tbUUID: reverse UUID, process id
  • 15. REMINDER The concept here is that while you organize your data in tables and rows, InnoDB organizes it in branches, pages, and records. It is very important to keep in mind that InnoDB does not work on a single row basis. InnoDB always operates on pages. Once a page is loaded, it will then scan the page for the requested row/record.
  • 16. PAGE INTERNALS A page can be empty or fully filled (100%). The row-records will be organized by PK. For example, if your table is using an AUTO_INCREMENT, you will have the sequence ID = 1, 2, 3, 4, etc. A page also has another important attribute: MERGE_THRESHOLD. The default value of this parameter is 50% of the page, and it plays a very important role in InnoDB merge activity.
  • 17. PAGE INTERNALS While you insert data, the page is filled up sequentially if the incoming record can be accommodated inside the page.
  • 18. PAGE INTERNALS When a page is full, the next record will be inserted into the NEXT page (SPLIT counter incremented): Browse is not only top down but also by linked list, page #6 refer to #5 and #7 But what happens if I start to delete values?
  • 19. PAGE MERGES When you delete a record, the record is not physically deleted. Instead, it flags the record as deleted and the space it used becomes reclaimable. When a page has received enough deletes to match the MERGE_THRESHOLD (50% of the page size by default), InnoDB starts to look to the closest pages (NEXT and PREVIOUS) to see if there is any chance to optimize the space utilization by merging the two pages.
  • 20. PAGE INTERNALS In this example, Page #6 is utilizing less than half of its space. Page #5 received many deletes and is also now less than 50% used. From InnoDB’s perspective, they are mergeable: The merge operation results in Page #5 containing its previous data plus the data from Page #6 Page #6 will be empty after the merge
  • 21. THE TAKEOUT The rule is: Merges happen on delete and update operations involving close linked pages. If a merge operation is successful, the index_page_merge_successful metric in INFORMATION_SCHEMA.INNODB_METRICS is incremented. select name,count from INFORMATION_SCHEMA.INNODB_METRICS where name like 'index_page%'; +-----------------------------+--------+ | name | count | +-----------------------------+--------+ | index_page_splits | 25391 | | index_page_merge_attempts | 135259 | | index_page_merge_successful | 15534 | | index_page_reorg_attempts | 83949 | | index_page_reorg_successful | 83949 | | index_page_discards | 29 | +-----------------------------+--------+
  • 22. PAGE SPLIT As mentioned above, a page can be filled up to 100%. When this happens, the next page takes new records.
  • 23. PAGE SPLIT When next Page is full split will happen Records from page #10 will be moved to the split page #12 up to the merge threshold.
  • 24. PAGE SPLIT What InnoDB will do is (simplifying): ➤ Create a new page ➤ Identify where the original page (Page #10) can be split (at the record level) ➤ Move records ➤ Redefine the page relationships Page #11 stays as it is. The thing that changes is the relationship between the pages: • Page #10 will have Prev=9 and Next=12 • Page #12 Prev=10 and Next=11 • Page #11 Prev=12 and Next=13
  • 25. THE TAKEOUT The rule is: Page splits happens on Insert or Update, and cause page dislocation (in many cases on different extents). If a merge operation is successful, the index_page_splits, index_page_reorg_attempts / successful metrics in INFORMATION_SCHEMA.INNODB_METRICS is incremented. select name,count from INFORMATION_SCHEMA.INNODB_METRICS where name like 'index_page%'; +-----------------------------+--------+ | name | count | +-----------------------------+--------+ | index_page_splits | 25391 | | index_page_merge_attempts | 135259 | | index_page_merge_successful | 15534 | | index_page_reorg_attempts | 83949 | | index_page_reorg_successful | 83949 | | index_page_discards | 29 | +-----------------------------+--------+
  • 26. LET US VISUALIZE - AUTOINCREMENT • Insert • Update • Delete
  • 27. LET US VISUALIZE - PROCESSED - INC • Insert • Update • Delete
  • 28. LET US VISUALIZE - REVERSE UUID • Insert • Update • Delete
  • 29. LET US VISUALIZE – AFTER OPTIMIZE
  • 30. SOME GRAPHS AND NUMBERS – SPLITS The first case will have more “compact” data distribution. This means it will also have better space utilization, while Processid with autoinc, and the semi- random nature of the UUID will cause a significant “sparse” page distribution (causing a higher number of pages and related split operations). Autoinc processid-AutoInc Reverse UUID-processid Splits 2472 7881 6569 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 Splits
  • 31. SOME GRAPHS AND NUMBERS – MERGES auto-increment has less page merge attempts and success ratio than the other two types. The PK with Processis-autoinc (on the side other of the spectrum) has a higher number of merge attempts, but at the same time also a significantly higher success ratio at 16,42%, given that the “sparse” distribution left many pages partially empty. 3697 32974 34521 295 5414 3454 7,98 16,42 10,01 0,00 2,00 4,00 6,00 8,00 10,00 12,00 14,00 16,00 18,00 0 5000 10000 15000 20000 25000 30000 35000 40000 45000 Ins-Del-Up Ins-Del-Up Ins-Del-Up AutoInc processid-AutoInc Reverse UUID-processid Merges index_page_merge_attempts index_page_merge_successful Merge_success_ratio
  • 32. SO WHAT? During merge and split operations, InnoDB acquires an x-latch to the index tree. On a busy system, this can easily become a source of concern. This can cause index latch contention. If no merges and splits (aka writes) touch only a single page, this is called an “optimistic” update in InnoDB, and the latch is only taken in S. Merges and splits are called “pessimistic” updates, and take the latch in X.
  • 33. CONCLUSIONS ➤ MySQL/InnoDB constantly performs these operations, and you have very limited visibility of them. But they can bite you, and bite hard, especially if using a spindle storage VS SSD (which have different issues, by the way). ➤ The sad story is there is also very little we can do to optimize this on the server side using parameters or some other magic. But the good news is there is A LOT that can be done at design time. ➤ Use a proper Primary Key and design a secondary index, keeping in mind that you shouldn’t abuse of them. Plan proper maintenance windows on the tables that you know will have very high levels of inserts/deletes/updates. ➤ This is an important point to keep in mind. In InnoDB you cannot have fragmented records, but you can have a nightmare at the page-extent level. Ignoring table maintenance will cause more work at the IO level, memory and InnoDB buffer pool. ➤ You must rebuild some tables at regular intervals. Use whatever tricks it requires, including partitioning and external tools (pt-osc). Do not let a table to become gigantic and fully fragmented. ➤ Wasting disk space? Need to load three pages instead one to retrieve the record set you need? Each search causes significantly more reads? That’s your fault; there is no excuse for being sloppy!