MySQLデータベースのパフォーマンス最適化の1つ(キャッシュパラメータ最適化)


         IO        ,                 。     ,                   ,             IO      ,    3    。  ,      ,             IO,      IO     IO。     MySQL    IO    (    )                IO  :

query_cache_size/query_cache_type (global)
   Query cache       MySQL Instance,       MySQL    ResultSet,     SQL        ,        select  。       Query Cache   ,MySQL      select      ,       Query Cache   (          Query Cache,            Query Cache),MySQL            HASH       select          hash,   Query Cache            。    ,        , select           ,            (  SQL     ,                 ),       。
      ,Query Cache          ,                 ,            select   Query Cache         。  ,                ,  Query Cache        。
    Query Cache           ,         query_cache_size   query_cache_type ,         ResultSet      ,            Query Cache。        ,                MySQL   ,query_cache_size    256MB           。  ,       Query Cache    (Qcache_hits/(Qcache_hits+Qcache_inserts)*100))     。query_cache_type     0(OFF),1(ON)  2(DEMOND),         query cache,        query cache(  sql_no_cache)      select   query cache,         query cache(  sql_cache)。

binlog_cache_size (global)
    Binlog Cache            (binlog)       ,  MySQL     binlog                     binlog       。
        ,                ,         ,2MB~4MB        。               ,      ,      binlog_cache_size。  ,      binlog_cache_use    binlog_cache_disk_use      binlog_cache_size    ,      binlog_cache               (binlog_cache_disk_use)    。

key_buffer_size (global)
    Key Buffer              MySQL      ,     MySQL              ,         ,    MySQL                        。key_buffer_size            MyISAM                。          ,                    MyISAM         ,        。
      ,      MyISAM                   ,   MyISAM                       ,          。  ,    SQL                 ,               。

bulk_insert_buffer_size (thread)
     key_buffer_size  ,              MyISAM    ,                     。                  ,                              :
    insertselectinsertvalues (…) ,(…),(…)…
    load data infile… into… (   )

innodb_buffer_pool_size(global)
         InnoDB       ,innodb_buffer_pool_size                       ,          InnoDB              ,    MyISAM       key_buffer_size   ,  ,      Oracle   db_cache_size。    ,        InnoDB     ,                         ,             。
     key_buffer_size    MyISAM     ,innodb_buffer_pool_size     InnoDB                   ,      InnoDB       ,            ,            ,       InnoDB                 ,    。
           (Innodb_buffer_pool_read_requests – Innodb_buffer_pool_reads) / Innodb_buffer_pool_read_requests * 100%        ,          innodb_buffer_pool_size         。

innodb_additional_mem_pool_size(global)
                     ,          ,                  。innodb_additional_mem_pool_size    InnoDB                               ,       MySQL Instance             ,                                   。
                       ,        ,MySQL     Warning         error log  ,                 。

テキストリンク