Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MySQL Presentation at NSEG, 2014 March

MySQL Presentation at NSEG, 2014 March

Ryusuke Kajiyama

March 15, 2014
Tweet

Other Decks in Technology

Transcript

  1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    2
    State of the Dolphin
    MySQL 最新動向
    Sales Consulting Manager, JAPAC
    梶山 隆輔 / Ryusuke Kajiyama

    View Slide

  2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    3
    以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するもの
    です。また、情報提供を唯一の目的とするものであり、いかなる契約にも組
    み込むことはできません。以下の事項は、マテリアルやコード、機能を提供す
    ることをコミットメント(確約)するものではないため、購買決定を行う際の判断
    材料になさらないで下さい。オラクル製品に関して記載されている機能の開
    発、リリースおよび時期については、弊社の裁量により決定されます。
    Oracleは、米国オラクル・コーポレーション及びその子会社、関連会社の米国及びその他の国における登録商
    標または商標です。他社名又は製品名は、それぞれ各社の商標である場合があります。

    View Slide

  3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    4
    2003: MySQL v4.0; NDB Cluster をエリクソンから購入
    2004: MySQL v4.1; MySQL Clusterが初の商用利用
    1995: MySQL AB設立 翌年最初の公開バージョン3.11リリース
    世界でもっとも普及している、
    オープンソース データベース
    2008: MySQL v5.1; SunがMySQL AB買収
    2005: MySQL v5.0; OracleがInnobase Oy買収

    “MySQL Enterprise”販売開始(当時は“MySQL Network”)
    2000: MySQL v3.23; デュアルライセンス開始 (GPL & 商用ライセンス)
    日本MySQLユーザ会 (略称: MyNA)発足
    1997: 日本語マニュアル公開 & 日本語化パッチ by コミュニティメンバー
    2010: MySQL v5.5; OracleがSun買収
    2013: MySQL v5.6

    View Slide

  4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    5
    進化を続けるMySQL
    MySQL Enterprise Monitor 2.2
    MySQL Cluster 7.1
    MySQL Cluster Manager 1.0
    MySQL Workbench 5.2
    MySQL Database 5.5
    MySQL Enterprise Backup 3.5
    MySQL Enterprise Monitor 2.3
    MySQL Cluster Manager 1.1
    All GA!
    MySQL Enterprise Backup 3.7
    Oracle VM Template for MySQL
    Enterprise Edition
    MySQL Enterprise Oracle
    Certifications
    MySQL Windows Installer
    New MySQL Enterprise
    Commercial Extensions
    MySQL Database 5.6 DMR*
    MySQL Cluster 7.2 DMR
    MySQL Labs!
    (“early and often”)
    All GA!
    MySQL Cluster 7.2
    MySQL Utilities 1.0.6
    Database Migration Wizard
    New Windows Tools/Features
    New MySQL Enterprise
    Commercial Extensions
    MySQL Database 5.6
    MySQL Cluster 7.3
    MySQL Database 5.7 DMR
    MySQL Workbench 6.0
    *Development Milestone Release
    2010 2011 2012-2013
    All GA!
    New!

    View Slide

  5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    6
    MySQL 5.5
    MySQL Cluster 7.3
    MySQL Enterprise Monitor 2.3
    MySQL Enterprise Backup
    Security
    Scalability
    HA
    Audit
    MySQL 5.6
    MySQL Workbench 6.0
    M y S Q L U t i l i t i e s
    M y S Q L
    A p p l i e r f o r
    H a d o o p
    MySQL Workbench 5.2
    M y S Q L E n t e r p r i s e
    O r a c l e C e r t i f i c a t i o n s
    MySQLのイノベーション
    M y S Q L C l u s t e r
    M a n a g e r
    Windows installer & Tools
    MySQL Cluster 7.2
    MySQL Cluster 7.1
    MySQL Migration
    Wizard

    View Slide

  6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    7
    Oracle Database & MySQL
    §  より多くのお客様の要件にお応えするために
    §  MySQLはWebにおけるデファクトスタンダード
    §  MySQLとOracleの両方を運用されるお客様にもより多くのメリット
    Complementary 「補完関係」
    Web and Cloud computing is not a ‘one size fits all’ model

    View Slide

  7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    8
    MySQL: Everywhere and Growing
    Platform of Choice for Next Generation Web, Cloud & Embedded Applications
    World’s Most
    Popular
    Open Source
    Database
    Database
    Platform for
    Next Gen
    Web Apps
    Leading
    Database for
    Web
    Applications
    Leading
    Database in
    the Cloud
    Integrated
    with Hadoop
    in majority of
    Big Data
    platforms
    #1 Linux Career IT
    skill: MySQL *
    * Source: Linux Career IT Skills Watch update July 2013
    Downloads & Sales
    Growth
    Best of both Worlds
    SQL+NoSQL
    LAMP + Python
    +Node.js + Go +...
    Awards & Social
    Media Momentum

    View Slide

  8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    9
    Controversial Releases
    §  ”MySQL 5.0: Remarkably painful”
    Jeremy Cole
    §  “MySQL 5.1 release as “GA” seems to be the most controversial to
    date... As a Summary I think this was inevitable MySQL 5.1 will be
    released for commercial/marketing reasons, not because it really
    meets quality guidelines…On the bright side MySQL 5.1 “GA” quality
    was much better than MySQL 5.0 quality when it was released.”
    Peter Zaitsev
    MySQL 5.0 & MySQL 5.1

    View Slide

  9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    10
    MySQL 5.5
    §  “Version 5.5 of the MySQL database is probably is the best MySQL version
    ever produced, and the upcoming version 5.6 is looking strong as well.”
    Mårten Mickos
    §  “If you are using MySQL today, and you need a solid path forward on it as a
    platform? I’d stick with what Oracle is creating.”
    Brian Aker
    §  "From an engineering standpoint, Oracle is doing the best work on MySQL
    that's ever been done. Oracle is doing good, formal software engineering.”
    Baron Schwartz
    First GA Release Under Oracle Stewardship

    View Slide

  10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    11
    MySQL 5.6: The Best Release Ever
    “MySQL 5.6 is probably the version of MySQL with the biggest bundle of new
    features.”
    Giuseppe Maxia
    “I am very excited and thrilled to use the latest release of MySQL 5.6 in production. This is
    probably the most notable and innovative release from many years, if not ever. Oracle
    developer teams did great work for MySQL 5.6, so we have to give Oracle credit for that.“
    Marco Tusa
    “MySQL 5.6 is much faster on IO-bound, read-only workloads.”
    Mark Callaghan
    “If GTIDs and MySQL failover work as advertised, it's living the dream of no-fuss failover.”
    Sheeri Cabral
    “MySQL vs MariaDB performance. The obvious take away is as expected, upgrade any 5.5
    installations to 5.6.”
    Brian Aker

    View Slide

  11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    12
    DMRs – Development Milestone Releases
    §  リリース候補版の品質になった機能のみを含む
    §  年に2-4回リリース
    §  コミュニティでのテストや使用、フィードバックのため
    §  機能拡張の加速
    §  品質の改善

    View Slide

  12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    13
    The Open Road to MySQL 5.6
    Optimizer:
    MRR, ICP, File Sort
    InnoDB:
    Split Kernel Mutex, MT
    Purge
    Replication:
    Crash-Safe, Multi-Thread
    Slave, Checksums
    Memcached API
    New P_S
    Partitioning
    Improvements
    *Development Milestone Release
    RC
    Nov 2012
    DMR1*
    April 2011
    DMR2
    Oct 2011
    Optimizer:
    BKA, New
    EXPLAIN, Traces
    InnoDB:
    Dump/Restore
    Buffer Pool
    More P_S
    DMR3
    Dec 2011
    Optimizer:
    Sub-Queries
    InnoDB:
    Full Text Index,
    Read-Only
    Optimizations
    Condition
    Handling
    Fractional
    Seconds
    DMR4
    April 2012
    Optimizer:
    JSON EXPLAIN,
    Sub-Queries
    Replication:
    GTIDs
    TIMESTAMP &
    DATESTAMP
    More P_S
    DMR5
    Aug 2012
    InnoDB:
    TT, Online DDL,
    Memcached API
    Replication:
    Binary Log Group
    Commit
    Password
    Mgmt
    More
    Partitioning
    New Server
    Defaults
    More
    Partitioning
    More GTID,
    TT
    Predictable Releases for the MySQL Community, Allowing Feedback

    View Slide

  13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    14
    主要な各種の開発言語
    およびプラットフォームを
    サポート
    処理効率の高い
    マルチスレッドモデル
    DMLやDDLの解析、コ
    ストベースのオプティマ
    イザ、クエリや結果セッ
    トなどのキャッシュ
    アプリケーションに最適
    な機能や性能を提供す
    る柔軟性の高い「スト
    レージエンジン」
    各種の物理ストレージを利用可能
    MySQLデータベースのアーキテクチャ

    View Slide

  14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    15

    MySQLの代表的なストレージエンジン
    §  InnoDB: トランザクション対応のエンジン
    –  MySQL 5.5からデフォルトのエンジンに
    –  行ロック、読み取り一貫性、外部キー、XA、ホットバックアップ
    §  MEMORY: 特定のテーブルをインメモリデータベース化
    –  トランザクション非対応、データ永続化無し
    §  Archive: 参照&挿入のみを許可するエンジン
    –  データ変更不可、自動的に圧縮
    §  MyISAM: 5.1までのデフォルト
    –  トランザクション非対応、全文検索
    –  フラットファイルの代替
    –  最近は利用が減少傾向

    View Slide

  15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    16
    MySQL 5.6 新機能

    View Slide

  16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    17
    MySQL 5.6
    §  InnoDB: トランザクション・スループットの向上
    §  オプティマイザ: パフォーマンス&スケーラビリティ
    §  パフォーマンス・スキーマ: より詳細な統計情報
    §  レプリケーション: さらなる可用性とデータの整合性
    §  「NotOnlySQL」オプション: さらなる柔軟性
    §  ダウンロードはこちらから!
    dev.mysql.com/downloads/mysql/
    GA

    View Slide

  17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    18
    MySQL 5.6: InnoDB - 改良点
    §  パフォーマンスとスケーラビリティを向上
    -  古いmutexを排除、CPUキャッシュの共有
    -  スレッドの改良と同時実効性の向上
    -  参照専用トランザクションによる参照性能の向上
    -  SSDへの最適化
    §  運用や開発の柔軟性を向上
    -  表領域(データファイル)をOSコマンドでコピー
    -  NoSQL, InnoDBへのキー・バリュー型でのアクセス

    View Slide

  18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    19
    MySQL 5.6: InnoDB – 可用性の向上
    §  オンラインDDL
    -  ADD/DROP INDEX
    -  ADD/DROP COLUMN
    -  ADD/DROP FOREIGN KEY
    -  RENAME COLUMN, TABLE
    -  CREATE PRIMARY KEY
    -  ALTER ROW_FORMAT, KEY_BLOCK_SIZE
    -  ALTER COLUMN NULLABLE, NOT_NULLABLE
    -  クラスタインデックスの再構築

    View Slide

  19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    20
    MySQL 5.5.29
    MySQL 5.6.10
    MySQL 5.6 SysBench Benchmarks
    Up to 234% Performance Gain
    0
    2,000
    4,000
    6,000
    8,000
    10,000
    12,000
    14,000
    16,000
    18,000
    32 64 128 256 512
    Transactions per Second
    Connections
    MySQL 5.6 vs. 5.5 - Read Only (Linux)
    Oracle Linux 6
    Intel(R) Xeon(R) E7540 x86_64
    MySQL leveraging:
    -  48 of 96 available CPU threads
    -  2 GHz, 512GB RAM

    View Slide

  20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    21
    MySQLの高可用性構成
    MySQL
    Cluster
    MySQL
    Cluster
    アプリケーション/
    APサーバ
    負荷分散
    双方向

    同期複製
    •  MySQL Cluster

    シェアードナッシング型高性能クラスタ
    MySQL
    Server
    •  MySQL+DRBD

    Linux用のノード間データコピー
    アプリケーション/
    APサーバ
    フェールオーバー
    同期複製
    MySQL
    Server
    アプリケーション/
    APサーバ
    共有ディスク
    •  3rdベンダ製HAソフト利用

    共有ディスクにデータを格納
    フェールオーバー
    MySQL
    Server
    MySQL
    Server
    アプリケーション/
    APサーバ
    負荷分散
    非同期複製
    •  レプリケーション(標準機能)

    非同期&準同期データレプリケーション
    MySQL
    Server
    MySQL
    Server

    View Slide

  21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    22
    MySQL 5.6: Replication改善点
    •  マルチスレッド スレーブ
    •  バイナリログのグループコミット
    •  行ベース レプリケーションの転送データ量の削減
    パフォーマンス
    •  Global Transaction Identifiers
    •  レプリケーション フェールオーバー & 管理ユーティリティ
    •  スレーブ&バイナリログの耐障害性向上
    フェールオーバー & リカバリ
    •  レプリケーション チェックサム
    データの正確性
    •  遅延レプリケーション
    •  リモートからのバイナリログのバックアップ
    •  ログへのメタデータの追加
    開発&管理の簡素化

    View Slide

  22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    23
    MySQL 5.6: InnoDB

    RDBMSとNoSQLの両立
    InnoDB Storage Engine
    MySQL Server Memcached plugin
    Application
    SQL
    (MySQL Client)
    NoSQL
    (Memcached
    Protocol)
    mysqld
    §  InnoDBに素早く、簡単にアクセス
    -  Memcached API経由のアクセス
    -  既存のMemcachedクライアントを使用
    -  SQL変換をバイパス
    §  NotOnlySQLアクセス
    –  キー・バリュー操作用
    –  複雑なクエリやJOIN、FKには

    SQLを使用
    §  実装
    –  mysqldにMemcachedを

    デーモン・プラグインとして統合
    –  ネイティブInnoDB APIをmemcached
    プロトコルにマッピング
    –  超低レイテンシ用の

    共有プロセス・スペース

    View Slide

  23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    24
    Performance
    Up to 9x Higher “SET / INSERT” Throughput
    0
    10000
    20000
    30000
    40000
    50000
    60000
    70000
    80000
    8 32 128 512
    TPS
    Client Connections
    MySQL 5.6: NoSQL Benchmarking
    Memcached API
    SQL
    Customized Java-based App Test Harness
    Oracle Linux 6
    Intel(R) Xeon(R) 2.0 x86_64
    MySQL leveraging:
    -  8 available CPU threads
    -  2 GHz, 16GB RAM
    blogs.oracle.com/mysqlinnodb/entry/new_enhancements_for_innodb_memcached

    View Slide

  24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    25
    MySQL 5.7 DMR 新機能

    View Slide

  25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    26
    MySQL 5.7.2 DMR
    §  InnoDB より高いトランザクション処理性能と可用性
    §  レプリケーション より高い拡張性と可用性
    §  Performance Schema より詳細な性能統計情報
    §  オプティマイザ クエリパフォーマンスのEXPLAIN可視化の改良
    Available Now! Get it here:
    MySQL 5.6をベースに各種機能を改良
    dev.mysql.com/downloads/mysql/
    New!

    View Slide

  26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    27
    MySQL 5.7.2 Sysbench Benchmarks
    Sysbench Point Select
    Intel(R) Xeon(R) CPU X7560 x86_64
    4 sockets x 8 cores-HT (64 CPU threads)
    2.27GHz, 256G RAM
    Oracle Linux 6.2
    95% Faster than MySQL 5.6
    172% Faster than MySQL 5.5
    0
    100000
    200000
    300000
    400000
    500000
    600000
    8 16 32 64 128 256 512 1024
    Queries per Second
    Concurrent User Sessions
    MySQL-5.7
    MySQL-5.6
    MySQL-5.5
    500,000 QPS

    View Slide

  27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    28
    MySQL 5.7.2: オプティマイザ
    Total query cost and Per table
    Volume (in gb/mb/kb) = (# of rows) * (record width)
    JSON EXPLAINの拡張

    View Slide

  28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    29
    0
    500
    1000
    1500
    2000
    2500
    Total Time in Seconds
    MySQL 5.7 versus 5.6
    2 - 11 X Improvement
    5.6.13
    5.7.2
    MySQL 5.7.2: InnoDB Temporary Tables
    性能の向上
    11倍 高速化
    CREATE/DROP
    §  テーブルの作成や削除処理中のIOを
    削減
    2-4倍 高速化
    INSERT/DELETE/ UPDATE
    §  REDOログの書き込み、ロックおよび
    チェンジバッファの利用を削減
    * sql-bench, modified to use temp-tables
    * Seed size of 10K for Create/Drop
    * Seed size of 5M for Insert/Delete/Update
    Total time to complete in seconds
    11X 2X
    4X 2X

    View Slide

  29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    30
    MySQL 5.7.2: InnoDB
    §  オンラインでのインデックス名の変更
    –  ALTER TABLE t RENAME INDEX i1 TO i2
    §  オンラインでのVARCHAR列の変更
    オンラインALTER TABLE の拡張
    ALTER TABLE t RENAME INDEX i1 to i2;
    ALTER TABLE t1 ALGORITHM=INPLACE,
    CHANGE COLUMN c1 c1 VARCHAR(255);

    View Slide

  30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    31
    同一スキーマ内でのマルチスレッド スレーブ
    §  スレーブ内の複数のワーカースレッドがトランザクションを並列で処理
    –  並列処理されるトランザクションの対象データが同一で無い場合に限る
    –  同一スキーマ内でもマルチスレッドで処理可能
    §  トランザクションの一貫性を保って処理
    §  スレーブのスループットを向上
    §  現在開発中
    –  リファクタリング完了
    –  チューニングや最適化は現在作業中
    スレーブのスループットを向上

    View Slide

  31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    32
    Slave
    Master
    “Lossless”準同期レプリケーション
    §  マスターは指定のスレーブがトランザク
    ションを受信するまで以下の処理を待つ
    –  ストレージエンジンへのコミット
    –  他のクライアントから変更へのアクセス
    –  アプリケーションへのコミットの応答
    §  スレーブが変更点を反映させるまでは待
    たない
    –  遅延を最小化
    §  スレーブに安全にコピーされるまで他の
    トランザクションが新しいデータを変更で
    きないように
    App
    commits
    Written to
    Binary log
    Send to
    slave(s)
    Commit to SE
    & externalized
    Ack Commit
    Write to
    relay log
    Apply txn

    View Slide

  32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    33
    Slave
    Master
    準同期レプリケーション
        MySQL 5.6 MySQL 5.7 “Lossless”
    App
    commits
    Written to
    Binary log
    Send to
    slave(s)
    Commit to SE
    & externalized
    Ack Commit
    Write to
    relay log
    Apply txn
    Slave
    Master
    App
    commits
    Written to
    Binary log
    Send to
    slave(s)
    Commit to SE
    & externalized
    Ack Commit
    Write to
    relay log
    Apply txn

    View Slide

  33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    34
    マルチソース レプリケーション
    §  複数のマスターでの変更点を1台
    のスレーブに集約
    –  全ての「シャード」のデータを単一
    のビューで分析
    –  バックアップ用にデータを集約
    §  準同期レプリケーションおよびマ
    ルチスレッド スレーブに対応
    §  マスターごとにフィルタと制御可能
    となる予定
    §  アプリケーションはマスタごとに個
    別にアクセス
    Binlog
    Master 1
    Binlog
    Master 2


    Binlog
    Master N
    IO 1
    Relay 1
    Coordinator
    W1 W2 … WX
    IO 2
    Relay 2
    Coordinator
    W1 W2 … WX


    Coordinator
    W1 W2 … WX
    IO N
    Relay N
    Coordinator
    W1 W2 … WX
    Slave
    labs.mysql.com

    View Slide

  34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    35
    MySQL Labs Releases

    View Slide

  35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    36
    MySQL Labs Releases
    §  最新機能をいち早くお試しいただき、フィードバックをいただくため
    §  DMRに含めることができる品質にはなっていない
    §  本番環境での利用はお勧めしない
    §  実験的とはいえ、将来的にはメインの開発ツリーに含めることを視野に
    –  例) MySQL 5.6のInnoDB memcached API
    http://labs.mysql.com
    1MFBTF %0/0564&5)&4&#*/"3*&4*/130%6$5*0/
    新しい機能をいち早く公開する「実験室」

    View Slide

  36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    37
    labs.mysql.com

    View Slide

  37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    38
    MySQL Labs Releases
    § Hadoop Applier for MySQL
    § MySQL JSON UDFs
    § MySQL Multi-source Replication
    § MySQL Utilities - Fabric
    2014年2月現在のLabs版

    View Slide

  38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    39
    Hadoop Applier for MySQL

    View Slide

  39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    40
    BI Solutions
    ACQUIRE
    ORGANIZE
    ANALYZE
    DECIDE
    Applier
    MySQL in the Big Data Lifecycle

    View Slide

  40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    41
    MySQL Applier for Hadoop
    MySQLからHadoopへのリアルタイムストリーミング
    §  バイナリログの内容をlibhdfs
    ライブラリ経由でHDFSに書
    き込み
    §  リアルタイムでのデータ分析
    を実現
    §  Hadoop用各種ツールと
    MySQLデータの統合
    http://labs.mysql.com/

    View Slide

  41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    42
    MySQL JSON UDFs

    View Slide

  42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    43
    MySQL JSON UDFs
    §  CのプログラムをMySQLの関数として利用するUDFを活用
    http://dev.mysql.com/doc/refman/5.6/en/adding-functions.html
    §  JSONデータの検証、検索、更新など行う関数群
    §  CREAET FUNCTION コマンドで追加
    http://www.slideshare.net/yoyamasaki/my-sql-jsonudf
    JSONデータを扱うユーザ定義関数

    View Slide

  43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    44
    サンプルテーブル
    mysql> select * from json;
    +----+--------------------------------------------------------------------------------+
    | id | col1 |
    +----+--------------------------------------------------------------------------------+
    | 1 | {"id":1,"Name":"Farmer grandmas","price":50000,"Conditions":["farms",15]} |
    | 2 | {"id":2,"Name":"Worker grandmas","price":300000,"Conditions":["factories",15]} |
    | 3 | {"id":3,"Name":"Miner grandmas","price":1000000,Conditions:["mines",15]} |
    | 4 | {"id":4,"Name":"Yoshiaki Yamasaki"} |
    +----+--------------------------------------------------------------------------------+
    4 rows in set (0.00 sec)
    ※id=3の列には、フォーマット間違い有り
    (””が抜けている)

    ※id=4の列はNameだけ

    View Slide

  44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    45
    json_search:値が含まれるキーを検索
    mysql> select id,json_search(col1,'"Farmer grandmas"') from json where id=1;
    +----+---------------------------------------+
    | id | json_search(col1,'"Farmer grandmas"') |
    +----+---------------------------------------+
    | 1 | Name:: |
    +----+---------------------------------------+
    1 row in set (0.00 sec)

    mysql> select json_search(col1,'"farms"') from json;
    +-----------------------------+
    | json_search(col1,'"farms"') |
    +-----------------------------+
    | 0:Conditions:: |
    | NULL |
    | NULL |
    | NULL |
    +-----------------------------+
    4 rows in set (0.00 sec)

    View Slide

  45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    46
    Multi-source Replication

    View Slide

  46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    47
    マルチソース レプリケーション
    §  複数のマスターでの変更点を1台
    のスレーブに集約
    –  全ての「シャード」のデータを単一
    のビューで分析
    –  バックアップ用にデータを集約
    §  準同期レプリケーションおよびマ
    ルチスレッド スレーブに対応
    §  マスターごとにフィルタと制御可能
    となる予定
    §  アプリケーションはマスタごとに個
    別にアクセス
    Binlog
    Master 1
    Binlog
    Master 2


    Binlog
    Master N
    IO 1
    Relay 1
    Coordinator
    W1 W2 … WX
    IO 2
    Relay 2
    Coordinator
    W1 W2 … WX


    Coordinator
    W1 W2 … WX
    IO N
    Relay N
    Coordinator
    W1 W2 … WX
    Slave
    labs.mysql.com

    View Slide

  47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    48
    MySQL Utilities - Fabric

    View Slide

  48. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    49
    MySQL Utilities
    運用管理に関するPythonスクリプト
    データベース管理
    データベース運用
    レプリケーション管理
    設定管理
    MySQL Utilities

    View Slide

  49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    50
    MySQL Utilities
    mysqldbcompare 同一サーバ内または2つのサーバ間のデータや定義の比較
    mysqldbcopy 別のサーバにデータベースをコピー
    mysqldbexport データとメタデータをエクスポート
    mysqldbimport データとメタデータをインスポート
    mysqldiff 2つのサーバ間のテーブルなどオブジェクトの定義を比較

    データおよびデータベース管理

    View Slide

  50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    51
    MySQL Utilities
    mysqldiskusage デーブルおよびデータファイルのサイズを表示
    mysqlindexcheck インデックスの重複をチェック
    mysqlmetagrep テーブル定義などのメタデータをgrep
    mysqlprocgrep INFORMATION_SCHEMA.PROCESSLISTをgrep
    mysqluserclone 別のサーバにユーザアカウントををコピー
    サーバ運用各種

    View Slide

  51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    52
    MySQL Utilities
    mysqlreplicate レプリケーションを設定
    mysqlrplcheck レプリケーションが正しく設定されているかの確認
    mysqlrplshow レプリケーショントポロジ(親子関係)を図示
    mysqlfailover レプリケーションの自動フェールオーバー
    switchover 手動でのレプリケーションの切り替え
    mysqlrpladmin レプリケーションの各種管理
    レプリケーション関連

    View Slide

  52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    53
    MySQL Utilities
    mysqlserverclone 既存のMySQLサーバのコピーを作成
    mysqlserverinfo サーバの稼働状況を表示
    設定関連&その他
    mysqluc MySQL Utilitiesコマンド用ユーザコンソール

    View Slide

  53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    54
    MySQL Utilities - Fabric
    §  「シャーディング」による拡張性
    §  コネクタ
    –  Python
    –  Java
    –  PHP
    §  アプリケーションでの分割キー
    –  Range または Hash
    –  シャード再構成も可能
    –  シャード全体の更新も可能
    §  MySQL Utilities 1.4.0として提供
    MySQL Fabric
    Connector
    Application
    Read-slaves
    mappings
    SQL
    Master group
    Read-slaves
    Master group
    labs.mysql.com

    View Slide

  54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    55
    MySQL開発の優先課題

    View Slide

  55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    56
    §  Web、クラウドインフラ、組み込みへの最適化
    §  よりシンプルに、プラガブル アーキテクチャ
    -  メンテナンス性向上、さらなる拡張性
    -  さらなるNoSQLオプション(HTTP, JSON, JavaScript, etc.)
    §  リファクタリング
    -  InnoDBのデータディクショナリ
    -  オプティマイザ/パーサ/プロトコル
    §  InnoDB
    §  性能、オンラインDDL、バッファプール
    §  高可用性構成、レプリケーション、シャーディング
    MySQL開発の優先課題

    View Slide

  56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    57
    The world's most popular open source database
    世界で最も普及しているオープンソース データベース

    View Slide

  57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
    58

    View Slide