SlideShare a Scribd company logo
Quick Wins with
Third Party Patches

   Morgan Tocker, firstname at percona dot com
            Consultant, Percona Inc.
Introduction
• The best new features in MySQL are not always
  coming from MySQL (now Sun Microsystems).
  – One of the killers reasons was the three years it took to
    release MySQL 5.1 - and not accepting any “new
    features” into MySQL 5.0.
  – 5.4 is brilliant news (my opinion)!
Who’s writing the patches
• Various individuals
  and companies.
• They are (mostly) incremental
  improvements, and addressing
  their business needs.
• We’re not really talking about
  a fork*, it’s a delta.
   – Expect 100% backwards compatibility.



 * Except for XtraDB - Not covered today.
How can you get them?
• Percona releases binaries for a limited number of
  platforms.
  – See http://www.percona.com/docs/wiki/release:start
• OurDelta releases binaries (for more platforms) in
  addition to channels that plug into Debian/Red Hat
  package managers.
  – See http://ourdelta.org/
• Compile your own.
  – Not required, see above options.
On to the main event...
• I’m going to show you some cool things you can do
  that are not in MySQL.
  – All of the example patches presented are in the Percona
    and/or OurDelta releases.
  – These are the “quick wins” patches - which means that
    your effort is mostly minimal.
Patch #1 - Slow Query Filtering
• Let me tell a story first:
   – mysql> select * from employees WHERE
     birth_date BETWEEN '1960-01-01' AND
     '1960-03-31' ORDER by RAND();
     117138 rows in set (0.63 sec)
   – mysql> select * from employees WHERE
     birth_date BETWEEN '1960-01-01' AND
     '1960-03-31';
     117138 rows in set (0.25 sec)
First One:
•   mysql> EXPLAIN select * from employees WHERE birth_date BETWEEN
    '1960-01-01' AND '1960-03-31' ORDER by RAND()G
    *************************** 1. row ***************************
               id: 1
      select_type: SIMPLE
            table: employees
             type: range
    possible_keys: birth_date
              key: birth_date
          key_len: 3
              ref: NULL
             rows: 11554
            Extra: Using where; Using temporary; Using filesort
    1 row in set (0.00 sec)
Second One
• mysql> EXPLAIN select * from employees WHERE birth_date BETWEEN
  '1960-01-01' AND '1960-03-31'G
  *************************** 1. row ***************************
             id: 1
    select_type: SIMPLE
          table: employees
           type: range
  possible_keys: birth_date
            key: birth_date
        key_len: 3
            ref: NULL
           rows: 11554
          Extra: Using where
  1 row in set (0.00 sec)
... what do we see?
• So the query that doesn’t have to sort records is
  slightly faster. No surprises here.
• What about the difference in scalability between
  these two queries.
  – Astute audience members will realize this is not the same
    question at all, i.e. scalability != performance.
The empirical test
• #!/bin/sh

  ITERATIONS=10
  CONCURRENCY="1,2,4,8,16,32,64,128"

  mkdir -p results

  ./mysqlslap -q "select * from employees WHERE birth_date
  BETWEEN '1960-01-01' AND '1960-03-31' ORDER by RAND()" --
  create-schema=employees -i $ITERATIONS -c $CONCURRENCY >
  results/ORDER_BY_rand.txt

  ./mysqlslap -q "select * from employees WHERE birth_date
  BETWEEN '1960-01-01' AND '1960-03-31'" --create-
  schema=employees -i $ITERATIONS -c $CONCURRENCY > results/
  ORDER_BY_null.txt
Results

65.00
                                                                60.05

48.75


32.50
                                                        26.96

16.25                                                           18.56
                                               14.39
                                       9.81
                                                        5.16
   0           1.22     2.40
                        0.89
                                4.88
                                1.76
                                       3.48    4.55
        0.63
        0.25   0.47
         1      2        4       8     16       32      64      128
                      RAND()                  No Rand
Why is this?
• The query that requires the sort hits a different
  bottleneck, the sort.
   – Sorts in memory cause a lot of CPU pressure.
      • Might not scale.
   – Temporary tables or sorts on disk cause IO pressure.
      • Certainly won’t scale.
Why is this (cont.)?
• Sometimes it’s just as important to monitor “what
  queries take a long time” as “what may not work
  with concurrency”.
• Examples of things that might be expensive and
  reduce concurrency are.....
Expensive Things...


qc_miss             The query was not found in the query cache.
full_scan           The query performed a full table scan.
full_join           The query performed a full join (a join without indexes).
tmp_table           The query created an implicit internal temporary table.
tmp_table_on_disk   The query's temporary table was stored on disk.
filesort            The query used a filesort.
filesort_on_disk    The filesort was performed on disk.
Introducing Log slow filter...
•   [mysqld]
    log_slow_filter=tmp_table_on_disk,filesort_on_disk


     qc_miss             The query was not found in the query cache.
     full_scan           The query performed a full table scan.
     full_join           The query performed a full join (a join without indexes).
     tmp_table           The query created an implicit internal temporary table.
     tmp_table_on_disk   The query's temporary table was stored on disk.
     filesort            The query used a filesort.
     filesort_on_disk    The filesort was performed on disk.
Extra Feature #1
• log_slow_verbosity - You can also *get* more
  information written to the log:
 microtime          Log queries with microsecond precision (mandatory).

 query_plan         Log information about the query's execution plan (optional).

 innodb             Log InnoDB statistics (optional).



  # User@Host: mailboxer[mailboxer] @ [192.168.10.165]
  # Thread_id: 11167745 Schema: board
  # QC_Hit: No Full_scan: No Full_join: No Tmp_table: Yes Disk_tmp_table: No
  # Filesort: Yes Disk_filesort: No Merge_passes: 0
  # Query_time: 0.000659 Lock_time: 0.000070 Rows_sent: 0 Rows_examined: 30
  Rows_affected: 0 Rows_read: 30
  #   InnoDB_IO_r_ops: 1 InnoDB_IO_r_bytes: 16384 InnoDB_IO_r_wait: 0.028487
  #   InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000
  #   InnoDB_pages_distinct: 5
  select count(distinct author_id) from art87.article87 force index (forum_id) where
  forum_id = 240215 and thread_id = '710575'
Extra Feature #2
• It also allows you to set the long_query_time to
  microseconds in MySQL 5.0:
  – long_query_time = 100000

• If we think that it takes an average of up to 7*
  queries to generate a page, 1 second is too long.
  – MySQL finally fixed this in MySQL 5.1




  * Source: Brian Aker somewhere.
More information
• This patch was originally authored by Percona
• More Information:
  http://www.percona.com/docs/wiki/patches:microslow_innodb
Patch #2 - Index Statistics
•   What are the possible indexes?
•   mysql> EXPLAIN SELECT Name FROM Country WHERE continent =
    'Asia' AND population > 5000000 ORDER BY NameG
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: Country
         type: ALL
possible_keys: NULL
          key: NULL
      key_len: NULL
          ref: NULL
         rows: 239
        Extra: Using where; Using filesort
1 row in set (0.00 sec)
Answers
• The following indexes work (to varying degrees):
  – (continent)
  – (continent, population)
  – (continent, population, name).
Answers (cont.)
• The following answers are incorrect:
  – name. Using an index on name would avoid the sort, but
    it would actually be quicker to table scan.
  – population. Using an index on population is not very
    helpful, since it doesn’t filter enough rows (most countries
    have populations > 5M).
How would you tell...
• .. if you added the wrong index?

  You know, given that indexes will hurt things like
  write performance.
The simple answer...
• You can’t!
  – There is no way in MySQL to find “dead indexes”.
     • Other than drop all indexes and start adding again ;)
  – Did I mention index selection changes over time based
    on data distribution?
• .. and it’s really annoying.
Introducing Index Statistics
•   SELECT DISTINCT s.TABLE_SCHEMA, s.TABLE_NAME, s.INDEX_NAME FROM
    information_schema.statistics `s` LEFT JOIN
    information_schema.index_statistics IS ON (s.TABLE_SCHEMA = IS.TABLE_SCHEMA
    AND s.TABLE_NAME=IS.TABLE_NAME AND s.INDEX_NAME=IS.INDEX_NAME) WHERE
    IS.TABLE_SCHEMA IS NULL;
    +--------------+---------------------------+-----------------+
    | TABLE_SCHEMA | TABLE_NAME                | INDEX_NAME      |
    +--------------+---------------------------+-----------------+
    | art100       | article100                | ext_key         |
    | art100       | article100                | site_id         |
    | art100       | article100                | hash            |
    | art100       | article100                | forum_id_2      |
    | art100       | article100                | published       |
    | art100       | article100                | inserted        |
    | art100       | article100                | site_id_2       |
    | art100       | author100                 | PRIMARY         |
    | art100       | author100                 | site_id         |
    ...
    +--------------+---------------------------+-----------------+
    1150 rows IN SET (1 min 44.23 sec)

    Source: http://www.mysqlperformanceblog.com/2008/09/12/unused-indexes-by-
    single-query/
Index statistics is...
• A very simple statistics tool that increments
  counters as index rows are read.
   – Allows you to figure out which indexes should be dropped
     or tweaked.
   – Very little overhead.
More information
• Actually comes as part of a patch for
  INDEX_STATISTICS, USER_STATISTICS,
  TABLE_STATISTICS.
• Patch originally authored by Google.
• More Information:
  http://www.percona.com/docs/wiki/
  patches:userstatv2
Patch #3 - InnoDB dictionary limit
• MySQL has a data dictionary (.frm) files.
• Guess what, so does InnoDB!
InnoDB Dictionary
• As it turns out that a lot of this information is
  redundant of MySQL :(
• Oh and.. it’s expensive.
• And the default behavior is up to 100% of the buffer
  pool can be used by data dictionary.
This patch does is sets a limit.
• Or “soft upper boundary” of the memory used.
• See: http://www.percona.com/docs/wiki/
  patches:innodb_dict_size_limit
Patch #4 - Global long query time.
• The rules for the slow query time are actually
  defined from when the connection starts.
• This ones a small one, but a life saver for
  applications that use connection pooling ;)
• See: http://www.percona.com/docs/wiki/
  patches:use_global_long_query_time
Patch #5 - Group Commit “Fix”
• There’s a performance regressions in 5.0
  performance as soon as you turn on binary logging.
  – See: http://bugs.mysql.com/bug.php?id=13669

    “One of big customers reported regression from 135 to 35
    transactions due to this issue.” - Peter Zaitsev, 30 Sep
    2005.
Group Commit
• We haven’t fixed it, but we’ve introduced an unsafe
  mode (--innodb-unsafe-group-commit)
• See: http://www.mysqlperformanceblog.com/
  2009/02/02/pretending-to-fix-broken-group-commit/
The End.
• Many of the examples I use show up in some form on our blog:
  http://www.mysqlperformanceblog.com/

• Questions?
Ad

More Related Content

What's hot (20)

Tech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data ModelingTech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data Modeling
ScyllaDB
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDB
Enkitec
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query Tuning
Sveta Smirnova
 
Summary tables with flexviews
Summary tables with flexviewsSummary tables with flexviews
Summary tables with flexviews
Justin Swanhart
 
Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]s
Sveta Smirnova
 
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdfDatabase & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
InSync2011
 
Cassandra London - C* Spark Connector
Cassandra London - C* Spark ConnectorCassandra London - C* Spark Connector
Cassandra London - C* Spark Connector
Christopher Batey
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0
Victor Coustenoble
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
InSync2011
 
Mssm及assm下索引叶块分裂的测试
Mssm及assm下索引叶块分裂的测试Mssm及assm下索引叶块分裂的测试
Mssm及assm下索引叶块分裂的测试
maclean liu
 
0888 learning-mysql
0888 learning-mysql0888 learning-mysql
0888 learning-mysql
sabir18
 
Preparse Query Rewrite Plugins
Preparse Query Rewrite PluginsPreparse Query Rewrite Plugins
Preparse Query Rewrite Plugins
Sveta Smirnova
 
Full Table Scan: friend or foe
Full Table Scan: friend or foeFull Table Scan: friend or foe
Full Table Scan: friend or foe
Mauro Pagano
 
Introduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sIntroduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]s
Sveta Smirnova
 
Flexviews materialized views for my sql
Flexviews materialized views for my sqlFlexviews materialized views for my sql
Flexviews materialized views for my sql
Justin Swanhart
 
The Challenges of Distributing Postgres: A Citus Story
The Challenges of Distributing Postgres: A Citus StoryThe Challenges of Distributing Postgres: A Citus Story
The Challenges of Distributing Postgres: A Citus Story
Hanna Kelman
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
Riyaj Shamsudeen
 
Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...
Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...
Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...
Databricks
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
 
Tech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data ModelingTech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data Modeling
ScyllaDB
 
Profiling Oracle with GDB
Profiling Oracle with GDBProfiling Oracle with GDB
Profiling Oracle with GDB
Enkitec
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query Tuning
Sveta Smirnova
 
Summary tables with flexviews
Summary tables with flexviewsSummary tables with flexviews
Summary tables with flexviews
Justin Swanhart
 
Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]s
Sveta Smirnova
 
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdfDatabase & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
Database & Technology 1 _ Tom Kyte _ SQL Techniques.pdf
InSync2011
 
Cassandra London - C* Spark Connector
Cassandra London - C* Spark ConnectorCassandra London - C* Spark Connector
Cassandra London - C* Spark Connector
Christopher Batey
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
DataStax Academy
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
InSync2011
 
Mssm及assm下索引叶块分裂的测试
Mssm及assm下索引叶块分裂的测试Mssm及assm下索引叶块分裂的测试
Mssm及assm下索引叶块分裂的测试
maclean liu
 
0888 learning-mysql
0888 learning-mysql0888 learning-mysql
0888 learning-mysql
sabir18
 
Preparse Query Rewrite Plugins
Preparse Query Rewrite PluginsPreparse Query Rewrite Plugins
Preparse Query Rewrite Plugins
Sveta Smirnova
 
Full Table Scan: friend or foe
Full Table Scan: friend or foeFull Table Scan: friend or foe
Full Table Scan: friend or foe
Mauro Pagano
 
Introduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]sIntroduction into MySQL Query Tuning for Dev[Op]s
Introduction into MySQL Query Tuning for Dev[Op]s
Sveta Smirnova
 
Flexviews materialized views for my sql
Flexviews materialized views for my sqlFlexviews materialized views for my sql
Flexviews materialized views for my sql
Justin Swanhart
 
The Challenges of Distributing Postgres: A Citus Story
The Challenges of Distributing Postgres: A Citus StoryThe Challenges of Distributing Postgres: A Citus Story
The Challenges of Distributing Postgres: A Citus Story
Hanna Kelman
 
Dbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineersDbms plan - A swiss army knife for performance engineers
Dbms plan - A swiss army knife for performance engineers
Riyaj Shamsudeen
 
Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...
Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...
Analyzing the Performance Effects of Meltdown + Spectre on Apache Spark Workl...
Databricks
 
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingPerformance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
 

Viewers also liked (20)

Wordpress Security Optimization (Basic)
Wordpress Security Optimization (Basic)Wordpress Security Optimization (Basic)
Wordpress Security Optimization (Basic)
Irvan R-ID
 
Formazione formatori
Formazione formatori Formazione formatori
Formazione formatori
stefano preto
 
Domanda protocollata
Domanda protocollataDomanda protocollata
Domanda protocollata
noicattaroweb
 
PHP
PHPPHP
PHP
andreluizlc
 
PHP SuperGlobals - Supersized Trouble
PHP SuperGlobals - Supersized TroublePHP SuperGlobals - Supersized Trouble
PHP SuperGlobals - Supersized Trouble
Imperva
 
parameter tampering
parameter tamperingparameter tampering
parameter tampering
Ilsun Choi
 
Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...
Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...
Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...
Jacqueline Vickery
 
Prezi #hotelvertrieb#ecommerce#SEO_2021
Prezi #hotelvertrieb#ecommerce#SEO_2021Prezi #hotelvertrieb#ecommerce#SEO_2021
Prezi #hotelvertrieb#ecommerce#SEO_2021
Ansgar Jahns
 
La posta elettronica certificata (PEC)
La posta elettronica certificata (PEC)La posta elettronica certificata (PEC)
La posta elettronica certificata (PEC)
Salvatore Cordiano
 
L1 seeingthings
L1 seeingthingsL1 seeingthings
L1 seeingthings
Boat Dock
 
Le piattaforme per il social business
Le piattaforme per il social businessLe piattaforme per il social business
Le piattaforme per il social business
piero itta
 
Sunny on Foody
Sunny on FoodySunny on Foody
Sunny on Foody
mrp4
 
Cyberfolio 2007 - Lean.Joy
Cyberfolio 2007 - Lean.JoyCyberfolio 2007 - Lean.Joy
Cyberfolio 2007 - Lean.Joy
Leandro Rangel
 
Intestazione
IntestazioneIntestazione
Intestazione
rifugiati
 
Digital Media & Youth Safety - Ricky Lewis & Jacqueline Vickery
Digital Media & Youth Safety - Ricky Lewis & Jacqueline VickeryDigital Media & Youth Safety - Ricky Lewis & Jacqueline Vickery
Digital Media & Youth Safety - Ricky Lewis & Jacqueline Vickery
Jacqueline Vickery
 
O meio ambiente acustico.97
O meio ambiente acustico.97O meio ambiente acustico.97
O meio ambiente acustico.97
Priscila Silveira Prado
 
Thanks A Lot
Thanks A LotThanks A Lot
Thanks A Lot
Karen C
 
A+ student strategies final
A+ student strategies   finalA+ student strategies   final
A+ student strategies final
Northeast Center, Office of Academic Support, SUNY Empire State College
 
Sharding Architectures
Sharding ArchitecturesSharding Architectures
Sharding Architectures
guest0e6d5e
 
Wordpress Security Optimization (Basic)
Wordpress Security Optimization (Basic)Wordpress Security Optimization (Basic)
Wordpress Security Optimization (Basic)
Irvan R-ID
 
Formazione formatori
Formazione formatori Formazione formatori
Formazione formatori
stefano preto
 
Domanda protocollata
Domanda protocollataDomanda protocollata
Domanda protocollata
noicattaroweb
 
PHP SuperGlobals - Supersized Trouble
PHP SuperGlobals - Supersized TroublePHP SuperGlobals - Supersized Trouble
PHP SuperGlobals - Supersized Trouble
Imperva
 
parameter tampering
parameter tamperingparameter tampering
parameter tampering
Ilsun Choi
 
Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...
Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...
Digital Media & Learning Conference Talk: Kids Teaching Kids Web Design at a ...
Jacqueline Vickery
 
Prezi #hotelvertrieb#ecommerce#SEO_2021
Prezi #hotelvertrieb#ecommerce#SEO_2021Prezi #hotelvertrieb#ecommerce#SEO_2021
Prezi #hotelvertrieb#ecommerce#SEO_2021
Ansgar Jahns
 
La posta elettronica certificata (PEC)
La posta elettronica certificata (PEC)La posta elettronica certificata (PEC)
La posta elettronica certificata (PEC)
Salvatore Cordiano
 
L1 seeingthings
L1 seeingthingsL1 seeingthings
L1 seeingthings
Boat Dock
 
Le piattaforme per il social business
Le piattaforme per il social businessLe piattaforme per il social business
Le piattaforme per il social business
piero itta
 
Sunny on Foody
Sunny on FoodySunny on Foody
Sunny on Foody
mrp4
 
Cyberfolio 2007 - Lean.Joy
Cyberfolio 2007 - Lean.JoyCyberfolio 2007 - Lean.Joy
Cyberfolio 2007 - Lean.Joy
Leandro Rangel
 
Intestazione
IntestazioneIntestazione
Intestazione
rifugiati
 
Digital Media & Youth Safety - Ricky Lewis & Jacqueline Vickery
Digital Media & Youth Safety - Ricky Lewis & Jacqueline VickeryDigital Media & Youth Safety - Ricky Lewis & Jacqueline Vickery
Digital Media & Youth Safety - Ricky Lewis & Jacqueline Vickery
Jacqueline Vickery
 
Thanks A Lot
Thanks A LotThanks A Lot
Thanks A Lot
Karen C
 
Sharding Architectures
Sharding ArchitecturesSharding Architectures
Sharding Architectures
guest0e6d5e
 
Ad

Similar to Quick Wins (20)

Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
10x Performance Improvements
10x Performance Improvements10x Performance Improvements
10x Performance Improvements
Ronald Bradford
 
10x improvement-mysql-100419105218-phpapp02
10x improvement-mysql-100419105218-phpapp0210x improvement-mysql-100419105218-phpapp02
10x improvement-mysql-100419105218-phpapp02
promethius
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
Tanel Poder
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
Enkitec
 
Real World Performance - Data Warehouses
Real World Performance - Data WarehousesReal World Performance - Data Warehouses
Real World Performance - Data Warehouses
Connor McDonald
 
Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
Wim Godden
 
Query Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New TricksQuery Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New Tricks
MYXPLAIN
 
Percona Live UK 2014 Part III
Percona Live UK 2014  Part IIIPercona Live UK 2014  Part III
Percona Live UK 2014 Part III
Alkin Tezuysal
 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Altinity Ltd
 
Apache Cassandra at Macys
Apache Cassandra at MacysApache Cassandra at Macys
Apache Cassandra at Macys
DataStax Academy
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
Sveta Smirnova
 
Hotsos 2012
Hotsos 2012Hotsos 2012
Hotsos 2012
Connor McDonald
 
MariaDB with SphinxSE
MariaDB with SphinxSEMariaDB with SphinxSE
MariaDB with SphinxSE
Colin Charles
 
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
Sveta Smirnova
 
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
Altinity Ltd
 
Оптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикОптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчик
Agnislav Onufrijchuk
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
10x Performance Improvements
10x Performance Improvements10x Performance Improvements
10x Performance Improvements
Ronald Bradford
 
10x improvement-mysql-100419105218-phpapp02
10x improvement-mysql-100419105218-phpapp0210x improvement-mysql-100419105218-phpapp02
10x improvement-mysql-100419105218-phpapp02
promethius
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A
 
Oracle Database In-Memory Option in Action
Oracle Database In-Memory Option in ActionOracle Database In-Memory Option in Action
Oracle Database In-Memory Option in Action
Tanel Poder
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
Enkitec
 
Real World Performance - Data Warehouses
Real World Performance - Data WarehousesReal World Performance - Data Warehouses
Real World Performance - Data Warehouses
Connor McDonald
 
Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
Wim Godden
 
Query Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New TricksQuery Optimization with MySQL 5.6: Old and New Tricks
Query Optimization with MySQL 5.6: Old and New Tricks
MYXPLAIN
 
Percona Live UK 2014 Part III
Percona Live UK 2014  Part IIIPercona Live UK 2014  Part III
Percona Live UK 2014 Part III
Alkin Tezuysal
 
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
Altinity Ltd
 
Why Use EXPLAIN FORMAT=JSON?
 Why Use EXPLAIN FORMAT=JSON?  Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
Sveta Smirnova
 
MariaDB with SphinxSE
MariaDB with SphinxSEMariaDB with SphinxSE
MariaDB with SphinxSE
Colin Charles
 
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
Sveta Smirnova
 
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
Altinity Ltd
 
Оптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикОптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчик
Agnislav Onufrijchuk
 
Ad

More from HighLoad2009 (20)

Eremkin Cboss Smsc Hl2009
Eremkin Cboss Smsc Hl2009Eremkin Cboss Smsc Hl2009
Eremkin Cboss Smsc Hl2009
HighLoad2009
 
Hl++2009 Ayakovlev Pochta
Hl++2009 Ayakovlev PochtaHl++2009 Ayakovlev Pochta
Hl++2009 Ayakovlev Pochta
HighLoad2009
 
архитектура новой почты рамблера
архитектура новой почты рамблераархитектура новой почты рамблера
архитектура новой почты рамблера
HighLoad2009
 
Dz Java Hi Load 0.4
Dz Java Hi Load 0.4Dz Java Hi Load 0.4
Dz Java Hi Load 0.4
HighLoad2009
 
Highload Perf Tuning
Highload Perf TuningHighload Perf Tuning
Highload Perf Tuning
HighLoad2009
 
особенности использования Times Ten In Memory Database в высоконагруженной среде
особенности использования Times Ten In Memory Database в высоконагруженной средеособенности использования Times Ten In Memory Database в высоконагруженной среде
особенности использования Times Ten In Memory Database в высоконагруженной среде
HighLoad2009
 
High Load 2009 Dimaa Rus Ready
High Load 2009 Dimaa Rus ReadyHigh Load 2009 Dimaa Rus Ready
High Load 2009 Dimaa Rus Ready
HighLoad2009
 
High Load 2009 Dimaa Rus Ready 16 9
High Load 2009 Dimaa Rus Ready 16 9High Load 2009 Dimaa Rus Ready 16 9
High Load 2009 Dimaa Rus Ready 16 9
HighLoad2009
 
Eremkin Cboss Smsc Hl2009
Eremkin Cboss Smsc Hl2009Eremkin Cboss Smsc Hl2009
Eremkin Cboss Smsc Hl2009
HighLoad2009
 
Hl++2009 Ayakovlev Pochta
Hl++2009 Ayakovlev PochtaHl++2009 Ayakovlev Pochta
Hl++2009 Ayakovlev Pochta
HighLoad2009
 
архитектура новой почты рамблера
архитектура новой почты рамблераархитектура новой почты рамблера
архитектура новой почты рамблера
HighLoad2009
 
Dz Java Hi Load 0.4
Dz Java Hi Load 0.4Dz Java Hi Load 0.4
Dz Java Hi Load 0.4
HighLoad2009
 
Highload Perf Tuning
Highload Perf TuningHighload Perf Tuning
Highload Perf Tuning
HighLoad2009
 
особенности использования Times Ten In Memory Database в высоконагруженной среде
особенности использования Times Ten In Memory Database в высоконагруженной средеособенности использования Times Ten In Memory Database в высоконагруженной среде
особенности использования Times Ten In Memory Database в высоконагруженной среде
HighLoad2009
 
High Load 2009 Dimaa Rus Ready
High Load 2009 Dimaa Rus ReadyHigh Load 2009 Dimaa Rus Ready
High Load 2009 Dimaa Rus Ready
HighLoad2009
 
High Load 2009 Dimaa Rus Ready 16 9
High Load 2009 Dimaa Rus Ready 16 9High Load 2009 Dimaa Rus Ready 16 9
High Load 2009 Dimaa Rus Ready 16 9
HighLoad2009
 

Recently uploaded (20)

ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 

Quick Wins

  • 1. Quick Wins with Third Party Patches Morgan Tocker, firstname at percona dot com Consultant, Percona Inc.
  • 2. Introduction • The best new features in MySQL are not always coming from MySQL (now Sun Microsystems). – One of the killers reasons was the three years it took to release MySQL 5.1 - and not accepting any “new features” into MySQL 5.0. – 5.4 is brilliant news (my opinion)!
  • 3. Who’s writing the patches • Various individuals and companies. • They are (mostly) incremental improvements, and addressing their business needs. • We’re not really talking about a fork*, it’s a delta. – Expect 100% backwards compatibility. * Except for XtraDB - Not covered today.
  • 4. How can you get them? • Percona releases binaries for a limited number of platforms. – See http://www.percona.com/docs/wiki/release:start • OurDelta releases binaries (for more platforms) in addition to channels that plug into Debian/Red Hat package managers. – See http://ourdelta.org/ • Compile your own. – Not required, see above options.
  • 5. On to the main event... • I’m going to show you some cool things you can do that are not in MySQL. – All of the example patches presented are in the Percona and/or OurDelta releases. – These are the “quick wins” patches - which means that your effort is mostly minimal.
  • 6. Patch #1 - Slow Query Filtering • Let me tell a story first: – mysql> select * from employees WHERE birth_date BETWEEN '1960-01-01' AND '1960-03-31' ORDER by RAND(); 117138 rows in set (0.63 sec) – mysql> select * from employees WHERE birth_date BETWEEN '1960-01-01' AND '1960-03-31'; 117138 rows in set (0.25 sec)
  • 7. First One: • mysql> EXPLAIN select * from employees WHERE birth_date BETWEEN '1960-01-01' AND '1960-03-31' ORDER by RAND()G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: employees type: range possible_keys: birth_date key: birth_date key_len: 3 ref: NULL rows: 11554 Extra: Using where; Using temporary; Using filesort 1 row in set (0.00 sec)
  • 8. Second One • mysql> EXPLAIN select * from employees WHERE birth_date BETWEEN '1960-01-01' AND '1960-03-31'G *************************** 1. row *************************** id: 1 select_type: SIMPLE table: employees type: range possible_keys: birth_date key: birth_date key_len: 3 ref: NULL rows: 11554 Extra: Using where 1 row in set (0.00 sec)
  • 9. ... what do we see? • So the query that doesn’t have to sort records is slightly faster. No surprises here. • What about the difference in scalability between these two queries. – Astute audience members will realize this is not the same question at all, i.e. scalability != performance.
  • 10. The empirical test • #!/bin/sh ITERATIONS=10 CONCURRENCY="1,2,4,8,16,32,64,128" mkdir -p results ./mysqlslap -q "select * from employees WHERE birth_date BETWEEN '1960-01-01' AND '1960-03-31' ORDER by RAND()" -- create-schema=employees -i $ITERATIONS -c $CONCURRENCY > results/ORDER_BY_rand.txt ./mysqlslap -q "select * from employees WHERE birth_date BETWEEN '1960-01-01' AND '1960-03-31'" --create- schema=employees -i $ITERATIONS -c $CONCURRENCY > results/ ORDER_BY_null.txt
  • 11. Results 65.00 60.05 48.75 32.50 26.96 16.25 18.56 14.39 9.81 5.16 0 1.22 2.40 0.89 4.88 1.76 3.48 4.55 0.63 0.25 0.47 1 2 4 8 16 32 64 128 RAND() No Rand
  • 12. Why is this? • The query that requires the sort hits a different bottleneck, the sort. – Sorts in memory cause a lot of CPU pressure. • Might not scale. – Temporary tables or sorts on disk cause IO pressure. • Certainly won’t scale.
  • 13. Why is this (cont.)? • Sometimes it’s just as important to monitor “what queries take a long time” as “what may not work with concurrency”. • Examples of things that might be expensive and reduce concurrency are.....
  • 14. Expensive Things... qc_miss The query was not found in the query cache. full_scan The query performed a full table scan. full_join The query performed a full join (a join without indexes). tmp_table The query created an implicit internal temporary table. tmp_table_on_disk The query's temporary table was stored on disk. filesort The query used a filesort. filesort_on_disk The filesort was performed on disk.
  • 15. Introducing Log slow filter... • [mysqld] log_slow_filter=tmp_table_on_disk,filesort_on_disk qc_miss The query was not found in the query cache. full_scan The query performed a full table scan. full_join The query performed a full join (a join without indexes). tmp_table The query created an implicit internal temporary table. tmp_table_on_disk The query's temporary table was stored on disk. filesort The query used a filesort. filesort_on_disk The filesort was performed on disk.
  • 16. Extra Feature #1 • log_slow_verbosity - You can also *get* more information written to the log: microtime Log queries with microsecond precision (mandatory). query_plan Log information about the query's execution plan (optional). innodb Log InnoDB statistics (optional). # User@Host: mailboxer[mailboxer] @ [192.168.10.165] # Thread_id: 11167745 Schema: board # QC_Hit: No Full_scan: No Full_join: No Tmp_table: Yes Disk_tmp_table: No # Filesort: Yes Disk_filesort: No Merge_passes: 0 # Query_time: 0.000659 Lock_time: 0.000070 Rows_sent: 0 Rows_examined: 30 Rows_affected: 0 Rows_read: 30 # InnoDB_IO_r_ops: 1 InnoDB_IO_r_bytes: 16384 InnoDB_IO_r_wait: 0.028487 # InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000 # InnoDB_pages_distinct: 5 select count(distinct author_id) from art87.article87 force index (forum_id) where forum_id = 240215 and thread_id = '710575'
  • 17. Extra Feature #2 • It also allows you to set the long_query_time to microseconds in MySQL 5.0: – long_query_time = 100000 • If we think that it takes an average of up to 7* queries to generate a page, 1 second is too long. – MySQL finally fixed this in MySQL 5.1 * Source: Brian Aker somewhere.
  • 18. More information • This patch was originally authored by Percona • More Information: http://www.percona.com/docs/wiki/patches:microslow_innodb
  • 19. Patch #2 - Index Statistics • What are the possible indexes? • mysql> EXPLAIN SELECT Name FROM Country WHERE continent = 'Asia' AND population > 5000000 ORDER BY NameG *************************** 1. row *************************** id: 1 select_type: SIMPLE table: Country type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 239 Extra: Using where; Using filesort 1 row in set (0.00 sec)
  • 20. Answers • The following indexes work (to varying degrees): – (continent) – (continent, population) – (continent, population, name).
  • 21. Answers (cont.) • The following answers are incorrect: – name. Using an index on name would avoid the sort, but it would actually be quicker to table scan. – population. Using an index on population is not very helpful, since it doesn’t filter enough rows (most countries have populations > 5M).
  • 22. How would you tell... • .. if you added the wrong index? You know, given that indexes will hurt things like write performance.
  • 23. The simple answer... • You can’t! – There is no way in MySQL to find “dead indexes”. • Other than drop all indexes and start adding again ;) – Did I mention index selection changes over time based on data distribution? • .. and it’s really annoying.
  • 24. Introducing Index Statistics • SELECT DISTINCT s.TABLE_SCHEMA, s.TABLE_NAME, s.INDEX_NAME FROM information_schema.statistics `s` LEFT JOIN information_schema.index_statistics IS ON (s.TABLE_SCHEMA = IS.TABLE_SCHEMA AND s.TABLE_NAME=IS.TABLE_NAME AND s.INDEX_NAME=IS.INDEX_NAME) WHERE IS.TABLE_SCHEMA IS NULL; +--------------+---------------------------+-----------------+ | TABLE_SCHEMA | TABLE_NAME                | INDEX_NAME      | +--------------+---------------------------+-----------------+ | art100       | article100                | ext_key         | | art100       | article100                | site_id         | | art100       | article100                | hash            | | art100       | article100                | forum_id_2      | | art100       | article100                | published       | | art100       | article100                | inserted        | | art100       | article100                | site_id_2       | | art100       | author100                 | PRIMARY         | | art100       | author100                 | site_id         | ... +--------------+---------------------------+-----------------+ 1150 rows IN SET (1 min 44.23 sec) Source: http://www.mysqlperformanceblog.com/2008/09/12/unused-indexes-by- single-query/
  • 25. Index statistics is... • A very simple statistics tool that increments counters as index rows are read. – Allows you to figure out which indexes should be dropped or tweaked. – Very little overhead.
  • 26. More information • Actually comes as part of a patch for INDEX_STATISTICS, USER_STATISTICS, TABLE_STATISTICS. • Patch originally authored by Google. • More Information: http://www.percona.com/docs/wiki/ patches:userstatv2
  • 27. Patch #3 - InnoDB dictionary limit • MySQL has a data dictionary (.frm) files. • Guess what, so does InnoDB!
  • 28. InnoDB Dictionary • As it turns out that a lot of this information is redundant of MySQL :( • Oh and.. it’s expensive. • And the default behavior is up to 100% of the buffer pool can be used by data dictionary.
  • 29. This patch does is sets a limit. • Or “soft upper boundary” of the memory used. • See: http://www.percona.com/docs/wiki/ patches:innodb_dict_size_limit
  • 30. Patch #4 - Global long query time. • The rules for the slow query time are actually defined from when the connection starts. • This ones a small one, but a life saver for applications that use connection pooling ;) • See: http://www.percona.com/docs/wiki/ patches:use_global_long_query_time
  • 31. Patch #5 - Group Commit “Fix” • There’s a performance regressions in 5.0 performance as soon as you turn on binary logging. – See: http://bugs.mysql.com/bug.php?id=13669 “One of big customers reported regression from 135 to 35 transactions due to this issue.” - Peter Zaitsev, 30 Sep 2005.
  • 32. Group Commit • We haven’t fixed it, but we’ve introduced an unsafe mode (--innodb-unsafe-group-commit) • See: http://www.mysqlperformanceblog.com/ 2009/02/02/pretending-to-fix-broken-group-commit/
  • 33. The End. • Many of the examples I use show up in some form on our blog: http://www.mysqlperformanceblog.com/ • Questions?