my sql 56_roadmap_april2012_zht2

28
<Insert Picture Here> CONFIDENTIAL ORACLE HIGHLY RESTRICTED 1 The MySQL Roadmap: Discover What’s New April, 2012 杜修文 [email protected], Oracle MySQL Sales Consultant

Upload: tu-ivan

Post on 10-May-2015

581 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: My sql 56_roadmap_april2012_zht2

<Insert Picture Here>

CONFIDENTIAL – ORACLE HIGHLY RESTRICTED

1

The MySQL Roadmap: Discover What’s NewApril, 2012杜修文 [email protected], Oracle MySQL Sales Consultant

Page 2: My sql 56_roadmap_april2012_zht2

2

Safe Harbor Statement

以下內容旨在概述產品的整體方向。僅供參考,不

得納入任何合約。這份簡報不是承諾提供任何材

料,代碼或功能,並且不應當作購買決策的依據。

甲骨文公司保有對其產品所描述的任何特性或開發

的功能,和發佈時間的權利。

Page 3: My sql 56_roadmap_april2012_zht2

3

Oracle 對 MySQL 的投資加速創新

使 MySQL 成為更好的 MySQL• #1 Open Source Database for Web Applications• “M” in most complete LAMP stack• Embedded

開發 , 推廣和支持 MySQL• Improved engineering, consulting and support• Leverage 24x7, World-Class Oracle Support

MySQL 社群版 • Source and binary releases• GPL license

Page 4: My sql 56_roadmap_april2012_zht2

4

比以前推出更多的產品

CY2010 CY2011

• 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!

A Better MySQL

Q1 CY2012

• MySQL Enterprise Monitor 2.2

• MySQL Cluster 7.1• MySQL Cluster Manager 1.0

• MySQL Enterprise Backup 3.7• Oracle VM Template for

MySQL Enterprise Edition• MySQL Enterprise Oracle

Certifications• MySQL Windows Installer• New MySQL Enterprise

Commercial Extensions

*Development Milestone Release

• MySQL Database 5.6 DMR*• MySQL Cluster 7.2 DMR

and MySQL Labs!(“early and often”)

帶動 MySQL創新

All GA!

• MySQL Cluster 7.2• MySQL Cluster

Manager 1.4• MySQL Utilities

1.0.6

• MySQL Database 5.6.5 DMR*

and MySQL Labs!(“early and often”)

All GA!

Page 5: My sql 56_roadmap_april2012_zht2

5

InnoDB 是預設的 storage engine• ACID Transactions, FKs, Crash Recovery

效能的改善• Enhancements in MySQL DB• Enhancements in InnoDB• + 360% over 5.1 on Linux• + 1500% over 5.1 on Windows

可用率的改善• Semi-synchronous Replication• Replication Heartbeat

便利性的改善• SIGNAL/RESIGNAL• More Partitioning Options• New PERFORMANCE_SCHEMA

MySQL 5.5 – Best Release Ever

Page 6: My sql 56_roadmap_april2012_zht2

6

MySQL 5.5 Scales On Multi-Core SysBench Read Write

MySQL 5.1

MySQL 5.5.3

MySQL 5.5.4

AMD Opteron 7160 (Magny-Cours) @2100 MHz 64 GB memory 2 x Intel X25E SSD drives OS is Oracle Enterprise Linux with the Enterprise Kernel

4 sockets with a total of 48 cores.

Transactions/S

econd

Page 7: My sql 56_roadmap_april2012_zht2

7

Model: Development Milestone Releases (“DMR”)• 每 3-6 個用一版新的 DMR• 每一版 DMR 累積一些新功能到下一個正式版 (5.6)• 新功能整合到穩定 lunchpad 主版• 所有的功能由 QA 一起測試和簽發• 接近正式版的品質• 再一個 DMR 後收進的功能就是正式版

Model: MySQL Labs 的“早期使用”功能

• 預覽 , 不在 lunchpage 主版 (trunk)• 不保證出現在正式版

MySQL “Early Access” 發佈模式Database and Cluster

Page 8: My sql 56_roadmap_april2012_zht2

8

• MySQL 5.6 在 MySQL 5.5 上再加以改進 :• Performance and Scalability• Optimizer for better query execution times, diagnostics• Performance Schema for better instrumentation• InnoDB for better transactional throughput • Replication for higher availability, data integrity• “NotOnlySQL” options for better flexibility

• 5.6.5 DMR – April, 2012

MySQL Database 5.6: 一個更好的 MySQL.

dev.mysql.com/downloads/mysql/

Page 9: My sql 56_roadmap_april2012_zht2

9

MySQL 5.6.5 – 優化器的改進

• Subquery Optimizations• File sort optimizations with small limit

• 3X better execution time – 40s to 10s• Index Condition Pushdown

• Better execution time – 15s to 90ms• Batched Key Access and Multi Range Read

• Better execution time – 2000s to 10s• Postpone Materialization of views/subqueries in FROM

• 240X better execution time for EXPLAIN - 8m to 2s

Page 10: My sql 56_roadmap_april2012_zht2

10

MySQL 5.6.5 – 優化器的改善

Better Diagnostics and Debugging• EXPLAIN • INSERT, UPDATE, and DELETE• JSON format for better readability

• Persistent Optimizer Statistics - InnoDB• Optimizer Traces

Page 11: My sql 56_roadmap_april2012_zht2

11

testper

CREATE TABLE person ( personid INTEGER PRIMARY KEY, firstname CHAR(20), lastname CHAR(20), postalcode INTEGER, age INTEGER, address CHAR(50), KEY k1 (postalcode,age) ) ENGINE=InnoDB;

SELECT lastname, firstname FROM person WHERE postalcode BETWEEN 5000 AND 5500 AND age BETWEEN 21 AND 22;

• With ICP Disabled• 15 s (buffer pool 128 Mb)• 1.4 s (buffer pool 1.5 Gb)

MySQL 5.6.5 – 優化器的改善Index Condition Pushdown (ICP)

• With ICP Enabled⇒ Execution time drops to 90 ms for both

Page 12: My sql 56_roadmap_april2012_zht2

12

0 8 16 24 32 40 48 56 645

50

500

5000

1225

9.63

2821

No BKABKA

Join Buffer Size (MB)

Que

ry T

ime

(sec

s)

MySQL 5.6.5 – 優化器的改善Batched Key Access (BKA) 和 Multi Range Read

Improves performance of disk-bound join queries

Execution time without BKA + MRR

Execution time with BKA + MRR

DBT3 Q3: “Customer Distribution Query”

Page 13: My sql 56_roadmap_april2012_zht2

13

MySQL 5.6.5 – OptimizerPostpone materialization of views/subqueries in FROM

Late materialization• Allows fast EXPLAINs for views/subqueries• Avoid materialization when possible, faster bail out

A key can be generated for derived tables => 240X better execution time (drops from ~8 min to ~2 sec)

EXPLAIN SELECT * FROM (SELECT * FROM a_big_table);SELECT … FROM derived_table AS dt join table AS t WHERE dt.fld = t.dlf

Page 14: My sql 56_roadmap_april2012_zht2

14

• Long standing feature request from customers and users

mysql> EXPLAIN UPDATE t1 SET c1 = 10 WHERE c2 = 1; +----+-------------+-------+-------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+---------------+------+---------+------+------+-------------+ | 1 | SIMPLE | t1 | range | c2,c2_2 | c2 | 5 | NULL | 1 | Using where | +----+-------------+-------+-------+---------------+------+---------+------+------+-------------+ 1 row in set (0.00 sec)

MySQL 5.6.5 – OptimizerAdd EXPLAIN for INSERT/UPDATE/DELETE

CREATE TABLE t1(c1 INT, c2 INT, KEY(c2), KEY(c2, c1));

EXPLAIN UPDATE t1 SET c1 = 10 WHERE c2 = 1;

Page 15: My sql 56_roadmap_april2012_zht2

15

MySQL 5.6.5 – Optimizer Traces

SET SESSION.OPTIMIZER_TRACE=‘enabled=on’;SELECT (SELECT 1 FROM t6 WHERE d = c) AS RESULT FROM t5; select * from information_schema.OPTIMIZER_TRACE;

"records_estimation": [ { "database": "test", "table": "t6", "range_analysis": { "table_scan": { "records": 2, "cost": 4.5034 }, "potential_range_indices": [ { "index": "d", "usable": true, "key_parts": [ "d" ] } ], "best_covering_index_scan": { "index": "d", "cost": 1.4233, "chosen": true },

• EXPLAIN shows the generated plan • TRACE shows how the plan was generated,

decision points etc.• Developers, support, advanced customers• First step in 5.6.3, more tracing to come

Page 16: My sql 56_roadmap_april2012_zht2

16

• Statements/Stages• 那些查詢最耗資源 ? 它們的時間都花在那裡 ?

• Table/Index I/O, Table Locks• 那些應用系統的表/索引造成最多的負荷或衝突 ?

• Users/Hosts/Accounts• 那些應用系統的使用者,主機,帳戶花最多的資源 ?

• Network I/O• 網路的負荷如何 ? 各連線閑置的時間為何 ?

• Summaries• 依線程,使用者,帳戶或物件總合統計

MySQL 5.6.5 – Performance Schema InstrumentationImproved Database Profiling/Application Tuning

Page 17: My sql 56_roadmap_april2012_zht2

17

MySQL 5.6.5 – InnoDB 的改善• 更好的效能,擴展力

• Improved performance on multi-core/CPU servers• Improved thread scheduling• Reduced contention during file extension• Deadlock detection now non-recursive• Improve LRU flushing• Increase max redo log size• Separate tablespaces for undo log• Fast checksum

• 更好的叵復能力• Dump and restore buffer pool

• 更好的工具• Full-text Search• Variable page sizes – 4k, 8k• Larger limit of index key prefixes (3072 bytes)

Page 18: My sql 56_roadmap_april2012_zht2

18

MySQL 5.6.5 – 複製的改善

• 高可用及固障移轉• Global Transaction Ids• Replication Administration and Fail-over Utilities

• 更好的 Data Integrity • Crash-Safe Slaves, Replication Checksums, Crash-Safe Binlog

• 更好的效能,擴展力• Multi-threaded slaves• Reduced Binlog size for RBR

• 更多的彈性• Time-delayed replication

• 更容易做 troubleshooting• Row-based repl. logging of original query

• 強化監看/管理

Page 19: My sql 56_roadmap_april2012_zht2

19

MySQL 5.6.5 複製

=

Page 20: My sql 56_roadmap_april2012_zht2

20

• 是可靠的,自動固障移轉和回復的基礎• Unique identifier for each replication event written to the Binlog

• 簡易的追踪和比對跨叢集間的複製• 自動辨識最新的 slave 作固障移轉• 佈署複雜的複製架構• 移除開發/操作的負荷

Master

GTID=123456

GTID=123456

GTID=123456 GTID=123456

MySQL 5.6.5 - Global Transaction Ids

Page 21: My sql 56_roadmap_april2012_zht2

21

MySQL Utilities

• 將開發 / 操作常見的工作自動化• 複製 : 開通 , 測試 , 監控和固障移轉• 資料庫比對 : 一致性檢查• 資料庫管理 : 使用者 , 連線 , 表 , 等• 用於開發的新工具 , 例如 log 分析

• 以 Python scripts 開發 , 在 MySQL Workbench 下執行• Extensible to include custom scripting

• 資源 : Documentation & Community Forum• http://dev.mysql.com/doc/workbench/en/mysql-utils-man.html• http://forums.mysql.com/list.php?155

Page 22: My sql 56_roadmap_april2012_zht2

22

Utility Workflow for Replication

• Check: 確認複製的先決條件• Repl: 開始複製到新的 Slave server• Show: 顯示複製的架構• Fail-Over & Admin: 偵測及 Master server 固障移轉 ( 或切換 ) 到 Slave server. 狀況監看

Check Repl ShowFail-Over & Admin

Page 23: My sql 56_roadmap_april2012_zht2

23

• 自動固障移轉和 Slave server升級• 持續監看和回報健康狀況

• 預設是將 GTID狀況更新到最新的Slave server升級• Slave server升級的政策是完全可以設定的

• 決不會錯失複製事件• 被挑出的 Slave server 自動從後一個 Slave

server取得更新

複製固障移轉工具

Failover Utility

Monitoring

Fail-Over

Master

Slaves

Auto-Failover & Slave Promotion

Page 24: My sql 56_roadmap_april2012_zht2

24

複製管理工具• 進行切換以消除計劃中的維護之停機

時間• 開啟和停止從 Slave Server

• Slave server 的回復和監看• 從服務器的狀況,線程的狀況• 複製處理,包括是否有任何時間差• 設定從服務器升級政策

Master

Slaves

Administration Utility

Status & Switchover

Admin

Page 25: My sql 56_roadmap_april2012_zht2

25

MySQL 5.6.5 – 其他方面的改善

• TIME/TIMESTAMP/DATETIME –小於一秒的精準度• Ipv6 improvements• Support Unicode for Windows command client• Import/export tables to/from partitioned tables• Explicit partition selection • GIS/MyISAM: Precise spatial operations

Get it now!dev.mysql.com/downloads/mysql/

Page 26: My sql 56_roadmap_april2012_zht2

26

• 複製• Binlog Group Commit• Binlog API

• InnoDB• Memcached API取用 InnoDB 的資料• 線上作業 (INDEX add, FK drop, Column rename) • SSD/Flash 最佳化

• 還有更多 ...

MySQL Database - Under DevelopmentEarly Access Features

labs.mysql.com/

Try it now!labs.mysql.com

Page 27: My sql 56_roadmap_april2012_zht2

27

• 快速,簡單取用 InnoDB• 透過Memcached API取用• 使用現有 Memcached clients• 繞過 SQL 的轉換

• NotOnlySQL 取用• 對 key-value 的操作• SQL 用於複雜的查詢 , JOINs, FKs,

etc.• 實施

• Memcached daemon plug-in 到 mysqld

• Memcached協定對映到自生的 InnoDB API

• 共用處理空間使延遲非常低

InnoDB Storage Engine

MySQL Server Memcached plugin

Application

SQL (MySQL Client)

NoSQL (Memcached Protocol)

mysqld

MySQL Database – Key-value access for InnoDB NotOnlySQL: Memcached API

Try it now!labs.mysql.com

Page 28: My sql 56_roadmap_april2012_zht2

<Insert Picture Here>

CONFIDENTIAL – ORACLE HIGHLY RESTRICTED

28

Discussion.