SlideShare une entreprise Scribd logo
1  sur  36
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internalmysqlops
 
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOAltinity Ltd
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
InnoDB Flushing and Checkpoints
InnoDB Flushing and CheckpointsInnoDB Flushing and Checkpoints
InnoDB Flushing and CheckpointsMIJIN AN
 
Your first ClickHouse data warehouse
Your first ClickHouse data warehouseYour first ClickHouse data warehouse
Your first ClickHouse data warehouseAltinity Ltd
 
Using ClickHouse for Experimentation
Using ClickHouse for ExperimentationUsing ClickHouse for Experimentation
Using ClickHouse for ExperimentationGleb Kanterov
 
[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouseVianney FOUCAULT
 
MySQL Space Management
MySQL Space ManagementMySQL Space Management
MySQL Space ManagementMIJIN AN
 
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Databricks
 
Optimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloadsOptimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloadsdatamantra
 
Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guideRyan Blue
 
Apache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationApache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationDatabricks
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introductioncolorant
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1Federico Campoli
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversScyllaDB
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021Altinity Ltd
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAltinity Ltd
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresEDB
 

Tendances (20)

InnoDB Internal
InnoDB InternalInnoDB Internal
InnoDB Internal
 
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
InnoDB Flushing and Checkpoints
InnoDB Flushing and CheckpointsInnoDB Flushing and Checkpoints
InnoDB Flushing and Checkpoints
 
Your first ClickHouse data warehouse
Your first ClickHouse data warehouseYour first ClickHouse data warehouse
Your first ClickHouse data warehouse
 
Using ClickHouse for Experimentation
Using ClickHouse for ExperimentationUsing ClickHouse for Experimentation
Using ClickHouse for Experimentation
 
[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse
 
MySQL Space Management
MySQL Space ManagementMySQL Space Management
MySQL Space Management
 
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
 
Optimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloadsOptimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloads
 
Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guide
 
Apache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationApache Spark Core – Practical Optimization
Apache Spark Core – Practical Optimization
 
Spark shuffle introduction
Spark shuffle introductionSpark shuffle introduction
Spark shuffle introduction
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
Building ClickHouse and Making Your First Contribution: A Tutorial_06.10.2021
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
 

Similaire à 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 Performanceguest9912e5
 
MySQL Indexing
MySQL IndexingMySQL Indexing
MySQL IndexingBADR
 
Индексируем базу: как делать хорошо и не делать плохо 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 ComputeMongoDB
 
Star schema my sql
Star schema   my sqlStar schema   my sql
Star schema my sqldeathsubte
 
Db2 performance tuning for dummies
Db2 performance tuning for dummiesDb2 performance tuning for dummies
Db2 performance tuning for dummiesAngel 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 2019Dave Stokes
 
Kill mysql-performance
Kill mysql-performanceKill mysql-performance
Kill mysql-performancekriptonium
 
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 EngineNicolas 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 AnatomyRyan Robson
 
Optimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usageOptimizing InnoDB bufferpool usage
Optimizing InnoDB bufferpool usageZarafa
 
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 VariablesFromDual GmbH
 
MongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB
 
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 HadoopDataWorks 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
 

Similaire à 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.
 

Plus de 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 demystifiedMarco 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-finalMarco Tusa
 
Robust ha solutions with proxysql
Robust ha solutions with proxysqlRobust ha solutions with proxysql
Robust ha solutions with proxysqlMarco Tusa
 
Fortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleuFortify aws aurora_proxy_2019_pleu
Fortify aws aurora_proxy_2019_pleuMarco 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 withproxysqlMarco Tusa
 
Fortify aws aurora_proxy
Fortify aws aurora_proxyFortify aws aurora_proxy
Fortify aws aurora_proxyMarco Tusa
 
Mysql8 advance tuning with resource group
Mysql8 advance tuning with resource groupMysql8 advance tuning with resource group
Mysql8 advance tuning with resource groupMarco Tusa
 
Proxysql sharding
Proxysql shardingProxysql sharding
Proxysql shardingMarco Tusa
 
Geographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentGeographically dispersed perconaxtra db cluster deployment
Geographically dispersed perconaxtra db cluster deploymentMarco Tusa
 
Sync rep aurora_2016
Sync rep aurora_2016Sync rep aurora_2016
Sync rep aurora_2016Marco Tusa
 
Proxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteProxysql ha plam_2016_2_keynote
Proxysql ha plam_2016_2_keynoteMarco 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 instrumentsMarco Tusa
 
Galera explained 3
Galera explained 3Galera explained 3
Galera explained 3Marco 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_finalMarco 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 EC2Marco Tusa
 

Plus de 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
 

Dernier

Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi Call girls
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 

Dernier (20)

Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 

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!