SlideShare a Scribd company logo
1 of 38
Download to read offline
Indexierung mit MySQL

DOAG SIG MySQL – Performance
  13. März 2012, Wiesbaden

          Oli Sennhauser
   Senior MySQL Consultant, FromDual GmbH

    oli.sennhauser@fromdual.com

                www.fromdual.com            1
FromDual GmbH
●   FromDual bietet neutral und unabhängig:
    ●   Beratung für MySQL
    ●   Support für MySQL und Galera Cluster
    ●   Remote-DBA / MySQL Betrieb
    ●   Schulung für MySQL
●   Oracle Silber Partner (OPN)


                   www.fromdual.com

                        www.fromdual.com       2
Kunden




         www.fromdual.com   3
Inhalt

 Indexierung mit MySQL
 ➢
     Grundlagen
 ➢
     Indizes anzeigen in MySQL
 ➢
     Indizes und Storage Engines
 ➢
     Indizes in InnoDB
 ➢
     Indizes optimieren
 ➢
     Der Query Execution Plan (QEP)




                                      www.fromdual.com   4
FromDual Performance Waage
Grundlagen
●   Was ist ein Index?
        "Ein Index ist eine von den Daten getrennte
        Struktur, welche die Suche und das Sortieren nach
        bestimmten Feldern beschleunigt."
●   Warum brauchen wir Indizes?
    ●   Sortieren
    ●   Suchen
●   Vorteil / Nachteil
    ●   Performance
    ●   Pflege, Platz
                          www.fromdual.com                  6
Grundlagen
●   Beispiel:
    ●   Karteikarten in Bibliothek → Stockwerk, Raum,
        Gestell, Reihe
    ●   Simmel, Johannes M. → 3. St., links, 5. Gest. 2. R.




●   Alternativen zum Index?
    ●   Full Library Scan → „Full Table Scan“

                           www.fromdual.com                   7
Vor- und Nachteile von Indizes
 Performance, beschleunigt:
   SELECT (und UPDATE, DELETE)
 Performance, bremst DML-Statements
   INSERT, UPDATE, DELETE, ...
 Indizes brauchen Platz (RAM, Disk)
 Wartung, Pflege, Unterhalt (OPTIMIZE, ANALYZE)?
 Indizes können Optimizer verwirren!
   → falsche Query Execution Pläne → langsame Abfragen


 → So viele wie nötig aber so wenig wie möglich!
                       www.fromdual.com                  8
Wo sollten wir Indizes setzen?
      „... die Suche und das Sortieren nach
      bestimmten Feldern beschleunigt."
●   Suche: WHERE-Klausel
●   Sortieren: DISTINC, ORDER BY, GROUP BY
●   JOIN-Klausel: ... a JOIN b ON a.id = b.a_id
      → und zwar in beide Richtungen!
●   Spezialfall: Covering Index


                       www.fromdual.com       9
Indexieren bei JOINs
●    Je nach Query: 2 Möglichkeiten:
       ●   Parent → Child                                                                          1
                                                                                  Parent
       ●   Child → Parent
    EXPLAIN SELECT *
       FROM parent AS p
       JOIN child AS c ON c.p_id = p.id
      WHERE p.id = 69999;
    +­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­+­­­­­­+                   Child
    | table | type  | possible_keys | key     | key_len | ref   | rows |
    +­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­+­­­­­­+           2
    | p     | const | PRIMARY       | PRIMARY | 4       | const |    1 |
    | c     | ref   | p_id          | p_id    | 4       | const |    4 |
    +­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­+­­­­­­+

    EXPLAIN SELECT *
       FROM parent AS p
       JOIN child AS c ON p.id = c.p_id
      WHERE c.f = 69999;
    +­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+
    | table | type   | possible_keys | key     | key_len | ref         | rows |
    +­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+
    | c     | ref    | p_id,f        | f       | 4       | const       |    1 |
    | p     | eq_ref | PRIMARY       | PRIMARY | 4       | test.c.p_id |    1 |
    +­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+

                                                www.fromdual.com                                       10
Arten von Indizes
●   B+-Tree Index (Balanced plus tree)
    ●   Geeignete Struktur für Disks
    ●   Geeignet für viele unterschiedliche Werte (hohe Kardinalität)
    ●   InnoDB, MyISAM, (MEMORY, NDB)
●   Hash-Index
    ●   Geeignete Struktur für Speicher
    ●   MEMORY, NDB, (InnoDB)
●   R-Tree Index
    ●   Mehrdimensionale Informationen (Geo-Indizes)
    ●   MyISAM
●   Fulltext Index
●   UNIQUE Index (Spezialfall von B+-Tree und Hash)
●   Bitmap Index :(
                                       www.fromdual.com                 11
Indizes anzeigen mit MySQL
 SHOW CREATE TABLE testG

 CREATE TABLE `test` (
   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
   `data` varchar(64) DEFAULT NULL,
   `ts` timestamp NOT NULL
   PRIMARY KEY (`id`),
   KEY `data` (`data`)
 );


   mysqldump ­­no­data
SHOW INDEX FROM test;

+­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Cardinality | Null | Index_type |
+­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+
| test  |          0 | PRIMARY  |            1 | id          |       18469 |      | BTREE      |
| test  |          1 | data     |            1 | data        |          26 | YES  | BTREE      |
+­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+


                                       www.fromdual.com                                        12
Indizes anzeigen mit MySQL
SELECT table_schema, table_name, column_name, ordinal_position
     , column_key
  FROM information_schema.columns
 WHERE table_name = 'test'
   AND table_schema = 'test';
+­­­­­­­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­+
| table_schema | table_name | column_name | ordinal_position | column_key |
+­­­­­­­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­+
| test         | test       | id          |                1 | PRI        |
| test         | test       | data        |                2 | MUL        |
| test         | test       | ts          |                3 |            |
+­­­­­­­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­­­­­­+­­­­­­­­­­­­+


CREATE TABLE innodb_table_monitor (id INT) ENGINE=InnoDB;
TABLE: name test/test, id 0 1333, columns 6, indexes 2, appr.rows 18469
  COLUMNS: id: DATA_INT DATA_UNSIGNED DATA_BINARY_TYPE DATA_NOT_NULL len 4;
  ...
  INDEX: name PRIMARY, id 0 1007, fields 1/5, uniq 1, type 3
   root page 3, appr.key vals 18469, leaf pages 54, size pages 97
   FIELDS:  id DB_TRX_ID DB_ROLL_PTR data ts
  INDEX: name data, id 0 1008, fields 1/2, uniq 2, type 0
   root page 4, appr.key vals 1, leaf pages 32, size pages 33
   FIELDS:  data id


                                      www.fromdual.com                        13
Indizes anzeigen mit MySQL
●   Neu mit MySQL 5.6
use information_schema;

SELECT t.name, t.n_cols, i.index_id, i.name, i.n_fields
  FROM innodb_sys_tables AS t
  JOIN innodb_sys_indexes AS i ON t.table_id = i.table_id
 WHERE t.name = 'test/test';
+­­­­­­­­­­­+­­­­­­­­+­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­+
| name      | n_cols | index_id | name    | n_fields |
+­­­­­­­­­­­+­­­­­­­­+­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­+
| test/test |      6 |      644 | PRIMARY |        1 |
| test/test |      6 |      650 | data    |        1 |
+­­­­­­­­­­­+­­­­­­­­+­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­+



                          www.fromdual.com              14
MySQL Architektur
             Applikation / Client

  Thread            Connection          mysqld
  Cache              Manager                                       Parser
                                             Optimizer
                      User Au-
                    thentication
                                        Access Control
                    Command                                           Table Open
  Logging
                    Dispatcher                                       Cache (.frm, fh)
                                         Table Manager
   Query            Query Cache                                      Table Definition
   Cache              Module                                         Cache (tbl def.)

                                     Handler Interface


  MyISAM   InnoDB    Memory   NDB      PBMS        Aria   XtraDB    Federated-X   ...


                                    www.fromdual.com                                    15
Indizes mit MyISAM
●   MyISAM kennt:            CREATE TABLE `test` (
                               `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
                               `data` varchar(64) DEFAULT NULL,
    ●   B+-Tree                `ts` timestamp NOT NULL,
                               `geo` geometry NOT NULL,
                               PRIMARY KEY (`id`),

        Volltext
                               SPATIAL KEY `geo` (`geo`),
    ●                          FULLTEXT KEY `data` (`data`)
                             ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    ●   R-Tree               INSERT INTO test
                             VALUES (NULL, 'Uster ist ein kleines Städtchen.'
                                   , NULL, GeomFromText('POINT(42 24)'));
●   Variable:                SELECT *
                               FROM test
    ●   key_buffer_size       WHERE MATCH (data)
                             AGAINST ('Uster' IN BOOLEAN MODE);

    ●   ~ 25 – 33% vom RAM



                      www.fromdual.com                                          16
Indizes mit MEMORY (HEAP)
●   MEMORY (alt HEAP)
    ●   Hash Index (default)                CREATE TABLE `test` (
                                              `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    ●   B+-Tree Index                         `data` varchar(64) DEFAULT NULL,
                                              `ts` timestamp NOT NULL
                                              PRIMARY KEY (`id`),
●   Hash langsam bei                          KEY `data` (`data`) USING BTREE
                                            ) ENGINE=MEMORY;

                                            SHOW INDEX FROM test;
    kleiner Kardinalität!
        → B+-Tree!
●   Variable: max_heap_table_size
           +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+
           | Table | Non_unique | Key_name | Column_name | Cardinality | Null | Index_type |
           +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+
           | test  |          0 | PRIMARY  | id          |         128 |      | HASH       |
           | test  |          1 | data     | data        |        NULL | YES  | BTREE      |
           +­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­+17
                                    www.fromdual.com
Indizes mit InnoDB
●   InnoDB (innodb_buffer_pool_size)
    ●   B+-Tree
    ●   FULLTEXT (ab MySQL 5.6)
    ●   Hash (Adaptive Hash Index, selbständig)
●   Unterscheidung in
    ●   Primary Key (PK)
    ●   Secondary Key (SK) → alles != PK



                           www.fromdual.com       18
InnoDB Primary Key
●   Table = geclusterter Index = Primary Key
    ●   Oracle: Index Organized Table (IOT)
    ●   MS SQL Server: Clustered Index
    ●   PostgreSQL: Cluster
●   Beeinflusst:
    ●   Sortier-Reihenfolge
    ●   Lokalität der Daten (Locality of data)
    ●   Länge der Secondary Keys
    ●   → InnoDB ist sehr schnell für PK Zugriffe/Scans!

                           www.fromdual.com                19
InnoDB Primary Key
 ●   Geclusterter PK (Nachname, Vorname):
                                                      ...
                                         Ka – Kz
                                                      Senn, Anton, Hauptstrasse 1, 8000 Zürich
SELECT *                                 La – Lz
                                                      Senn, Berta, Bahnhofplatz 12, 8640 Rapperswil
  FROM people                            Ma –Mz
                                                      Senn, Martha, Bachgasse 2, 3000 Bern
 WHERE lastname = 'Sennhauser'           Na – Nz
                                                      Senn Xaver, Hinterhof 3, 8630 Rüti
   AND firstname = 'Oli';                Oa – Oz
                                                      ...
                                                      ...
                                 A–E     Pa – Pz
                                                      Sennhauser Carl, Mühlgasse 8, 4000 Basel
                                 F–J     Qa – Qz
                                                      Sennhauser, Margot, Peterstrasse 3, 8610 Uster
                                 K–O     Ra –Rz
                                                      Sennhauser, Oli, Rebenweg 6, 8610 Uster
                                 P–T     Sa – Sz
                                                      Sennhauser, Walter, Peterstrasse 3, 8610 Uster
                                 U–Z     Ta – Tz
                                                      ...
                                         Ua – Uz      ...
                                         Va – Vz      Tischler, Cäsar, Im Graben 4, 9000 Chur
                                         Wa –Wz
                                         Xa – Xz
                                         Ya – Yz
 ●   Was wenn kein PK?                   Za – Zz      ...


     ●   UNIQUE INDEX
     ●   Autogenerated Index
                                   www.fromdual.com                                               20
Fehlender InnoDB PK
TABLE: name test/test, id 0 1339, columns 6, indexes 2, appr.rows 0

COLUMNS: id: DATA_INT DATA_UNSIGNED DATA_BINARY_TYPE DATA_NOT_NULL len 4;
        data: DATA_VARCHAR prtype 524303 len 64;
          ts: DATA_INT DATA_UNSIGNED DATA_BINARY_TYPE DATA_NOT_NULL len 4;
  DB_ROW_ID: DATA_SYS prtype 256 len 6;
  DB_TRX_ID: DATA_SYS prtype 257 len 6;
DB_ROLL_PTR: DATA_SYS prtype 258 len 7;

INDEX: name GEN_CLUST_INDEX, id 0 1014, fields 0/6, uniq 1, type 1
  root page 3, appr.key vals 0, leaf pages 1, size pages 1
  FIELDS:  DB_ROW_ID DB_TRX_ID DB_ROLL_PTR id data ts

INDEX: name data, id 0 1015, fields 1/2, uniq 2, type 0
  root page 4, appr.key vals 0, leaf pages 1, size pages 1
  FIELDS:  data DB_ROW_ID

­­­­

TABLE: name test/test2, id 0 1340, columns 6, indexes 2, appr.rows 0
COLUMNS: id: DATA_INT DATA_UNSIGNED DATA_BINARY_TYPE DATA_NOT_NULL len 4;
       data: DATA_VARCHAR prtype 524303 len 64;
         ts: DATA_INT DATA_UNSIGNED DATA_BINARY_TYPE DATA_NOT_NULL len 4;
  DB_ROW_ID: DATA_SYS prtype 256 len 6;
  DB_TRX_ID: DATA_SYS prtype 257 len 6;
DB_ROLL_PTR: DATA_SYS prtype 258 len 7;

INDEX: name PRIMARY, id 0 1016, fields 1/5, uniq 1, type 3
  root page 3, appr.key vals 0, leaf pages 1, size pages 1
  FIELDS:  id DB_TRX_ID DB_ROLL_PTR data ts

INDEX: name data, id 0 1017, fields 1/2, uniq 2, type 0
  root page 4, appr.key vals 0, leaf pages 1, size pages 1
  FIELDS:  data id



                                                   www.fromdual.com          21
InnoDB Secondary Key
●   Grösse des PK spielt eine Rolle
●   SK Zugriff ist teurer als PK Zugriff
●   Zugriff auf SK ist ähnlich wie JOIN
●   Ab MySQL 5.5: Fast Index Create/Drop




                      www.fromdual.com     22
InnoDB Secondary Key
      ●   SK (Personal-Nummer):
    SELECT *
      FROM people
     WHERE personal_id = '70720230344';


                         ...
                                               ~ JOIN                ...
           640 – 647                                       Ka – Kz
                         Valsangiacomo, C.                           Senn, Anton, Hauptstrasse 1, 8000 ...
           648 – 655                                       La – Lz
                         Urben, Isa                                  Senn, Berta, Bahnhofplatz 12, 8640 ...
           656 – 663                                       Ma –Mz
                         Valsangiacomo, L.                           Senn, Martha, Bachgasse 2, 3000 Bern
           664 – 671                                       Na – Nz
                         Schiesser, Roger                            Senn Xaver, Hinterhof 3, 8630 Rüti
           672 – 679                                       Oa – Oz
                         ...                                         ...
                         ...                                         ...
00 – 19    680 – 687                             A–E       Pa – Pz
                         Züricher, Paul                              Sennhauser Carl, Mühlgasse 8, 4000 Basel
20 – 39    688 – 695                             F–J       Qa – Qz
                         Abächerli, Hugo                             Sennhauser, Margot, Peterstrasse 3, 8610 ...
40 – 59    696 – 703                             K–O       Ra –Rz
                         Sennhauser, Oli                             Sennhauser, Oli, Rebenweg 6, 8610 Uster
60 – 79    704 – 711                             P–T       Sa – Sz
                         Vischer, Andreas                            Sennhauser, Walter, Peterstrasse 3, 8610 ...
80 – 99    712 – 719                             U–Z       Ta – Tz
                         ...                                         ...
                         ...                               Ua – Uz   ...
           720 – 727
                         Prümm, Gerd                       Va – Vz   Tischler, Cäsar, Im Graben 4, 9000 Chur
           728 – 735
                         Stadelmann, Anna-L.               Wa –Wz
           736 – 743
                         Nyffeler, Fränzi                  Xa – Xz
           744 – 751
                         Jaakola, Seppo                    Ya – Yz
           752 – 759
                         ...                               Za – Zz   ...



                                               www.fromdual.com                                               23
InnoDB Secondary Key
TABLE: name test/crap, id 0 1342, columns 10, indexes 3, appr.rows 0
  COLUMNS: a: DATA_INT DATA_BINARY_TYPE DATA_NOT_NULL len 4;
           b: DATA_INT DATA_BINARY_TYPE DATA_NOT_NULL len 4;
           c: DATA_VARCHAR prtype 524559 len 32;
           d: DATA_INT DATA_BINARY_TYPE DATA_NOT_NULL len 8;
           e: DATA_VARCHAR prtype 524559 len 32;
           f: DATA_INT DATA_BINARY_TYPE len 4;
           g: DATA_INT DATA_BINARY_TYPE len 4;
   DB_ROW_ID: DATA_SYS prtype 256 len 6;
   DB_TRX_ID: DATA_SYS prtype 257 len 6;
 DB_ROLL_PTR: DATA_SYS prtype 258 len 7;
  INDEX: name PRIMARY, id 0 1019, fields 5/9, uniq 5, type 3
   root page 3, appr.key vals 0, leaf pages 1, size pages 1
   FIELDS:  a b c d e DB_TRX_ID DB_ROLL_PTR f g
  INDEX: name f, id 0 1020, fields 1/6, uniq 6, type 0
   root page 4, appr.key vals 0, leaf pages 1, size pages 1
   FIELDS:  f a b c d e
  INDEX: name g, id 0 1021, fields 1/6, uniq 6, type 0
   root page 5, appr.key vals 0, leaf pages 1, size pages 1
   FIELDS:  g a b c d e

                                 www.fromdual.com                      24
Index-Arten
●    Single Column Index
    ALTER TABLE test ADD COLUMN (data);


●    Multi Column Index
    ALTER TABLE test ADD COLUMN (a, b);

●    Covering Index
    ALTER TABLE test ADD COLUMN (a, b, c, data);

●    Prefixed Index
    ALTER TABLE test ADD COLUMN (a, data(16));

                              www.fromdual.com     25
Indizes optimieren?
●    Fehlende Indizes → einfach! :-)
    # my.cnf
    slow_query_log                = 1
    slow_query_log_file           = slow.log
    log_queries_not_using_indexes = 1
         → EXPLAIN ...
●    Zu viele Indizes → etwas schwieriger! :-(
     ●   „Userstat“ (Percona Server)
●    Warum Indizes Optimieren?
     ●   Performance
     ●   Zu kleiner Speicher → random I/O (sehr langsam!)
                              www.fromdual.com              26
Userstat (Percona Sever)
CREATE TABLE `test` (                                         +­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­+
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,              | schema | table_name | index_name |
  `data` varchar(64) DEFAULT NULL,                            +­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­+
  `ts` timestamp NOT NULL,                                    | test   | test       | a          |
  `a` int(11) DEFAULT NULL,                                   | test   | test       | a_2        |
  `b` int(11) DEFAULT NULL,                                   | test   | test       | a_3        |
  `c` int(11) DEFAULT NULL,                                   | test   | test       | b          |
  PRIMARY KEY (`id`),                                         | test   | test       | b_2        |
  KEY `data` (`data`),                                        | test   | test       | data       |
  KEY `a` (`a`),                                              | test   | test       | PRIMARY    |
  KEY `b` (`b`),                                              +­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­+
  KEY `a_2` (`a`,`b`),
  KEY `b_2` (`b`,`a`),                                        SELECT table_schema, table_name, index_name
  KEY `a_3` (`a`,`data`)                                        FROM information_schema.index_statistics
);                                                             WHERE table_schema = 'test'
                                                                 AND table_name = 'test'
SET GLOBAL userstat = 1;                                       ORDER BY index_name;

SELECT t.schema, t.name AS table_name                         +­­­­­­­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­+
     , i.name AS index_name                                   | table_schema | table_name | index_name |
  FROM innodb_sys_tables AS t                                 +­­­­­­­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­+
  JOIN innodb_sys_indexes AS i                                | test         | test       | a          |
    ON t.table_id = i.table_id                                | test         | test       | b          |
 WHERE t.name = 'test'                                        | test         | test       | b_2        |
   AND t.schema = 'test'                                      | test         | test       | PRIMARY    |
 ORDER BY index_name;                                         +­­­­­­­­­­­­­­+­­­­­­­­­­­­+­­­­­­­­­­­­+


●   → a_2, a_3 und data wurden in der beobachteten Periode nie benutzt!
●   Ob der MySQL Optimizer damit recht hatte, ist eine andere Frage!
                                                   www.fromdual.com                                         27
Indizes optimieren ohne userstat
●   Voll redundante Indizes (a, b) + (a, b)
●   Partiell redundante Indizes (a, b, c) + (a, b)
●   Achtung! (c, a, b) + (a, b) → (a, b, c)?
●   Möglicherweise unnütze Indizes: (gender)
●   Überspezifizierter Index (a, b, c, d, e, f, g, h)
    ●   Achtung: Covering Index!
●   Index kürzen: (hash(7))
SELECT COUNT(DISTINCT LEFT(hash, <n>))
  FROM test;

                           www.fromdual.com             28
Unnützer Index?

EXPLAIN
 SELECT SQL_NO_CACHE *
   FROM test
  WHERE gender = 1;
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­+­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­+
| id | select_type | table | type | possible_keys | key    | key_len | ref   | rows   | Extra       |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­+­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­+
|  1 | SIMPLE      | test  | ref  | gender        | gender | 2       | const | 524465 | Using where |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­+­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­+

Laufzeit: 1.0 s

EXPLAIN
 SELECT SQL_NO_CACHE *
   FROM test IGNORE INDEX (gender)
  WHERE gender = 1;

+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows    | Extra       |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+
|  1 | SIMPLE      | test  | ALL  | NULL          | NULL | NULL    | NULL | 1048930 | Using where |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+

Laufzeit: 0.8 s




                                           www.fromdual.com                                             29
IRS vs. FTS
●   Index Range Scan vs. Full Table Scan?
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows    | Extra       |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+
|  1 | SIMPLE      | test  | ALL  | id2           | NULL | NULL    | NULL | 1048773 | Using where |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+

+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­+­­­­­­­­­­­­­+
| id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows  | Extra       |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­+­­­­­­­­­­­­­+
|  1 | SIMPLE      | test  | range | id2           | id2  | 5       | NULL | 49828 | Using where |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­+­­­­­­­­­­­­­+




●   Wo liegt der
    Break-even?
    ●   MySQL flippt bei <15% :-(
    ●   Zu Untersuchen!
                                          www.fromdual.com                                            30
Warum wird mein Index nicht
genutzt?
●   Sie fehlen? :-)
●   Index: (a, b, c) → WHERE b = ... AND c = ...
●   Index: (data) → WHERE data LIKE '%bla';
●   Index: (`date`) → WHERE YEAR(date) = 2012;
    ●   MySQL kennt Function Based Index (FBI) noch nicht (MariaDB Virtual
        Columns!) → selber machen
●   Spalten stimmen nicht überein (Character Set!)
●   MySQL Optimizer verschätzt sich!
●   Hints wurden verwendet?
    ●   use index ()
    ●   force index ()
    ●   ignore index()
                                 www.fromdual.com                            31
Der Query Execution Plan (QEP)
●   Wie gehen wir sicher, dass/ob der Index
    verwendet wird?
    → Optimizer fragen (EXPLAIN)
EXPLAIN
 SELECT SQL_NO_CACHE *
   FROM test
  WHERE id2 BETWEEN  0 AND ROUND(0 + (14 / 100 * 1310693), 0);

+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­+­­­­­­­­­­­­­+
| id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows   | Extra       |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­+­­­­­­­­­­­­­+
|  1 | SIMPLE      | test  | range | id2           | id2  | 5       | NULL | 176400 | Using where |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­+­­­­­­­­­­­­­+

EXPLAIN
 SELECT SQL_NO_CACHE *
   FROM test
  WHERE id2 BETWEEN  0 AND ROUND(0 + (15 / 100 * 1310693), 0);

+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows    | Extra       |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+
|  1 | SIMPLE      | test  | ALL  | id2           | NULL | NULL    | NULL | 1048671 | Using where |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+


                                          www.fromdual.com                                            32
Lesen eines QEP
●   Der QEP zeigt uns, wie MySQL plant, die Abfrage auszuführen
    ●   → EXPLAIN
    ●   Optimizer Trace (neu in 5.6)
●   Wie liest man QEP?
    ●   Meist von oben nach unten
●   Type (von oben nach unten langsamer):
    ●   eq_ef
    ●   ref
    ●   range (Index Range Scan)
    ●   index_merge (langsam)
    ●   index (Full Index Scan)


                                  www.fromdual.com           33
Lesen eines QEP
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­+
| id | select_type | table | type   | possible_keys | key     | key_len | ref                 | rows  | Extra                    |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­+
|  1 | SIMPLE      | pa    | range  | idx1,idx2     | idx2    | 13      | NULL                | 40404 | Using where              |
|  1 | SIMPLE      | kd    | ref    | idx4,idx5     | idx4    | 520     | const,const,pa.k_id |     1 | Using where; Using index |
|  1 | SIMPLE      | k     | eq_ref | PRIMARY       | PRIMARY | 4       | pa.k_id             |     1 | Using where; Using index |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­+

+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­+
| id | select_type | table | type   | possible_keys | key     | key_len | ref                   | rows | Extra                    |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­+
|  1 | SIMPLE      | pa    | index  | pa_on_k_id    | PRIMARY | 4       | NULL                  |   10 |                          |
|  1 | SIMPLE      | kd    | ref    | idx2,idx1     | idx2    | 520     | const,const,kd_k.p_id |    1 | Using where; Using index |
|  1 | SIMPLE      | k     | eq_ref | PRIMARY       | PRIMARY | 4       | kd_k.p_id             |    1 | Using index              |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­+

+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­+
| id | select_type | table | type   | possible_keys | key       | key_len | ref         | rows | Extra                     |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­+
|  1 | SIMPLE      | a     | ref    | UN1_a,a_S20   | a_S20     | 19      | const,const |    1 | Using where               |
|  1 | SIMPLE      | b     | merge  | b_1,b_S2,b_AC | b_AC1,b_1 | 97,19    | NULL        |  373 | Using intersect(b_AC,b_1) |
+­­­­+­­­­­­­­­­­­­+­­­­­­­+­­­­­­­­+­­­­­­­­­­­­­­­+­­­­­­­­­­­+­­­­­­­­­+­­­­­­­­­­­­­+­­­­­­+­­­­­­­­­­­­­­­­­­­­­­­­­­­+




                                                       www.fromdual.com                                                          34
Optimizer braucht Statistiken
●   Optimizer am besten mit:
    ●   MyISAM / MEMORY
    ●   InnoDB :-| (besser mit 5.5/5.6)
    ●   NDB :-(
●   InnoDB: 8 (10, 13?) „random dives“ in
    (jeden?) InnoDB B+-Tree (für jedes Query?)
●   Besser kontrollierbar mit MySQL 5.5
●   Persistente Statistiken mit MySQL 5.6
●   Ab 5.6 macht ANALYZE TABLE wieder Sinn!
                          www.fromdual.com       35
Optimizer Trace
●   Neues Spielzeug mit MySQL 5.6 :-)
SET optimizer_trace = enabled=on;

SELECT SQL_NO_CACHE *
  FROM test
 WHERE id2 BETWEEN 0 AND ROUND(0 + (15 / 100 * 1310693), 0);

SELECT * FROM information_schema.optimizer_traceG

join_optimization:
  condition_processing:
    original_condition:
      transformation: equality_propagation,
      transformation: constant_propagation,
      transformation: trivial_condition_removal,
  rows_estimation:
    range_analysis:
      table_scan: rows: 1048671, cost: 216624
      potential_range_indices:
        index: PRIMARY, usable: false, cause: not_applicable
        index: gender, usable: false, cause: not_applicable
        index: id2, usable: true, key_parts: [id2]
      analyzing_range_alternatives:
        range_scan_alternatives: rows: 262804, cost: 315366, chosen: false, cause: cost
  considered_execution_plans:
    best_access_path:
      considered_access_paths: access_type: scan, rows: 262804, cost: 164061
      cost_for_plan: 216622, rows_for_plan: 262804, chosen: true
  refine_plan:
    access_type: table_scan


                                               www.fromdual.com                           36
Das Handler Interface lesen
SHOW GLOBAL STATUS LIKE 'handler_read%';
+­­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­+
| Variable_name              | Value   |
+­­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­+
| Handler_read_first         | 4549    |
| Handler_read_key           | 3058193 |
| Handler_read_last          | 0       |
| Handler_read_next          | 5108721 |
| Handler_read_prev          | 50      |
| Handler_read_rnd           | 57408   |
| Handler_read_rnd_next      | 3498842 |
+­­­­­­­­­­­­­­­­­­­­­­­­­­­­+­­­­­­­­­+




●   The handler_read_* status variables:
    http://www.fromdual.com/mysql-handler-
    read-status-variables

                                           www.fromdual.com   37
Q&A

                Fragen ?

              Diskussion?

  Wir haben noch Zeit für persönliche und
           indviduelle Beratung

                und bieten

 Support, Schulung und Betrieb für MySQL

                 www.fromdual.com           38

More Related Content

What's hot

Perl Stored Procedures for MySQL (2009)
Perl Stored Procedures for MySQL (2009)Perl Stored Procedures for MySQL (2009)
Perl Stored Procedures for MySQL (2009)
Antony T Curtis
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQL
Antony T Curtis
 

What's hot (20)

FOSDEM 2015: gdb tips and tricks for MySQL DBAs
FOSDEM 2015: gdb tips and tricks for MySQL DBAsFOSDEM 2015: gdb tips and tricks for MySQL DBAs
FOSDEM 2015: gdb tips and tricks for MySQL DBAs
 
Perl Stored Procedures for MySQL (2009)
Perl Stored Procedures for MySQL (2009)Perl Stored Procedures for MySQL (2009)
Perl Stored Procedures for MySQL (2009)
 
Tracing and profiling my sql (percona live europe 2019) draft_1
Tracing and profiling my sql (percona live europe 2019) draft_1Tracing and profiling my sql (percona live europe 2019) draft_1
Tracing and profiling my sql (percona live europe 2019) draft_1
 
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomMore on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.
 
Instant add column for inno db in mariadb 10.3+ (fosdem 2018, second draft)
Instant add column for inno db in mariadb 10.3+ (fosdem 2018, second draft)Instant add column for inno db in mariadb 10.3+ (fosdem 2018, second draft)
Instant add column for inno db in mariadb 10.3+ (fosdem 2018, second draft)
 
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
 
More on gdb for my sql db as (fosdem 2016)
More on gdb for my sql db as (fosdem 2016)More on gdb for my sql db as (fosdem 2016)
More on gdb for my sql db as (fosdem 2016)
 
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)
 
Nine Circles of Inferno or Explaining the PostgreSQL Vacuum
Nine Circles of Inferno or Explaining the PostgreSQL VacuumNine Circles of Inferno or Explaining the PostgreSQL Vacuum
Nine Circles of Inferno or Explaining the PostgreSQL Vacuum
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)
 
Как PostgreSQL работает с диском
Как PostgreSQL работает с дискомКак PostgreSQL работает с диском
Как PostgreSQL работает с диском
 
External Language Stored Procedures for MySQL
External Language Stored Procedures for MySQLExternal Language Stored Procedures for MySQL
External Language Stored Procedures for MySQL
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
 
Backup automation in KAKAO
Backup automation in KAKAO Backup automation in KAKAO
Backup automation in KAKAO
 
MySQL async message subscription platform
MySQL async message subscription platformMySQL async message subscription platform
MySQL async message subscription platform
 

Viewers also liked (6)

FOSDEM 2012: MySQL synchronous replication in practice with Galera
FOSDEM 2012: MySQL synchronous replication in practice with GaleraFOSDEM 2012: MySQL synchronous replication in practice with Galera
FOSDEM 2012: MySQL synchronous replication in practice with Galera
 
Internet Briefing 2011: NoSQL with MySQL
Internet Briefing 2011: NoSQL with MySQLInternet Briefing 2011: NoSQL with MySQL
Internet Briefing 2011: NoSQL with MySQL
 
FROSCON 2011: MySQL Replication
FROSCON 2011: MySQL ReplicationFROSCON 2011: MySQL Replication
FROSCON 2011: MySQL Replication
 
FROSCON 2011: MySQL Performance Tuning
FROSCON 2011: MySQL Performance TuningFROSCON 2011: MySQL Performance Tuning
FROSCON 2011: MySQL Performance Tuning
 
DOAG 2011: MySQL Replication
DOAG 2011: MySQL ReplicationDOAG 2011: MySQL Replication
DOAG 2011: MySQL Replication
 
MySQL Backup
MySQL BackupMySQL Backup
MySQL Backup
 

Similar to Indexierung mit MySQL

56 Query Optimization
56 Query Optimization56 Query Optimization
56 Query Optimization
MYXPLAIN
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
webhostingguy
 
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Citus Data
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for Developers
Jonathan Levin
 
MySQL cluster 72 in the Cloud
MySQL cluster 72 in the CloudMySQL cluster 72 in the Cloud
MySQL cluster 72 in the Cloud
Marco Tusa
 

Similar to Indexierung mit MySQL (20)

56 Query Optimization
56 Query Optimization56 Query Optimization
56 Query Optimization
 
Which DBMS and Why?
Which DBMS and Why?Which DBMS and Why?
Which DBMS and Why?
 
Индексируем базу: как делать хорошо и не делать плохо Winter saint p 2021 m...
Индексируем базу: как делать хорошо и не делать плохо   Winter saint p 2021 m...Индексируем базу: как делать хорошо и не делать плохо   Winter saint p 2021 m...
Индексируем базу: как делать хорошо и не делать плохо Winter saint p 2021 m...
 
MySQL configuration - The most important Variables
MySQL configuration - The most important VariablesMySQL configuration - The most important Variables
MySQL configuration - The most important Variables
 
Introduction to Databases - query optimizations for MySQL
Introduction to Databases - query optimizations for MySQLIntroduction to Databases - query optimizations for MySQL
Introduction to Databases - query optimizations for MySQL
 
Performance Tuning Best Practices
Performance Tuning Best PracticesPerformance Tuning Best Practices
Performance Tuning Best Practices
 
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
Data Modeling, Normalization, and Denormalisation | FOSDEM '19 | Dimitri Font...
 
Star schema my sql
Star schema   my sqlStar schema   my sql
Star schema my sql
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for Developers
 
MySQL Performance Optimization
MySQL Performance OptimizationMySQL Performance Optimization
MySQL Performance Optimization
 
Storage Methods for Nonstandard Data Patterns
Storage Methods for Nonstandard Data PatternsStorage Methods for Nonstandard Data Patterns
Storage Methods for Nonstandard Data Patterns
 
Spark & Cassandra - DevFest Córdoba
Spark & Cassandra - DevFest CórdobaSpark & Cassandra - DevFest Córdoba
Spark & Cassandra - DevFest Córdoba
 
15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance
 
Data Warehouse Logical Design using Mysql
Data Warehouse Logical Design using MysqlData Warehouse Logical Design using Mysql
Data Warehouse Logical Design using Mysql
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
MySQL cluster 72 in the Cloud
MySQL cluster 72 in the CloudMySQL cluster 72 in the Cloud
MySQL cluster 72 in the Cloud
 
Fosdem2017 Scientific computing on Jruby
Fosdem2017  Scientific computing on JrubyFosdem2017  Scientific computing on Jruby
Fosdem2017 Scientific computing on Jruby
 
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
 
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of IndifferenceRob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
Rob Sullivan at Heroku's Waza 2013: Your Database -- A Story of Indifference
 
Apache doris (incubating) introduction
Apache doris (incubating) introductionApache doris (incubating) introduction
Apache doris (incubating) introduction
 

More from FromDual GmbH

More from FromDual GmbH (20)

MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
 
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA's
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/Recovery
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und Cluster
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für Entwickler
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?
 
Reading MySQL fingerprints
Reading MySQL fingerprintsReading MySQL fingerprints
Reading MySQL fingerprints
 
High-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQLHigh-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQL
 
MySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQLMySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQL
 
Need for Speed: Mysql indexing
Need for Speed: Mysql indexingNeed for Speed: Mysql indexing
Need for Speed: Mysql indexing
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 

Indexierung mit MySQL