SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
http://dasini.net/blog/
                          Olivier DASINI
                             présente




  Les nouveautés de MySQL 5.1


                  olivier@dasini.net

             http://dasini.net/blog/
MySQL 5.1 – Fonctionnalités
●   Le partitionnement
●   Le programmateur d'évènements
●   La journalisation par les données (row based)
●   MySQL Cluster : support des données sur
    disque
●   Les tables de journalisation
●   Le moteur de stockage CSV
●   Le support de XML/XPath
●   mysqlslap
http://dasini.net/blog/


       MySQL 5.1 – Le partitionnement

   ●   Fragmenter une table en fonction des données
       qu'elle contient pour:
       ●   Améliorer les performances lors de la recherche
           (pruning)
       ●   Faciliter certaines tâches de maintenance
       ●   Stocker les données et les index sur différents
           disques




                            Les nouveautés de MySQL 5.1              3
                    Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


       MySQL 5.1 – Le partitionnement

   CREATE TABLE ... ENGINE = <engine>
       PARTITION BY <type> ( <expression> )
   <engine> = MyIsam | InnoDB | Archive | Falcon | NDBCluster |
   Memory
   <type> = RANGE | LIST | HASH | KEY


   ●   4 types de partitionnement:
       ●   RANGE (par intervalle)
       ●   LIST (par liste)
       ●   HASH ou KEY (par hachage)
                              Les nouveautés de MySQL 5.1              4
                      Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


       MySQL 5.1 – Le partitionnement
   -- Partitionnement par intervalle
   CREATE TABLE City_part_range (
    ID int(11) NOT NULL AUTO_INCREMENT,
    Population int(11) NOT NULL DEFAULT 0,
    KEY ID (ID)
   ) ENGINE=MyISAM
    PARTITION BY RANGE (population) (
    PARTITION p1 VALUES LESS THAN (1000),
    PARTITION p2 VALUES LESS THAN (5000),
    PARTITION p3 VALUES LESS THAN (10000),
    PARTITION p5 VALUES LESS THAN MAXVALUE );
                             Les nouveautés de MySQL 5.1              5
                     Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


      MySQL 5.1 – Le partitionnement
   -- Partitionnement par key
   CREATE TABLE City_part_key (
     ID int(11) NOT NULL AUTO_INCREMENT,
     Name char(35) NOT NULL DEFAULT '',
     CountryCode char(3) NOT NULL DEFAULT '',
     District char(20) NOT NULL DEFAULT '',
     Population int(11) NOT NULL DEFAULT 0,
     PRIMARY KEY (ID)
   ) ENGINE=InnoDB PARTITION BY KEY () PARTITIONS 6;

                          Les nouveautés de MySQL 5.1              6
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


       MySQL 5.1 – Le partitionnement
   -- Partitionnement par liste
   CREATE TABLE Country_part_list (
    Code char(3) NOT NULL DEFAULT '',
    Continent tinyint UNSIGNED DEFAULT 1,
    KEY (Code)
   ) ENGINE=MEMORY
    PARTITION BY LIST(Continent) (
    PARTITION pCateg1 VALUES IN (1),
    PARTITION pCateg2 VALUES IN (4),
    PARTITION pCateg3 VALUES IN (2,6),
    PARTITION pCateg4 VALUES IN (3,5,7));
                             Les nouveautés de MySQL 5.1              7
                     Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


         MySQL 5.1 – Les évènements


   ●Planificateur de tâches (CRON-like) embarqué
   dans MySQL 5.1
   ●Exécute des requêtes, en fonction de la date et
   de l'heure
   ●   De façon récurrente (EVERY) ou unique (AT)




                          Les nouveautés de MySQL 5.1              8
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


        MySQL 5.1 – Les évènements


   CREATE EVENT nom_evenement ON SCHEDULE
      <moment> DO <code_sql>

   Peut être lancé une seule fois (AT) ou de manière
   répétitive (EVERY):
        <moment> = AT | EVERY

   L'évènement est constitué d'un ensemble de
   requêtes:
        <code_sql> = requêtes sql                                  9
                          Les nouveautés de MySQL 5.1
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


        MySQL 5.1 – Les évènements

   -- Créer une vue matérialisée rafraîchie toutes les 10 minutes

   DELIMITER //
   CREATE EVENT vue_materialisee
   ON SCHEDULE EVERY 10 MINUTE
   DO
   BEGIN
    TRUNCATE TABLE _event.City_fra;
    INSERT INTO _event.City_fra
      SELECT * FROM world.City WHERE CountryCode='FRA'
      ORDER BY name;
   END//
   DELIMITER ;
                           Les nouveautés de MySQL 5.1              10
                   Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


           MySQL 5.1 – Row based login


   ●   Jusqu'à MySQL 5.0.x: statement based login
       seulement
       ●   Enregistrement de la requête dans le log
           binaire
   ●   MySQL 5.1: row based login possible:
       ●   Enregistrement du résultat de la requête

                           Les nouveautés de MySQL 5.1              11
                   Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


         MySQL 5.1 – Row based login


   Trois options de journalisation :

   ●   Statement : journalise la requête telle-quelle

   ●   Row : journalise le résultat de la requête

   ● Mixed : MySQL choisit entre statement et row en
   fonction du contexte.

                          Les nouveautés de MySQL 5.1              12
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


        MySQL 5.1 – Row based login
   -- Modification du mode de journalisation

   mysql> SHOW VARIABLES LIKE 'binlog_format';
   +---------------+-----------+
   | Variable_name | Value |
   +---------------+-----------+
   | binlog_format | STATEMENT |
   +---------------+-----------+

   mysql> SET SESSION binlog_format='ROW';

   mysql> SHOW VARIABLES LIKE 'binlog_format';
   +---------------+-------+
   | Variable_name | Value |
   +---------------+-------+
   | binlog_format | ROW |
   +---------------+-------+
                            Les nouveautés de MySQL 5.1              13
                    Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


           MySQL 5.1 – MySQL Cluster

   ●   Jusqu'à MySQL 5.0.x : Données et index qu'en mémoire.

   ●   MySQL 5.1: Possible de mettre les données sur disque.




                           Les nouveautés de MySQL 5.1              14
                   Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


         MySQL 5.1 – MySQL Cluster

   LOGFILE GROUP : permet gérer les undo log et le crash-recovery

   -- Création d'un logfile group

   CREATE LOGFILE GROUP lg_1
    ADD UNDOFILE 'undo_1.dat'
    INITIAL_SIZE 16M
    UNDO_BUFFER_SIZE 2M
    ENGINE NDB;
   ALTER LOGFILE GROUP lg_1
    ADD UNDOFILE 'undo_2.dat'
    INITIAL_SIZE 12M
    ENGINE NDB;
                           Les nouveautés de MySQL 5.1              15
                   Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


         MySQL 5.1 – MySQL Cluster

   TABLESPACE : pour stocker les données.

   -- Création d'un tablespace

   CREATE TABLESPACE ts_1
    ADD DATAFILE 'data_1.dat'
    USE LOGFILE GROUP lg_1
    INITIAL_SIZE 32M
    ENGINE NDB;
   ALTER TABLESPACE ts_1
    ADD DATAFILE 'data_2.dat'
    INITIAL_SIZE 48M
    ENGINE NDB;
                          Les nouveautés de MySQL 5.1              16
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


         MySQL 5.1 – MySQL Cluster

   -- Table au format NDBCluster avec données sur disque

   CREATE TABLE 'City' (
     'ID' int(11) NOT NULL AUTO_INCREMENT,
     'Name' char(35) NOT NULL DEFAULT '',
     'Population' int(11) NOT NULL DEFAULT '0',
     PRIMARY KEY ('ID')
   ) TABLESPACE ts_1
     STORAGE DISK
     ENGINE=NDB;

                          Les nouveautés de MySQL 5.1              17
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


   MySQL 5.1 – Table de journalisation


    ●   general log: journaliser l'activité du serveur
    ● slow query log: journaliser seulement les
    requêtes lentes
    ●   Journaliser dans un fichier ou dans un table




                          Les nouveautés de MySQL 5.1              18
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


   MySQL 5.1 – Table de journalisation

    Activable à chaud
    SET GLOBAL general_log = 'ON';
    SET GLOBAL slow_query_log = 'ON';


    Choix du format de journalisation

    SET GLOBAL log_output = 'TABLE';
    SET GLOBAL log_output = 'FILE';
    SET GLOBAL log_output = 'TABLE,FILE';
    SET GLOBAL log_output = 'NONE';
                          Les nouveautés de MySQL 5.1              19
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


   MySQL 5.1 – Table de journalisation
    SELECT * FROM mysql.general_log WHERE argument like
    'select%from%select%'G

    *************************** 1. row ***************************
      event_time: 2009-03-01 18:49:49
       user_host: root[root] @ localhost [127.0.0.1]
       thread_id: 12
       server_id: 3306
    command_type: Query
        argument: select * from city where countrycode in (select code
    from country where continent='europe') group by
    countrycode

    *************************** 2. row ***************************
     ...
                             Les nouveautés de MySQL 5.1              20
                     Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


 MySQL 5.1 – Moteur de stockage CSV


    ● Stocker les données dans un fichier texte au format
    CSV
    ● Editable avec un tableur ou éditeur de textes


    ● Import / export par simple « copier/coller »




                          Les nouveautés de MySQL 5.1              21
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


 MySQL 5.1 – Moteur de stockage CSV


    -- Création d'une table au format CSV

    CREATE TABLE t_csv (
      id int,
      nom CHAR(50),
      prenom CHAR(50)
    )
    ENGINE=CSV;

                          Les nouveautés de MySQL 5.1              22
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


                MySQL 5.1 – XML /XPath


    ●   Support basique de XML avec deux fonctions:
        ●    ExtractValue : extraire les valeurs des
            différentes balises
        ●    UpdateXML : modifier la sortie d'un
            document XML


                             Les nouveautés de MySQL 5.1              23
                     Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


             MySQL 5.1 – XML /XPath



    SELECT EXTRACTVALUE
    (texte,'/profil/consultant[contains(@categorie,"MySQL")]/con
    sultant) AS Expert_MySQL FROM consultant_xml;

    +---------------------+
    | Expert_MySQL |
    +---------------------+
    | Olivier DASINI |
    +---------------------+

                             Les nouveautés de MySQL 5.1              24
                     Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


               MySQL 5.1 – mysqlslap


    ●Permet d'effectuer des tests de stress et de charge
    sur votre serveur MySQL
    ●Envoie des requêtes au serveur MySQL en créant
    plusieurs connexions simultanées
    ●Un rapport de diagnostic est crée sur la sortie
    standard.
    ●   Possibilité de l'écrire dans un fichier au format CSV
                            Les nouveautés de MySQL 5.1              25
                    Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


             MySQL 5.1 – mysqlslap


    --Tests de performances avec des tables MyISAM et
    innoDB

    mysqlslap --user=daz --password
      --concurrency=1,100
      --iterations=10 –number-of-queries=1000
      --engine=myisam,innodb
      --auto-generate-sql --number-int-cols=2
      --number-char-cols=3
      --auto-generate-sql-load-type=mixed
                          Les nouveautés de MySQL 5.1              26
                  Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/


               MySQL 5.1 – mysqlslap
    Benchmark
     Running for engine myisam
     Average number of seconds to run all queries: 1.576 seconds
     Minimum number of seconds to run all queries: 1.539 seconds
     Maximum number of seconds to run all queries: 1.631 seconds
     Number of clients running queries: 1
     Average number of queries per client: 1000
    Benchmark
     Running for engine myisam
     Average number of seconds to run all queries: 1.792 seconds
     Minimum number of seconds to run all queries: 1.543 seconds
     Maximum number of seconds to run all queries: 2.107 seconds
     Number of clients running queries: 100
     Average number of queries per client: 10
    Benchmark
     Running for engine innodb
     Average number of seconds to run all queries: 2.477 seconds
     ...
                             Les nouveautés de MySQL 5.1              27
                     Olivier DASINI - http://dasini.net/blog - 2009
http://dasini.net/blog/
                          Olivier DASINI
                           vous a présenté


              Les nouveautés de MySQL 5.1



      http://dasini.net/blog/

                  olivier@dasini.net

                                             28

Contenu connexe

Tendances

Réplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden GateRéplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden GateMor THIAM
 
Administration des base de donnees sous oracle 10g
Administration des base de donnees sous oracle 10g Administration des base de donnees sous oracle 10g
Administration des base de donnees sous oracle 10g noble Bajoli
 
Oracle 12c in memory en action
Oracle 12c in memory en actionOracle 12c in memory en action
Oracle 12c in memory en actionLaurent Leturgez
 
Jeudis du Libre - MySQL InnoDB Cluster
Jeudis du Libre - MySQL InnoDB ClusterJeudis du Libre - MySQL InnoDB Cluster
Jeudis du Libre - MySQL InnoDB ClusterFrederic Descamps
 
Administration oracle7
Administration oracle7Administration oracle7
Administration oracle7Lucian Carabet
 
EBIZNEXT-RIAK
EBIZNEXT-RIAKEBIZNEXT-RIAK
EBIZNEXT-RIAKebiznext
 
Meetup Drupal Lyon - Sécuriser un site drupal
Meetup Drupal Lyon - Sécuriser un site drupalMeetup Drupal Lyon - Sécuriser un site drupal
Meetup Drupal Lyon - Sécuriser un site drupalAurelien Navarre
 
Webinar - Enterprise Cloud Databases
Webinar - Enterprise Cloud DatabasesWebinar - Enterprise Cloud Databases
Webinar - Enterprise Cloud DatabasesOVHcloud
 
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...GUSS
 
Scalabilité de MongoDB
Scalabilité de MongoDBScalabilité de MongoDB
Scalabilité de MongoDBMongoDB
 
Concepts de sauvegarde et de récupération
Concepts de sauvegarde et de récupérationConcepts de sauvegarde et de récupération
Concepts de sauvegarde et de récupérationSoukaina Boujadi
 
Architecture d'annuaire hautement disponible avec OpenLDAP
Architecture d'annuaire hautement disponible avec OpenLDAPArchitecture d'annuaire hautement disponible avec OpenLDAP
Architecture d'annuaire hautement disponible avec OpenLDAPLINAGORA
 
Stockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.comStockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.comDamien Krotkine
 
(R)évolutionnez vos bases de données avec Liquibase
(R)évolutionnez vos bases de données avec Liquibase(R)évolutionnez vos bases de données avec Liquibase
(R)évolutionnez vos bases de données avec LiquibaseFlorent Biville
 
Realtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et MesosRealtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et Mesosebiznext
 
Optimisation de la plateforme de Supervision Zabbix
Optimisation de la plateforme de Supervision ZabbixOptimisation de la plateforme de Supervision Zabbix
Optimisation de la plateforme de Supervision ZabbixAlain Ganuchaud
 

Tendances (20)

Réplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden GateRéplication de base de données oracle avec Golden Gate
Réplication de base de données oracle avec Golden Gate
 
Administration des base de donnees sous oracle 10g
Administration des base de donnees sous oracle 10g Administration des base de donnees sous oracle 10g
Administration des base de donnees sous oracle 10g
 
Oracle 12c in memory en action
Oracle 12c in memory en actionOracle 12c in memory en action
Oracle 12c in memory en action
 
Infrastructure as code drupal
Infrastructure as code drupalInfrastructure as code drupal
Infrastructure as code drupal
 
Jeudis du Libre - MySQL InnoDB Cluster
Jeudis du Libre - MySQL InnoDB ClusterJeudis du Libre - MySQL InnoDB Cluster
Jeudis du Libre - MySQL InnoDB Cluster
 
Administration oracle7
Administration oracle7Administration oracle7
Administration oracle7
 
Pgbadger
PgbadgerPgbadger
Pgbadger
 
EBIZNEXT-RIAK
EBIZNEXT-RIAKEBIZNEXT-RIAK
EBIZNEXT-RIAK
 
Riak introduction
Riak introductionRiak introduction
Riak introduction
 
Meetup Drupal Lyon - Sécuriser un site drupal
Meetup Drupal Lyon - Sécuriser un site drupalMeetup Drupal Lyon - Sécuriser un site drupal
Meetup Drupal Lyon - Sécuriser un site drupal
 
Webinar - Enterprise Cloud Databases
Webinar - Enterprise Cloud DatabasesWebinar - Enterprise Cloud Databases
Webinar - Enterprise Cloud Databases
 
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
SQLSaturday Paris 2014 - SQL Server AlwaysOn et les groupes de disponibilités...
 
Scalabilité de MongoDB
Scalabilité de MongoDBScalabilité de MongoDB
Scalabilité de MongoDB
 
Liquibase en action
Liquibase en actionLiquibase en action
Liquibase en action
 
Concepts de sauvegarde et de récupération
Concepts de sauvegarde et de récupérationConcepts de sauvegarde et de récupération
Concepts de sauvegarde et de récupération
 
Architecture d'annuaire hautement disponible avec OpenLDAP
Architecture d'annuaire hautement disponible avec OpenLDAPArchitecture d'annuaire hautement disponible avec OpenLDAP
Architecture d'annuaire hautement disponible avec OpenLDAP
 
Stockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.comStockage et analyse temps réel d'événements avec Riak chez Booking.com
Stockage et analyse temps réel d'événements avec Riak chez Booking.com
 
(R)évolutionnez vos bases de données avec Liquibase
(R)évolutionnez vos bases de données avec Liquibase(R)évolutionnez vos bases de données avec Liquibase
(R)évolutionnez vos bases de données avec Liquibase
 
Realtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et MesosRealtime Web avec Kafka, Spark et Mesos
Realtime Web avec Kafka, Spark et Mesos
 
Optimisation de la plateforme de Supervision Zabbix
Optimisation de la plateforme de Supervision ZabbixOptimisation de la plateforme de Supervision Zabbix
Optimisation de la plateforme de Supervision Zabbix
 

En vedette

Architectures haute disponibilité avec MySQL
Architectures haute disponibilité avec MySQLArchitectures haute disponibilité avec MySQL
Architectures haute disponibilité avec MySQLOlivier DASINI
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreOlivier DASINI
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionOlivier DASINI
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMorgan Tocker
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceOlivier DASINI
 
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinOlivier DASINI
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterOlivier DASINI
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Olivier DASINI
 
Quickie Incanter/Clojure à Devoxx France 2012
Quickie Incanter/Clojure à Devoxx France 2012Quickie Incanter/Clojure à Devoxx France 2012
Quickie Incanter/Clojure à Devoxx France 2012Claude Falguiere
 
Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeOlivier DASINI
 
Les marques vont elles devenir les premiers médias ?
Les marques vont elles devenir les premiers médias ?Les marques vont elles devenir les premiers médias ?
Les marques vont elles devenir les premiers médias ?LaNetscouade
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for websiteOdoo
 
Epc project interdepency and Work Flow- promo
Epc project interdepency and Work Flow- promoEpc project interdepency and Work Flow- promo
Epc project interdepency and Work Flow- promoignitetribes
 
Analysing Smart City Development in india
Analysing Smart City Development in indiaAnalysing Smart City Development in india
Analysing Smart City Development in indiaOmkar Parishwad
 
The Literature Review Process
The Literature Review ProcessThe Literature Review Process
The Literature Review Processannielibrarian
 

En vedette (20)

Architectures haute disponibilité avec MySQL
Architectures haute disponibilité avec MySQLArchitectures haute disponibilité avec MySQL
Architectures haute disponibilité avec MySQL
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
 
MySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The DolphinMySQL Day Paris 2016 - State Of The Dolphin
MySQL Day Paris 2016 - State Of The Dolphin
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8Case Study: MySQL migration from latin1 to UTF-8
Case Study: MySQL migration from latin1 to UTF-8
 
Who is this_latvian
Who is this_latvianWho is this_latvian
Who is this_latvian
 
Quickie Incanter/Clojure à Devoxx France 2012
Quickie Incanter/Clojure à Devoxx France 2012Quickie Incanter/Clojure à Devoxx France 2012
Quickie Incanter/Clojure à Devoxx France 2012
 
maths ppt on circles
 maths ppt on circles maths ppt on circles
maths ppt on circles
 
Droit d'auteur belge en 2011
Droit d'auteur belge en 2011Droit d'auteur belge en 2011
Droit d'auteur belge en 2011
 
Propriété intellectuelle nov 2012
Propriété intellectuelle nov 2012Propriété intellectuelle nov 2012
Propriété intellectuelle nov 2012
 
Upgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtimeUpgrade to MySQL 5.6 without downtime
Upgrade to MySQL 5.6 without downtime
 
Les marques vont elles devenir les premiers médias ?
Les marques vont elles devenir les premiers médias ?Les marques vont elles devenir les premiers médias ?
Les marques vont elles devenir les premiers médias ?
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
 
Epc project interdepency and Work Flow- promo
Epc project interdepency and Work Flow- promoEpc project interdepency and Work Flow- promo
Epc project interdepency and Work Flow- promo
 
Analysing Smart City Development in india
Analysing Smart City Development in indiaAnalysing Smart City Development in india
Analysing Smart City Development in india
 
The Literature Review Process
The Literature Review ProcessThe Literature Review Process
The Literature Review Process
 

Similaire à Les nouveautés de MySQL 5.1

Mariadb pour les developpeurs - OSDC
Mariadb pour les developpeurs - OSDCMariadb pour les developpeurs - OSDC
Mariadb pour les developpeurs - OSDCChristophe Villeneuve
 
introduction au SQL et MySQL
introduction au SQL et MySQLintroduction au SQL et MySQL
introduction au SQL et MySQLAbdoulaye Dieng
 
c11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdf
c11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdfc11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdf
c11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdftepoha4848
 
Développement Web- PHP (partie II).pdf
Développement Web- PHP (partie II).pdfDéveloppement Web- PHP (partie II).pdf
Développement Web- PHP (partie II).pdfYasushiTsubakik
 
Sécuriser & chiffrer Mariadb - JDLL 2017
Sécuriser & chiffrer Mariadb - JDLL 2017Sécuriser & chiffrer Mariadb - JDLL 2017
Sécuriser & chiffrer Mariadb - JDLL 2017Christophe Villeneuve
 
LP_chapitre3_Creation et gestion_BD_2019.pptx
LP_chapitre3_Creation et gestion_BD_2019.pptxLP_chapitre3_Creation et gestion_BD_2019.pptx
LP_chapitre3_Creation et gestion_BD_2019.pptxFATIMAEZZAHRAEOUBELL
 
Digital GraphTour Paris - Neo4j 4.0, les nouveautés
Digital GraphTour Paris - Neo4j 4.0, les nouveautésDigital GraphTour Paris - Neo4j 4.0, les nouveautés
Digital GraphTour Paris - Neo4j 4.0, les nouveautésNeo4j
 
myLittleAdmin and myLittleBackup Presentation
myLittleAdmin and myLittleBackup PresentationmyLittleAdmin and myLittleBackup Presentation
myLittleAdmin and myLittleBackup PresentationElian Chrebor
 
Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)
Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)
Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)Alphorm
 
Initiation au langage MySQL
Initiation au langage MySQLInitiation au langage MySQL
Initiation au langage MySQLmohamednacim
 
Gestion des LOGS savec syslog+loganalyzer
Gestion des LOGS savec syslog+loganalyzerGestion des LOGS savec syslog+loganalyzer
Gestion des LOGS savec syslog+loganalyzerMohamet Lamine DIOP
 
Présentation Ansible Ikoula
Présentation Ansible IkoulaPrésentation Ansible Ikoula
Présentation Ansible IkoulaIkoula
 
Usages autour d’Ansible chez ikoula
Usages autour d’Ansible chez ikoulaUsages autour d’Ansible chez ikoula
Usages autour d’Ansible chez ikoulaNicolas Trauwaen
 

Similaire à Les nouveautés de MySQL 5.1 (20)

Mariadb pour les developpeurs - OSDC
Mariadb pour les developpeurs - OSDCMariadb pour les developpeurs - OSDC
Mariadb pour les developpeurs - OSDC
 
introduction au SQL et MySQL
introduction au SQL et MySQLintroduction au SQL et MySQL
introduction au SQL et MySQL
 
Mariadb une base de données NewSQL
Mariadb une base de données NewSQLMariadb une base de données NewSQL
Mariadb une base de données NewSQL
 
c11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdf
c11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdfc11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdf
c11-gerer-les-donnees-resume-theorique-partie1-6311eb2f1d745.pdf
 
PHP et MariaDB dans le Cloud
PHP et MariaDB dans le CloudPHP et MariaDB dans le Cloud
PHP et MariaDB dans le Cloud
 
Le nouveau AMP : apache mariadb php
Le nouveau AMP : apache mariadb phpLe nouveau AMP : apache mariadb php
Le nouveau AMP : apache mariadb php
 
Développement Web- PHP (partie II).pdf
Développement Web- PHP (partie II).pdfDéveloppement Web- PHP (partie II).pdf
Développement Web- PHP (partie II).pdf
 
MySQL et MariaDB dans le web‎
MySQL et MariaDB dans le web‎ MySQL et MariaDB dans le web‎
MySQL et MariaDB dans le web‎
 
Sécuriser & chiffrer Mariadb - JDLL 2017
Sécuriser & chiffrer Mariadb - JDLL 2017Sécuriser & chiffrer Mariadb - JDLL 2017
Sécuriser & chiffrer Mariadb - JDLL 2017
 
LP_chapitre3_Creation et gestion_BD_2019.pptx
LP_chapitre3_Creation et gestion_BD_2019.pptxLP_chapitre3_Creation et gestion_BD_2019.pptx
LP_chapitre3_Creation et gestion_BD_2019.pptx
 
MariaDB une base de donnees NewSQL
MariaDB une base de donnees NewSQLMariaDB une base de donnees NewSQL
MariaDB une base de donnees NewSQL
 
Digital GraphTour Paris - Neo4j 4.0, les nouveautés
Digital GraphTour Paris - Neo4j 4.0, les nouveautésDigital GraphTour Paris - Neo4j 4.0, les nouveautés
Digital GraphTour Paris - Neo4j 4.0, les nouveautés
 
Les fonctions MariaDB - LeMug.fr
Les fonctions MariaDB - LeMug.frLes fonctions MariaDB - LeMug.fr
Les fonctions MariaDB - LeMug.fr
 
myLittleAdmin and myLittleBackup Presentation
myLittleAdmin and myLittleBackup PresentationmyLittleAdmin and myLittleBackup Presentation
myLittleAdmin and myLittleBackup Presentation
 
Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)
Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)
Alphorm.com Formation F5 BIG-IP DNS (anciennement GTM)
 
Initiation au langage MySQL
Initiation au langage MySQLInitiation au langage MySQL
Initiation au langage MySQL
 
Gestion des LOGS savec syslog+loganalyzer
Gestion des LOGS savec syslog+loganalyzerGestion des LOGS savec syslog+loganalyzer
Gestion des LOGS savec syslog+loganalyzer
 
Chiffrer et sécuriser MariaDB
Chiffrer et sécuriser MariaDBChiffrer et sécuriser MariaDB
Chiffrer et sécuriser MariaDB
 
Présentation Ansible Ikoula
Présentation Ansible IkoulaPrésentation Ansible Ikoula
Présentation Ansible Ikoula
 
Usages autour d’Ansible chez ikoula
Usages autour d’Ansible chez ikoulaUsages autour d’Ansible chez ikoula
Usages autour d’Ansible chez ikoula
 

Plus de Olivier DASINI

MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...Olivier DASINI
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsOlivier DASINI
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best PracticesOlivier DASINI
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryOlivier DASINI
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamOlivier DASINI
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryOlivier DASINI
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryOlivier DASINI
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryOlivier DASINI
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryOlivier DASINI
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryOlivier DASINI
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinOlivier DASINI
 
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsMySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsOlivier DASINI
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...Olivier DASINI
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreOlivier DASINI
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?Olivier DASINI
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018Olivier DASINI
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...Olivier DASINI
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?Olivier DASINI
 

Plus de Olivier DASINI (20)

MySQL High Availability Solutions - Avoid loss of service by reducing the r...
MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...MySQL High Availability Solutions  -  Avoid loss of service by reducing the r...
MySQL High Availability Solutions - Avoid loss of service by reducing the r...
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
MySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features SummaryMySQL 8.0.22 - New Features Summary
MySQL 8.0.22 - New Features Summary
 
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL TeamMySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
MySQL Database Service - 100% Developed, Managed and Supported by the MySQL Team
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
MySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features SummaryMySQL 8.0.21 - New Features Summary
MySQL 8.0.21 - New Features Summary
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features Summary
 
MySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features SummaryMySQL 8.0.18 - New Features Summary
MySQL 8.0.18 - New Features Summary
 
MySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features SummaryMySQL 8.0.17 - New Features Summary
MySQL 8.0.17 - New Features Summary
 
MySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features SummaryMySQL 8.0.16 New Features Summary
MySQL 8.0.16 New Features Summary
 
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the DolphinMySQL Day Paris 2018 - Introduction & The State of the Dolphin
MySQL Day Paris 2018 - Introduction & The State of the Dolphin
 
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirementsMySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
MySQL Day Paris 2018 - MySQL & GDPR; Privacy and Security requirements
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
 
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
MySQL Day Paris 2018 - MySQL InnoDB Cluster; A complete High Availability sol...
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
 
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
MySQL JSON Document Store - A Document Store with all the benefits of a Trans...
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
 

Les nouveautés de MySQL 5.1

  • 1. http://dasini.net/blog/ Olivier DASINI présente Les nouveautés de MySQL 5.1 olivier@dasini.net http://dasini.net/blog/
  • 2. MySQL 5.1 – Fonctionnalités ● Le partitionnement ● Le programmateur d'évènements ● La journalisation par les données (row based) ● MySQL Cluster : support des données sur disque ● Les tables de journalisation ● Le moteur de stockage CSV ● Le support de XML/XPath ● mysqlslap
  • 3. http://dasini.net/blog/ MySQL 5.1 – Le partitionnement ● Fragmenter une table en fonction des données qu'elle contient pour: ● Améliorer les performances lors de la recherche (pruning) ● Faciliter certaines tâches de maintenance ● Stocker les données et les index sur différents disques Les nouveautés de MySQL 5.1 3 Olivier DASINI - http://dasini.net/blog - 2009
  • 4. http://dasini.net/blog/ MySQL 5.1 – Le partitionnement CREATE TABLE ... ENGINE = <engine> PARTITION BY <type> ( <expression> ) <engine> = MyIsam | InnoDB | Archive | Falcon | NDBCluster | Memory <type> = RANGE | LIST | HASH | KEY ● 4 types de partitionnement: ● RANGE (par intervalle) ● LIST (par liste) ● HASH ou KEY (par hachage) Les nouveautés de MySQL 5.1 4 Olivier DASINI - http://dasini.net/blog - 2009
  • 5. http://dasini.net/blog/ MySQL 5.1 – Le partitionnement -- Partitionnement par intervalle CREATE TABLE City_part_range ( ID int(11) NOT NULL AUTO_INCREMENT, Population int(11) NOT NULL DEFAULT 0, KEY ID (ID) ) ENGINE=MyISAM PARTITION BY RANGE (population) ( PARTITION p1 VALUES LESS THAN (1000), PARTITION p2 VALUES LESS THAN (5000), PARTITION p3 VALUES LESS THAN (10000), PARTITION p5 VALUES LESS THAN MAXVALUE ); Les nouveautés de MySQL 5.1 5 Olivier DASINI - http://dasini.net/blog - 2009
  • 6. http://dasini.net/blog/ MySQL 5.1 – Le partitionnement -- Partitionnement par key CREATE TABLE City_part_key ( ID int(11) NOT NULL AUTO_INCREMENT, Name char(35) NOT NULL DEFAULT '', CountryCode char(3) NOT NULL DEFAULT '', District char(20) NOT NULL DEFAULT '', Population int(11) NOT NULL DEFAULT 0, PRIMARY KEY (ID) ) ENGINE=InnoDB PARTITION BY KEY () PARTITIONS 6; Les nouveautés de MySQL 5.1 6 Olivier DASINI - http://dasini.net/blog - 2009
  • 7. http://dasini.net/blog/ MySQL 5.1 – Le partitionnement -- Partitionnement par liste CREATE TABLE Country_part_list ( Code char(3) NOT NULL DEFAULT '', Continent tinyint UNSIGNED DEFAULT 1, KEY (Code) ) ENGINE=MEMORY PARTITION BY LIST(Continent) ( PARTITION pCateg1 VALUES IN (1), PARTITION pCateg2 VALUES IN (4), PARTITION pCateg3 VALUES IN (2,6), PARTITION pCateg4 VALUES IN (3,5,7)); Les nouveautés de MySQL 5.1 7 Olivier DASINI - http://dasini.net/blog - 2009
  • 8. http://dasini.net/blog/ MySQL 5.1 – Les évènements ●Planificateur de tâches (CRON-like) embarqué dans MySQL 5.1 ●Exécute des requêtes, en fonction de la date et de l'heure ● De façon récurrente (EVERY) ou unique (AT) Les nouveautés de MySQL 5.1 8 Olivier DASINI - http://dasini.net/blog - 2009
  • 9. http://dasini.net/blog/ MySQL 5.1 – Les évènements CREATE EVENT nom_evenement ON SCHEDULE <moment> DO <code_sql> Peut être lancé une seule fois (AT) ou de manière répétitive (EVERY): <moment> = AT | EVERY L'évènement est constitué d'un ensemble de requêtes: <code_sql> = requêtes sql 9 Les nouveautés de MySQL 5.1 Olivier DASINI - http://dasini.net/blog - 2009
  • 10. http://dasini.net/blog/ MySQL 5.1 – Les évènements -- Créer une vue matérialisée rafraîchie toutes les 10 minutes DELIMITER // CREATE EVENT vue_materialisee ON SCHEDULE EVERY 10 MINUTE DO BEGIN TRUNCATE TABLE _event.City_fra; INSERT INTO _event.City_fra SELECT * FROM world.City WHERE CountryCode='FRA' ORDER BY name; END// DELIMITER ; Les nouveautés de MySQL 5.1 10 Olivier DASINI - http://dasini.net/blog - 2009
  • 11. http://dasini.net/blog/ MySQL 5.1 – Row based login ● Jusqu'à MySQL 5.0.x: statement based login seulement ● Enregistrement de la requête dans le log binaire ● MySQL 5.1: row based login possible: ● Enregistrement du résultat de la requête Les nouveautés de MySQL 5.1 11 Olivier DASINI - http://dasini.net/blog - 2009
  • 12. http://dasini.net/blog/ MySQL 5.1 – Row based login Trois options de journalisation : ● Statement : journalise la requête telle-quelle ● Row : journalise le résultat de la requête ● Mixed : MySQL choisit entre statement et row en fonction du contexte. Les nouveautés de MySQL 5.1 12 Olivier DASINI - http://dasini.net/blog - 2009
  • 13. http://dasini.net/blog/ MySQL 5.1 – Row based login -- Modification du mode de journalisation mysql> SHOW VARIABLES LIKE 'binlog_format'; +---------------+-----------+ | Variable_name | Value | +---------------+-----------+ | binlog_format | STATEMENT | +---------------+-----------+ mysql> SET SESSION binlog_format='ROW'; mysql> SHOW VARIABLES LIKE 'binlog_format'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | binlog_format | ROW | +---------------+-------+ Les nouveautés de MySQL 5.1 13 Olivier DASINI - http://dasini.net/blog - 2009
  • 14. http://dasini.net/blog/ MySQL 5.1 – MySQL Cluster ● Jusqu'à MySQL 5.0.x : Données et index qu'en mémoire. ● MySQL 5.1: Possible de mettre les données sur disque. Les nouveautés de MySQL 5.1 14 Olivier DASINI - http://dasini.net/blog - 2009
  • 15. http://dasini.net/blog/ MySQL 5.1 – MySQL Cluster LOGFILE GROUP : permet gérer les undo log et le crash-recovery -- Création d'un logfile group CREATE LOGFILE GROUP lg_1 ADD UNDOFILE 'undo_1.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE 2M ENGINE NDB; ALTER LOGFILE GROUP lg_1 ADD UNDOFILE 'undo_2.dat' INITIAL_SIZE 12M ENGINE NDB; Les nouveautés de MySQL 5.1 15 Olivier DASINI - http://dasini.net/blog - 2009
  • 16. http://dasini.net/blog/ MySQL 5.1 – MySQL Cluster TABLESPACE : pour stocker les données. -- Création d'un tablespace CREATE TABLESPACE ts_1 ADD DATAFILE 'data_1.dat' USE LOGFILE GROUP lg_1 INITIAL_SIZE 32M ENGINE NDB; ALTER TABLESPACE ts_1 ADD DATAFILE 'data_2.dat' INITIAL_SIZE 48M ENGINE NDB; Les nouveautés de MySQL 5.1 16 Olivier DASINI - http://dasini.net/blog - 2009
  • 17. http://dasini.net/blog/ MySQL 5.1 – MySQL Cluster -- Table au format NDBCluster avec données sur disque CREATE TABLE 'City' ( 'ID' int(11) NOT NULL AUTO_INCREMENT, 'Name' char(35) NOT NULL DEFAULT '', 'Population' int(11) NOT NULL DEFAULT '0', PRIMARY KEY ('ID') ) TABLESPACE ts_1 STORAGE DISK ENGINE=NDB; Les nouveautés de MySQL 5.1 17 Olivier DASINI - http://dasini.net/blog - 2009
  • 18. http://dasini.net/blog/ MySQL 5.1 – Table de journalisation ● general log: journaliser l'activité du serveur ● slow query log: journaliser seulement les requêtes lentes ● Journaliser dans un fichier ou dans un table Les nouveautés de MySQL 5.1 18 Olivier DASINI - http://dasini.net/blog - 2009
  • 19. http://dasini.net/blog/ MySQL 5.1 – Table de journalisation Activable à chaud SET GLOBAL general_log = 'ON'; SET GLOBAL slow_query_log = 'ON'; Choix du format de journalisation SET GLOBAL log_output = 'TABLE'; SET GLOBAL log_output = 'FILE'; SET GLOBAL log_output = 'TABLE,FILE'; SET GLOBAL log_output = 'NONE'; Les nouveautés de MySQL 5.1 19 Olivier DASINI - http://dasini.net/blog - 2009
  • 20. http://dasini.net/blog/ MySQL 5.1 – Table de journalisation SELECT * FROM mysql.general_log WHERE argument like 'select%from%select%'G *************************** 1. row *************************** event_time: 2009-03-01 18:49:49 user_host: root[root] @ localhost [127.0.0.1] thread_id: 12 server_id: 3306 command_type: Query argument: select * from city where countrycode in (select code from country where continent='europe') group by countrycode *************************** 2. row *************************** ... Les nouveautés de MySQL 5.1 20 Olivier DASINI - http://dasini.net/blog - 2009
  • 21. http://dasini.net/blog/ MySQL 5.1 – Moteur de stockage CSV ● Stocker les données dans un fichier texte au format CSV ● Editable avec un tableur ou éditeur de textes ● Import / export par simple « copier/coller » Les nouveautés de MySQL 5.1 21 Olivier DASINI - http://dasini.net/blog - 2009
  • 22. http://dasini.net/blog/ MySQL 5.1 – Moteur de stockage CSV -- Création d'une table au format CSV CREATE TABLE t_csv ( id int, nom CHAR(50), prenom CHAR(50) ) ENGINE=CSV; Les nouveautés de MySQL 5.1 22 Olivier DASINI - http://dasini.net/blog - 2009
  • 23. http://dasini.net/blog/ MySQL 5.1 – XML /XPath ● Support basique de XML avec deux fonctions: ● ExtractValue : extraire les valeurs des différentes balises ● UpdateXML : modifier la sortie d'un document XML Les nouveautés de MySQL 5.1 23 Olivier DASINI - http://dasini.net/blog - 2009
  • 24. http://dasini.net/blog/ MySQL 5.1 – XML /XPath SELECT EXTRACTVALUE (texte,'/profil/consultant[contains(@categorie,"MySQL")]/con sultant) AS Expert_MySQL FROM consultant_xml; +---------------------+ | Expert_MySQL | +---------------------+ | Olivier DASINI | +---------------------+ Les nouveautés de MySQL 5.1 24 Olivier DASINI - http://dasini.net/blog - 2009
  • 25. http://dasini.net/blog/ MySQL 5.1 – mysqlslap ●Permet d'effectuer des tests de stress et de charge sur votre serveur MySQL ●Envoie des requêtes au serveur MySQL en créant plusieurs connexions simultanées ●Un rapport de diagnostic est crée sur la sortie standard. ● Possibilité de l'écrire dans un fichier au format CSV Les nouveautés de MySQL 5.1 25 Olivier DASINI - http://dasini.net/blog - 2009
  • 26. http://dasini.net/blog/ MySQL 5.1 – mysqlslap --Tests de performances avec des tables MyISAM et innoDB mysqlslap --user=daz --password --concurrency=1,100 --iterations=10 –number-of-queries=1000 --engine=myisam,innodb --auto-generate-sql --number-int-cols=2 --number-char-cols=3 --auto-generate-sql-load-type=mixed Les nouveautés de MySQL 5.1 26 Olivier DASINI - http://dasini.net/blog - 2009
  • 27. http://dasini.net/blog/ MySQL 5.1 – mysqlslap Benchmark Running for engine myisam Average number of seconds to run all queries: 1.576 seconds Minimum number of seconds to run all queries: 1.539 seconds Maximum number of seconds to run all queries: 1.631 seconds Number of clients running queries: 1 Average number of queries per client: 1000 Benchmark Running for engine myisam Average number of seconds to run all queries: 1.792 seconds Minimum number of seconds to run all queries: 1.543 seconds Maximum number of seconds to run all queries: 2.107 seconds Number of clients running queries: 100 Average number of queries per client: 10 Benchmark Running for engine innodb Average number of seconds to run all queries: 2.477 seconds ... Les nouveautés de MySQL 5.1 27 Olivier DASINI - http://dasini.net/blog - 2009
  • 28. http://dasini.net/blog/ Olivier DASINI vous a présenté Les nouveautés de MySQL 5.1 http://dasini.net/blog/ olivier@dasini.net 28