SlideShare a Scribd company logo
1 of 91
Download to read offline
MySQL 5.1 (and more)
What's new

 Giuseppe Maxia

 MySQL Community Team Lead
about me -Giuseppe Maxia
   a.k.a. The Data Charmer
   MySQL Community Team Lead
   Long time hacking with MySQL features
   Formerly, database consultant, designer, coder.
   A passion for QA
   An even greater passion for open source
   ... and community
   Passionate blogger
   http://datacharmer.blogspot.com
MySQL 5.1 GA
MySQL 5.1 GA
MySQL 5.1 GA
MySQL 5.1 features
   Partitions              performance


   row-based replication   stability


   event scheduler         ease of use


   logs on demand          ease of use


   plugin interface        extensibility


   GENERAL PERFORMANCE     performance
What exactly is this quot;partitionsquot; thing?
 Logical splitting of tables
 Transparent to user
Remember the MERGE tables?
     MERGE TABLE         separate tables
                         risk of duplicates
                         insert in each table
                         no constraints
It isn't a merge table!
    PARTITIONED TABLE        One table
                             No risk of duplicates
                             insert in one table
                             constraints enforced
Partition pruning
1a - unpartitioned table - SINGLE RECORD



                         select *
                         from
                         table_name
                         where colx =
                         120
Partition pruning
1b - unpartitioned table - SINGLE RECORD



                         select *
                         from
                         table_name
                         where colx =
                         350
Partition pruning
1c - unpartitioned table - RANGE


                          select *
                          from
                          table_name
                          where colx
                          between 120
                          and 230
Partition pruning
2a - table partitioned by colx - SINGLE REC
     1-99


   100-199
                           select *
                           from
   200-299                 table_name
                           where colx =
   300-399                 120
   400-499

   500-599
Partition pruning
2b - table partitioned by colx - SINGLE REC
     1-99


   100-199
                           select *
                           from
   200-299                 table_name
                           where colx =
   300-399                 350
   400-499

   500-599
Partition pruning
2c - table partitioned by colx - RANGE
     1-99

                           select *
   100-199                 from
                           table_name
   200-299
                           where colx
   300-399                 between 120
                           and 230
   400-499

   500-599
Partition pruning

       EXPLAIN
       select *
before from table_name
       where colx = 120

       EXPLAIN PARTITIONS
in 5.1 select *
       from table_name
       where colx = 120
Partition pruning - unpartitioned table
explain partitions select count(*)
from table_name where colx=120G
***** 1. row ****
           id: 1
  select_type: SIMPLE
        table: table_name
   partitions:
p01,p02,p03,p04,p05,p06,p07,p08,p09
,p10,p11,p12,p13,p14,p15,p16,p17,p1
8,p19
         type: index
...
Partition pruning - unpartitioned table
explain partitions select count(*)
from table_name where colx between
120 and 230G
***** 1. row ****
           id: 1
  select_type: SIMPLE
        table: table_name
   partitions:
p01,p02,p03,p04,p05,p06,p07,p08,p09
,p10,p11,p12,p13,p14,p15,p16,p17,p1
8,p19
         type: index
...
Partition pruning - table partitioned by colx
explain partitions select count(*)
from table_name where colx between
120 and 230G
***** 1. row ****
           id: 1
  select_type: SIMPLE
        table: table_name
   partitions: p02,p03
         type: index
...
HOW TO MAKE PARTITIONS
HOW TO MAKE PARTITIONS

RTFM ...
HOW TO MAKE PARTITIONS

RTFM ...
 No, seriously, the manual has everything
HOW TO MAKE PARTITIONS

RTFM ...
 No, seriously, the manual has everything
 But if you absolutely insist ...
HOW TO MAKE PARTITIONS
CREATE TABLE t1 (
   id int
) ENGINE=InnoDB
   # or MyISAM, ARCHIVE
PARTITION BY RANGE (id)
(
  PARTITION P1 VALUES LESS THAN (10),
  PARTITION P2 VALUES LESS THAN (20)
)
                                20
HOW TO MAKE PARTITIONS
CREATE TABLE t1 (
   id int
) ENGINE=InnoDB
PARTITION BY LIST (id)
(
  PARTITION P1 VALUES IN (1,2,4),
  PARTITION P2 VALUES IN (3,5,9)
)

                                21
HOW TO MAKE PARTITIONS
CREATE TABLE t1 (
  id int not null primary key
) ENGINE=InnoDB
PARTITION BY HASH (id)
PARTITIONS 10;




                                22
HOW TO MAKE PARTITIONS
CREATE TABLE t1 (
  id int not null primary key
) ENGINE=InnoDB
PARTITION BY KEY ()
PARTITIONS 10;




                                23
Limitations
• Can partition only by INTEGER columns
• OR you can partition by an expression, which must
  return an integer
• Maximum 1024 partitions

• If you have a Unique Key or PK, the partition column
  must be part of that key
• No Foreign Key support
• No Fulltext or GIS support
                                                 24
Benchmarking partitions
   Compare results
   Unpartitioned vs partitioned
   ISOLATION
   Repeatability
   Check your resources!
Partitions with InnoDB (laptop)
 Key points:
 Takes much more storage than other engines
 engine                                storage
                                        (MB)
 innodb                                     221
 myisam                                     181
 archive                                     74
 innodb partitioned (whole)                 289
 innodb partitioned (file per table)        676
 myisam partitioned                         182
 archive partitioned                         72
Benchmarking results (laptop)
   engine                query year   query year
                         2000         2002
   InnoDB                    1.25         1.25

   MyISAM                    1.72         1.73

   Archive                   2.47         2.45

   InnoDB partitioned        0.24         0.10
   whole
   InnoDB Partitioned        0.45         0.10
   (file per table)
   MyISAM partitioned        0.18         0.12

   Archive partitioned       0.22         0.12
Partitions with InnoDB (huge server)
 Key points:
 Takes much more storage than other engines
 engine                                storage
                                         (GB)
 innodb (with PK)                           330
 myisam (with PK)                           141
 archive                                      13
 innodb partitioned (no PK)                 237
 myisam partitioned (no PK)                 107
 archive partitioned                          13
Benchmarking results (huge server)
engine                         6 month range
InnoDB                              4 min 30s
MyISAM                               25.03s
Archive                            22 min 25s
InnoDB partitioned by month           13.19
MyISAM partitioned by year            6.31
MyISAM partitioned by month           4.45
Archive partitioned by year           16.67
Archive partitioned by month          8.97
What is the event scheduler
 Temporal triggers
 NOT related to a specific table
 Execute SQL code
   at a given time
   or at given intervals
 Created by Andrey Hristov
 First released with MySQL 5.1
How does it work?

   event scheduler
       thread
                     MySQL Server

        event
        time?

        start
                     regular thread
                      regular thread
                       regular thread
                        regular thread
                         regular thread
     event thread
Why using the event scheduler?
 Cross platform scheduler
 No external applications needed
 No overhead
How to use the event scheduler
1. Enable the event scheduler
   A. in the option file
   • event-scheduler=1
   B. online
   • SET GLOBAL event_scheduler=ON;
2. Create an event
3. Check the effects
Event creation syntax
CREATE EVENT event_name
ON SCHEDULE
   AT {DATE AND TIME}
DO
   {SQL COMMAND};



CREATE EVENT event_name
ON SCHEDULE
   EVERY {X}
   {SECOND|MINUTE|HOUR|DAY|MONTH|YEAR|WEEK}
DO
   {SQL COMMAND};
Event creation syntax
CREATE EVENT event_name
ON SCHEDULE {schedule clause}

[ON COMPLETION [NOT] PRESERVE]
[STARTS {DATE TIME}]
[ENDS {DATE TIME} ]
[ENABLE|DISABLE]

DO
  {SQL COMMAND};
Creating an event at a given time
CREATE EVENT event_name
ON SCHEDULE AT '2009-04-21 15:55:00'
DO
   INSERT INTO some_table VALUES
   ('gotcha', now());

CREATE EVENT event_name
ON SCHEDULE AT now() + interval 20 minute
DO
CALL smart_procedure()
Creating a recurring event
CREATE EVENT event_name
ON SCHEDULE EVERY 20 MINUTE
DO
   INSERT INTO some_table VALUES
   ('gotcha', now());

CREATE EVENT event_name
ON SCHEDULE every 7 DAY
DO
CALL smart_procedure()
Creating a recurring event
CREATE EVENT event_name
ON SCHEDULE EVERY 10 MINUTE
STARTS NOW() + INTERVAL 2 HOUR
ENDS NOW() + INTERVAL 4 HOUR
DO
   CALL some_procedure();

#   creates an event that runs every
#   10 minutes, but does not start now.
#   It will start in 2 hours
#   and end two hours later
MySQL 5.1 and 5.4
in practice

Giuseppe Maxia

MySQL Community Team Lead
5.4 ?
This release is
very special for
  two reasons
Tight team work




        MySQL architects, top
         MySQL coders, Sun
1      performance engineers,
        all worked together to
          create this release
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
How to improve performance
     method           efficacy   difficulty

     Schema
     optimization     *****      #####
     Server tuning
                      **         ####
2    Query tuning
                      ***        ####
     Hardware
     upgrade          ***        #
     Replication
                      **         #####
     Partitioning
                      *****      #####
     Server Upgrade
     (5.4)            *****      #
5.4 =
    5.1 +
performance
  patches
Practical
experience
sysbench prepare
time sysbench 
        --test=oltp 
        --oltp-table-size=1000000 
        --mysql-db=test 
        --mysql-user=msandbox 
        --mysql-password=msandbox 
        --mysql-host=127.0.0.1 
        --mysql-port=$PORT 
        --num-threads=8 prepare
sysbench r/o
sysbench 
        --test=oltp 
        --oltp-table-size=1000000 
        --mysql-db=test 
        --mysql-user=msandbox 
        --mysql-password=msandbox 
        --mysql-host=127.0.0.1 
        --mysql-port=$PORT 
        --max-time=60 
        --oltp-read-only=on 
        --max-requests=0 
        --num-threads=8 run
sysbench r/w
sysbench 
        --test=oltp 
        --oltp-table-size=1000000 
        --mysql-db=test 
        --mysql-user=msandbox 
        --mysql-password=msandbox 
        --mysql-host=127.0.0.1 
        --mysql-port=$PORT 
        --max-time=60 
        --oltp-read-only=off 
        --max-requests=0 
        --num-threads=8 run
sysbench results
MySQL 5.0 read-only
sysbench results
MySQL 5.1 read-only
sysbench results
MySQL 5.0 R/W
sysbench results
MySQL 5.1 R/W
sysbench results
MySQL 5.4 R/O
sysbench results
MySQL 5.4 R/W
sysbench results graph
MySQL 5.0 read-only
sysbench results graph
MySQL 5.1 R/O
sysbench results graph - read only


 5.0




  5.1
sysbench results graph
MySQL 5.0 R/W
sysbench results graph
MySQL 5.1 R/W
sysbench results graph - R/W


 5.0




  5.1
sysbench results graph
MySQL 5.4 R/O
sysbench results graph - read only


 5.0




  5.1/5.4
sysbench results graph - read only
sysbench results graph
MySQL 5.4 R/W
sysbench results graph - R/W


 5.0




  5.1/5.4
sysbench results graph - R/W
THANKS

             QUESTIONS?



Slides in my blog
http://datacharmer.blogspot.com

More Related Content

What's hot

Modern query optimisation features in MySQL 8.
Modern query optimisation features in MySQL 8.Modern query optimisation features in MySQL 8.
Modern query optimisation features in MySQL 8.Mydbops
 
New features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizersNew features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizersSergey Petrunya
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL PerformanceSveta Smirnova
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON? Sveta Smirnova
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...Sveta Smirnova
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionSveta Smirnova
 
Basic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsSveta Smirnova
 
MySQL Query tuning 101
MySQL Query tuning 101MySQL Query tuning 101
MySQL Query tuning 101Sveta Smirnova
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Sveta Smirnova
 
MariaDB 10.0 Query Optimizer
MariaDB 10.0 Query OptimizerMariaDB 10.0 Query Optimizer
MariaDB 10.0 Query OptimizerSergey Petrunya
 
Moving to the NoSQL side: MySQL JSON functions
 Moving to the NoSQL side: MySQL JSON functions Moving to the NoSQL side: MySQL JSON functions
Moving to the NoSQL side: MySQL JSON functionsSveta Smirnova
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionSveta Smirnova
 
Optimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCOptimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCLouis liu
 
Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Alexey Ermakov
 
What's New In MySQL 5.6
What's New In MySQL 5.6What's New In MySQL 5.6
What's New In MySQL 5.6Abdul Manaf
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboardsDenis Ristic
 

What's hot (20)

Modern query optimisation features in MySQL 8.
Modern query optimisation features in MySQL 8.Modern query optimisation features in MySQL 8.
Modern query optimisation features in MySQL 8.
 
MySQLinsanity
MySQLinsanityMySQLinsanity
MySQLinsanity
 
New features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizersNew features-in-mariadb-and-mysql-optimizers
New features-in-mariadb-and-mysql-optimizers
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL Performance
 
MySQL SQL Tutorial
MySQL SQL TutorialMySQL SQL Tutorial
MySQL SQL Tutorial
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in action
 
Basic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database AdministratorsBasic MySQL Troubleshooting for Oracle Database Administrators
Basic MySQL Troubleshooting for Oracle Database Administrators
 
MySQL Query tuning 101
MySQL Query tuning 101MySQL Query tuning 101
MySQL Query tuning 101
 
Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...Modern solutions for modern database load: improvements in the latest MariaDB...
Modern solutions for modern database load: improvements in the latest MariaDB...
 
MariaDB 10.0 Query Optimizer
MariaDB 10.0 Query OptimizerMariaDB 10.0 Query Optimizer
MariaDB 10.0 Query Optimizer
 
Moving to the NoSQL side: MySQL JSON functions
 Moving to the NoSQL side: MySQL JSON functions Moving to the NoSQL side: MySQL JSON functions
Moving to the NoSQL side: MySQL JSON functions
 
New features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in actionNew features in Performance Schema 5.7 in action
New features in Performance Schema 5.7 in action
 
Optimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCOptimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COC
 
Percona toolkit
Percona toolkitPercona toolkit
Percona toolkit
 
Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance Using PostgreSQL statistics to optimize performance
Using PostgreSQL statistics to optimize performance
 
What's New In MySQL 5.6
What's New In MySQL 5.6What's New In MySQL 5.6
What's New In MySQL 5.6
 
16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards16 MySQL Optimization #burningkeyboards
16 MySQL Optimization #burningkeyboards
 

Viewers also liked

Understanding Query Execution
Understanding Query ExecutionUnderstanding Query Execution
Understanding Query Executionwebhostingguy
 
Percona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningPercona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningSergey Petrunya
 
MySQL Performance Optimization #JDNL13
MySQL Performance Optimization #JDNL13MySQL Performance Optimization #JDNL13
MySQL Performance Optimization #JDNL13Eli Aschkenasy
 
Mysql query optimization
Mysql query optimizationMysql query optimization
Mysql query optimizationBaohua Cai
 
Query Execution Time and Query Optimization.
Query Execution Time and Query Optimization.Query Execution Time and Query Optimization.
Query Execution Time and Query Optimization.Radhe Krishna Rajan
 
56 Query Optimization
56 Query Optimization56 Query Optimization
56 Query OptimizationMYXPLAIN
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersJonathan Levin
 
How mysql choose the execution plan
How mysql choose the execution planHow mysql choose the execution plan
How mysql choose the execution plan辛鹤 李
 
MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013
MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013
MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013Sergey Petrunya
 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Ted Wennmark
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreMariaDB Corporation
 
MariaDB Optimizer
MariaDB OptimizerMariaDB Optimizer
MariaDB OptimizerJongJin Lee
 
Covering indexes
Covering indexesCovering indexes
Covering indexesMYXPLAIN
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationKenny Gryp
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksJaime Crespo
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKYoungHeon (Roy) Kim
 

Viewers also liked (20)

Understanding Query Execution
Understanding Query ExecutionUnderstanding Query Execution
Understanding Query Execution
 
Percona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuningPercona live-2012-optimizer-tuning
Percona live-2012-optimizer-tuning
 
MySQL Query Browser
MySQL Query BrowserMySQL Query Browser
MySQL Query Browser
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 
MySQL Performance Optimization #JDNL13
MySQL Performance Optimization #JDNL13MySQL Performance Optimization #JDNL13
MySQL Performance Optimization #JDNL13
 
Mysql query optimization
Mysql query optimizationMysql query optimization
Mysql query optimization
 
Query Execution Time and Query Optimization.
Query Execution Time and Query Optimization.Query Execution Time and Query Optimization.
Query Execution Time and Query Optimization.
 
56 Query Optimization
56 Query Optimization56 Query Optimization
56 Query Optimization
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for Developers
 
How mysql choose the execution plan
How mysql choose the execution planHow mysql choose the execution plan
How mysql choose the execution plan
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013
MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013
MySQL/MariaDB query optimizer tuning tutorial from Percona Live 2013
 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and MoreThe New MariaDB Offering: MariaDB 10, MaxScale and More
The New MariaDB Offering: MariaDB 10, MaxScale and More
 
MariaDB Optimizer
MariaDB OptimizerMariaDB Optimizer
MariaDB Optimizer
 
Covering indexes
Covering indexesCovering indexes
Covering indexes
 
Java MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & OptimizationJava MySQL Connector & Connection Pool Features & Optimization
Java MySQL Connector & Connection Pool Features & Optimization
 
MySQL Cheat Sheet
MySQL Cheat SheetMySQL Cheat Sheet
MySQL Cheat Sheet
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 

Similar to MySQL 5.1 Features and Performance Improvements

MySQL partitions tutorial
MySQL partitions tutorialMySQL partitions tutorial
MySQL partitions tutorialGiuseppe Maxia
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellEmily Ikuta
 
Let's scale-out PostgreSQL using Citus (English)
Let's scale-out PostgreSQL using Citus (English)Let's scale-out PostgreSQL using Citus (English)
Let's scale-out PostgreSQL using Citus (English)Noriyoshi Shinoda
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
Partitioning Under The Hood
Partitioning Under The HoodPartitioning Under The Hood
Partitioning Under The HoodMySQLConference
 
MySQL partitioning performance
MySQL partitioning performanceMySQL partitioning performance
MySQL partitioning performanceTommy Đột
 
Things you should know about Oracle truncate
Things you should know about Oracle truncateThings you should know about Oracle truncate
Things you should know about Oracle truncateKazuhiro Takahashi
 
IDUG NA 2014 / 11 tips for DB2 11 for z/OS
IDUG NA 2014 / 11 tips for DB2 11 for z/OSIDUG NA 2014 / 11 tips for DB2 11 for z/OS
IDUG NA 2014 / 11 tips for DB2 11 for z/OSCuneyt Goksu
 
介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 XtrabackupYUCHENG HU
 
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenJohn Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenPostgresOpen
 
Boost Performance With My S Q L 51 Partitions
Boost Performance With  My S Q L 51 PartitionsBoost Performance With  My S Q L 51 Partitions
Boost Performance With My S Q L 51 PartitionsPerconaPerformance
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationmysqlops
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1MariaDB plc
 
Developers' mDay 2017. - Bogdan Kecman Oracle
Developers' mDay 2017. - Bogdan Kecman OracleDevelopers' mDay 2017. - Bogdan Kecman Oracle
Developers' mDay 2017. - Bogdan Kecman OraclemCloud
 
Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0
Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0
Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0mCloud
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗YUCHENG HU
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527Saewoong Lee
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 

Similar to MySQL 5.1 Features and Performance Improvements (20)

MySQL partitions tutorial
MySQL partitions tutorialMySQL partitions tutorial
MySQL partitions tutorial
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
Let's scale-out PostgreSQL using Citus (English)
Let's scale-out PostgreSQL using Citus (English)Let's scale-out PostgreSQL using Citus (English)
Let's scale-out PostgreSQL using Citus (English)
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
Partitioning Under The Hood
Partitioning Under The HoodPartitioning Under The Hood
Partitioning Under The Hood
 
Quick Wins
Quick WinsQuick Wins
Quick Wins
 
MySQL partitioning performance
MySQL partitioning performanceMySQL partitioning performance
MySQL partitioning performance
 
Things you should know about Oracle truncate
Things you should know about Oracle truncateThings you should know about Oracle truncate
Things you should know about Oracle truncate
 
IDUG NA 2014 / 11 tips for DB2 11 for z/OS
IDUG NA 2014 / 11 tips for DB2 11 for z/OSIDUG NA 2014 / 11 tips for DB2 11 for z/OS
IDUG NA 2014 / 11 tips for DB2 11 for z/OS
 
介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup
 
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenJohn Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
 
Boost Performance With My S Q L 51 Partitions
Boost Performance With  My S Q L 51 PartitionsBoost Performance With  My S Q L 51 Partitions
Boost Performance With My S Q L 51 Partitions
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
Developers' mDay 2017. - Bogdan Kecman Oracle
Developers' mDay 2017. - Bogdan Kecman OracleDevelopers' mDay 2017. - Bogdan Kecman Oracle
Developers' mDay 2017. - Bogdan Kecman Oracle
 
Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0
Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0
Developers’ mDay u Banjoj Luci - Bogdan Kecman, Oracle – MySQL Server 8.0
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
 
MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527MySQL 5.7 innodb_enhance_partii_20160527
MySQL 5.7 innodb_enhance_partii_20160527
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 

More from Giuseppe Maxia

MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerGiuseppe Maxia
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installerGiuseppe Maxia
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerGiuseppe Maxia
 
A quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesA quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesGiuseppe Maxia
 
Synchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBSynchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBGiuseppe Maxia
 
Juggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorJuggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorGiuseppe Maxia
 
Tungsten Replicator tutorial
Tungsten Replicator tutorialTungsten Replicator tutorial
Tungsten Replicator tutorialGiuseppe Maxia
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenGiuseppe Maxia
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usabilityGiuseppe Maxia
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenGiuseppe Maxia
 
State of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringState of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringGiuseppe Maxia
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandboxGiuseppe Maxia
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationGiuseppe Maxia
 

More from Giuseppe Maxia (20)

MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployer
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installer
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
 
A quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesA quick tour of Mysql 8 roles
A quick tour of Mysql 8 roles
 
MySQL document_store
MySQL document_storeMySQL document_store
MySQL document_store
 
Replication skeptic
Replication skepticReplication skeptic
Replication skeptic
 
Synchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBSynchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDB
 
Juggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorJuggle your data with Tungsten Replicator
Juggle your data with Tungsten Replicator
 
MySQL in your laptop
MySQL in your laptopMySQL in your laptop
MySQL in your laptop
 
Script it
Script itScript it
Script it
 
Tungsten Replicator tutorial
Tungsten Replicator tutorialTungsten Replicator tutorial
Tungsten Replicator tutorial
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungsten
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usability
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with Tungsten
 
State of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringState of the art of MySQL replication and clustering
State of the art of MySQL replication and clustering
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replication
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

MySQL 5.1 Features and Performance Improvements

  • 1. MySQL 5.1 (and more) What's new Giuseppe Maxia MySQL Community Team Lead
  • 2. about me -Giuseppe Maxia  a.k.a. The Data Charmer  MySQL Community Team Lead  Long time hacking with MySQL features  Formerly, database consultant, designer, coder.  A passion for QA  An even greater passion for open source  ... and community  Passionate blogger  http://datacharmer.blogspot.com
  • 6. MySQL 5.1 features Partitions performance row-based replication stability event scheduler ease of use logs on demand ease of use plugin interface extensibility GENERAL PERFORMANCE performance
  • 7. What exactly is this quot;partitionsquot; thing?  Logical splitting of tables  Transparent to user
  • 8. Remember the MERGE tables? MERGE TABLE  separate tables  risk of duplicates  insert in each table  no constraints
  • 9. It isn't a merge table! PARTITIONED TABLE  One table  No risk of duplicates  insert in one table  constraints enforced
  • 10. Partition pruning 1a - unpartitioned table - SINGLE RECORD select * from table_name where colx = 120
  • 11. Partition pruning 1b - unpartitioned table - SINGLE RECORD select * from table_name where colx = 350
  • 12. Partition pruning 1c - unpartitioned table - RANGE select * from table_name where colx between 120 and 230
  • 13. Partition pruning 2a - table partitioned by colx - SINGLE REC 1-99 100-199 select * from 200-299 table_name where colx = 300-399 120 400-499 500-599
  • 14. Partition pruning 2b - table partitioned by colx - SINGLE REC 1-99 100-199 select * from 200-299 table_name where colx = 300-399 350 400-499 500-599
  • 15. Partition pruning 2c - table partitioned by colx - RANGE 1-99 select * 100-199 from table_name 200-299 where colx 300-399 between 120 and 230 400-499 500-599
  • 16. Partition pruning EXPLAIN select * before from table_name where colx = 120 EXPLAIN PARTITIONS in 5.1 select * from table_name where colx = 120
  • 17. Partition pruning - unpartitioned table explain partitions select count(*) from table_name where colx=120G ***** 1. row **** id: 1 select_type: SIMPLE table: table_name partitions: p01,p02,p03,p04,p05,p06,p07,p08,p09 ,p10,p11,p12,p13,p14,p15,p16,p17,p1 8,p19 type: index ...
  • 18. Partition pruning - unpartitioned table explain partitions select count(*) from table_name where colx between 120 and 230G ***** 1. row **** id: 1 select_type: SIMPLE table: table_name partitions: p01,p02,p03,p04,p05,p06,p07,p08,p09 ,p10,p11,p12,p13,p14,p15,p16,p17,p1 8,p19 type: index ...
  • 19. Partition pruning - table partitioned by colx explain partitions select count(*) from table_name where colx between 120 and 230G ***** 1. row **** id: 1 select_type: SIMPLE table: table_name partitions: p02,p03 type: index ...
  • 20. HOW TO MAKE PARTITIONS
  • 21. HOW TO MAKE PARTITIONS RTFM ...
  • 22. HOW TO MAKE PARTITIONS RTFM ...  No, seriously, the manual has everything
  • 23. HOW TO MAKE PARTITIONS RTFM ...  No, seriously, the manual has everything  But if you absolutely insist ...
  • 24. HOW TO MAKE PARTITIONS CREATE TABLE t1 ( id int ) ENGINE=InnoDB # or MyISAM, ARCHIVE PARTITION BY RANGE (id) ( PARTITION P1 VALUES LESS THAN (10), PARTITION P2 VALUES LESS THAN (20) ) 20
  • 25. HOW TO MAKE PARTITIONS CREATE TABLE t1 ( id int ) ENGINE=InnoDB PARTITION BY LIST (id) ( PARTITION P1 VALUES IN (1,2,4), PARTITION P2 VALUES IN (3,5,9) ) 21
  • 26. HOW TO MAKE PARTITIONS CREATE TABLE t1 ( id int not null primary key ) ENGINE=InnoDB PARTITION BY HASH (id) PARTITIONS 10; 22
  • 27. HOW TO MAKE PARTITIONS CREATE TABLE t1 ( id int not null primary key ) ENGINE=InnoDB PARTITION BY KEY () PARTITIONS 10; 23
  • 28. Limitations • Can partition only by INTEGER columns • OR you can partition by an expression, which must return an integer • Maximum 1024 partitions • If you have a Unique Key or PK, the partition column must be part of that key • No Foreign Key support • No Fulltext or GIS support 24
  • 29. Benchmarking partitions  Compare results  Unpartitioned vs partitioned  ISOLATION  Repeatability  Check your resources!
  • 30. Partitions with InnoDB (laptop)  Key points:  Takes much more storage than other engines engine storage (MB) innodb 221 myisam 181 archive 74 innodb partitioned (whole) 289 innodb partitioned (file per table) 676 myisam partitioned 182 archive partitioned 72
  • 31. Benchmarking results (laptop) engine query year query year 2000 2002 InnoDB 1.25 1.25 MyISAM 1.72 1.73 Archive 2.47 2.45 InnoDB partitioned 0.24 0.10 whole InnoDB Partitioned 0.45 0.10 (file per table) MyISAM partitioned 0.18 0.12 Archive partitioned 0.22 0.12
  • 32. Partitions with InnoDB (huge server)  Key points:  Takes much more storage than other engines engine storage (GB) innodb (with PK) 330 myisam (with PK) 141 archive 13 innodb partitioned (no PK) 237 myisam partitioned (no PK) 107 archive partitioned 13
  • 33. Benchmarking results (huge server) engine 6 month range InnoDB 4 min 30s MyISAM 25.03s Archive 22 min 25s InnoDB partitioned by month 13.19 MyISAM partitioned by year 6.31 MyISAM partitioned by month 4.45 Archive partitioned by year 16.67 Archive partitioned by month 8.97
  • 34. What is the event scheduler  Temporal triggers  NOT related to a specific table  Execute SQL code  at a given time  or at given intervals  Created by Andrey Hristov  First released with MySQL 5.1
  • 35. How does it work? event scheduler thread MySQL Server event time? start regular thread regular thread regular thread regular thread regular thread event thread
  • 36. Why using the event scheduler?  Cross platform scheduler  No external applications needed  No overhead
  • 37. How to use the event scheduler 1. Enable the event scheduler A. in the option file • event-scheduler=1 B. online • SET GLOBAL event_scheduler=ON; 2. Create an event 3. Check the effects
  • 38. Event creation syntax CREATE EVENT event_name ON SCHEDULE AT {DATE AND TIME} DO {SQL COMMAND}; CREATE EVENT event_name ON SCHEDULE EVERY {X} {SECOND|MINUTE|HOUR|DAY|MONTH|YEAR|WEEK} DO {SQL COMMAND};
  • 39. Event creation syntax CREATE EVENT event_name ON SCHEDULE {schedule clause} [ON COMPLETION [NOT] PRESERVE] [STARTS {DATE TIME}] [ENDS {DATE TIME} ] [ENABLE|DISABLE] DO {SQL COMMAND};
  • 40. Creating an event at a given time CREATE EVENT event_name ON SCHEDULE AT '2009-04-21 15:55:00' DO INSERT INTO some_table VALUES ('gotcha', now()); CREATE EVENT event_name ON SCHEDULE AT now() + interval 20 minute DO CALL smart_procedure()
  • 41. Creating a recurring event CREATE EVENT event_name ON SCHEDULE EVERY 20 MINUTE DO INSERT INTO some_table VALUES ('gotcha', now()); CREATE EVENT event_name ON SCHEDULE every 7 DAY DO CALL smart_procedure()
  • 42. Creating a recurring event CREATE EVENT event_name ON SCHEDULE EVERY 10 MINUTE STARTS NOW() + INTERVAL 2 HOUR ENDS NOW() + INTERVAL 4 HOUR DO CALL some_procedure(); # creates an event that runs every # 10 minutes, but does not start now. # It will start in 2 hours # and end two hours later
  • 43. MySQL 5.1 and 5.4 in practice Giuseppe Maxia MySQL Community Team Lead
  • 44. 5.4 ? This release is very special for two reasons
  • 45. Tight team work MySQL architects, top MySQL coders, Sun 1 performance engineers, all worked together to create this release
  • 46. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 47. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 48. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 49. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 50. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 51. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 52. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 53. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 54. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 55. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 56. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 57. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 58. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 59. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 60. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 61. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 62. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 63. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 64. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 65. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 66. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 67. How to improve performance method efficacy difficulty Schema optimization ***** ##### Server tuning ** #### 2 Query tuning *** #### Hardware upgrade *** # Replication ** ##### Partitioning ***** ##### Server Upgrade (5.4) ***** #
  • 68. 5.4 = 5.1 + performance patches
  • 70. sysbench prepare time sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=msandbox --mysql-password=msandbox --mysql-host=127.0.0.1 --mysql-port=$PORT --num-threads=8 prepare
  • 71. sysbench r/o sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=msandbox --mysql-password=msandbox --mysql-host=127.0.0.1 --mysql-port=$PORT --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run
  • 72. sysbench r/w sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=msandbox --mysql-password=msandbox --mysql-host=127.0.0.1 --mysql-port=$PORT --max-time=60 --oltp-read-only=off --max-requests=0 --num-threads=8 run
  • 81. sysbench results graph - read only 5.0 5.1
  • 84. sysbench results graph - R/W 5.0 5.1
  • 86. sysbench results graph - read only 5.0 5.1/5.4
  • 87. sysbench results graph - read only
  • 89. sysbench results graph - R/W 5.0 5.1/5.4
  • 91. THANKS QUESTIONS? Slides in my blog http://datacharmer.blogspot.com