SlideShare ist ein Scribd-Unternehmen logo
1 von 68
Downloaden Sie, um offline zu lesen
<Insert Picture Here>
CONFIDENTIAL – ORACLE HIGHLY RESTRICTED
<Insert Picture Here>
CONFIDENTIAL – ORACLE HIGHLY RESTRICTED
2
The MySQL Roadmap: Discover What’s New
June, 2012
Keith Larson, MySQL Community Manager
3Copyright Oracle Corporation 2012
Safe Harbor Statement
The following is intended to outline our general
product direction. It is intended for information
purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decision. The
development, release, and timing of any features
or functionality described for Oracle’s products
remains at the sole discretion of Oracle.
4Copyright Oracle Corporation 2012
localhost ~]$ whoami
Keith Larson
keith.larson@oracle.com
MySQL Community Manager
sqlhjalp.blogspot.com
Started with MySQL 3.23 during the dot.com days.
Primary real world work was with a MySQL InnoDB delayed replicated environment
that easily held over 4 billion rows of user data. Did a lot of data mining of that data
over the years.
Numerous other sites developed on LAMP stack over the last 13 years.
Who are you?
DBAs?
Developers?
5Copyright Oracle Corporation 2012
Oracle’s Investment in MySQL
Rapid Innovation
Make MySQL a Better MySQL
• #1 Open Source Database for Web Applications
• “M” in most complete LAMP stack
• Embedded
Develop, Promote and Support MySQL
• Improved engineering, consulting and support
• Leverage 24x7, World-Class Oracle Support
MySQL Community Edition
• Source and binary releases
• GPL license
6Copyright Oracle Corporation 2012
More Product Releases Than Ever Before
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”)
Driving MySQL
Innovation
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!
7Copyright Oracle Corporation 2012
InnoDB is the default storage engine
• ACID Transactions, FKs, Crash Recovery
Improved Performance
• Enhancements in MySQL DB
• Enhancements in InnoDB
• + 360% over 5.1 on Linux
• + 1500% over 5.1 on Windows
Improved Availability
• Semi-synchronous Replication
• Replication Heartbeat
Improved Usability
• SIGNAL/RESIGNAL
• More Partitioning Options
• New PERFORMANCE_SCHEMA
MySQL 5.5 – Best Release Ever
8Copyright Oracle Corporation 2012
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/Second
9Copyright Oracle Corporation 2012
• MySQL 5.6 builds on MySQL 5.5 by improving:
• 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 m8 latest DMR -- 2012
MySQL Database 5.6: A Better MySQL.
10Copyright Oracle Corporation 2012
Model: Development Milestone Releases (“DMR”)
• New DMR every 3-6 months
• Accumulating features for Next GA (5.6)
• New features integrated on stable trunk
• Features signed off by QA and tested together
• Close to Release Quality
• Next GA cut from one upcoming DMR
Model: MySQL Labs “Early Access” features
• Previews, not on trunk
• No promise of making GA release
MySQL “Early Access” Release Models
Database and Cluster
11Copyright Oracle Corporation 2012
MySQL 5.6.5 – Optimizer Enhancements
• 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
12Copyright Oracle Corporation 2012
MySQL 5.6.5 – Optimizer
Postpone materialization of views/subqueries
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
EXPLAIN in MySQL 5.5: Room for Improvement
●
SELECT statements only
●
What about INSERT, UPDATE, DELETE ?
●
Tabular output
●
Difficult to see the structure of the query plan
●
More information would be useful
●
E.g., When are the WHERE conditions evaluated?
●
Shows the chosen plan, but does not tell you why this plan
was chosen.
14Copyright Oracle Corporation 2012
• 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 – Optimizer
Add 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;
MySQL 5.6: EXPLAIN for Data-Modifying
Statements
EXPLAIN UPDATE t1 SET b = 'b' WHERE a > 2 G
id: 1
select_type: SIMPLE
table: t1
type: range
possible_keys: a,a_2
key: a
key_len: 16
ref: null
rows: 2
Extra: Using where; Using temporary
MySQL 5.6: EXPLAIN for Data-Modifying
Statements, cont.
EXPLAIN INSERT INTO t1
SELECT * FROM t2 WHERE a IN (1, 3, 5) G
id: 1
select_type: SIMPLE
table: t2
type: range
possible_keys: t2i1
key: t2i1
key_len: 4
ref: null
rows: 3
Extra: Using index condition
MySQL 5.6: Structured EXPLAIN
EXPLAIN FORMAT=JSON
SELECT * FROM t2 WHERE i > 1 AND j < 3;
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "t2",
"access_type": "range",
"possible_keys": [
"PRIMARY"
] /* possible_keys */,
...
MySQL 5.6: Structured EXPLAIN, cont.
...
"key": "PRIMARY",
"key_length": "4",
"rows": 2,
"filtered": 100,
"index_condition": "(`test`.`t2`.`i` > 1)",
"attached_condition": "(`test`.`t2`.`j` < 3)"
} /* table */
} /* query_block */
}
SET SESSION.OPTIMIZER_TRACE=‘enabled=on’;
SELECT v FROM t1 WHERE i1 = 1 AND v = 'a';
SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE; "rows_estimation": [
{
"table": "`t1`",
"range_analysis": {
"table_scan": {
"rows": 5,
"cost": 4.1
},
"potential_range_indices": [
{
"index": "v_idx",
"usable": true,
"key_parts": [
"v",
"i1"
]
}
],
"best_covering_index_scan": {
"index": "v_idx",
"cost": 2.0063,
"chosen": true
},
• EXPLAIN shows the generated plan
• TRACE shows how the plan was generated,
decision points etc.
• JSON format
• Developers, support, advanced customers
Query Plan Debugging
MySQL 5.6.5 – Optimizer Traces
20Copyright Oracle Corporation 2012
testpe
r
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 – Optimizer Enhancements
Index Condition Pushdown (ICP)
• With ICP Enabled
⇒ Execution time drops to 90 ms for both
21Copyright Oracle Corporation 2012
0 8 16 24 32 40 48 56 64
5
50
500
5000
1225
9.63
2821
No BKA
BKA
Join Buffer Size (MB)
QueryTime(secs)
MySQL 5.6.5 – Optimizer Enhancements
Batched Key Access (BKA) and 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”
22Copyright Oracle Corporation 2012
• Statements/Stages
• What are my most resource intensive queries? Where do they spend
time?
• Table/Index I/O, Table Locks
• Which application tables/indexes cause the most load or contention?
• Users/Hosts/Accounts
• Which application users, hosts, accounts are consuming the most
resources?
• Network I/O
• What is the network load like? How long do sessions idle?
• Summaries
• Aggregated statistics grouped by thread, user, host, account or object
MySQL 5.6.5 – Performance Schema Instrumentation
Improved Database Profiling/Application Tuning
23Copyright Oracle Corporation 2012
MySQL 5.6.5 – InnoDB Enhancements
• Better Performance, Scale
• 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
• Better recovery
• Dump and restore buffer pool
• Better Usability
• Full-text Search
• Variable page sizes – 4k, 8k
• Larger limit of index key prefixes (3072 bytes)
24Copyright Oracle Corporation 2012
MySQL 5.6.5 – Replication Enhancements
• High Availability and Fail-over
• Global Transaction Ids
• Replication Administration and Fail-over Utilities
• Better Data Integrity
• Crash-Safe Slaves, Replication Checksums, Crash-Safe Binlog
• Better Performance, Scale
• Multi-threaded slaves
• Reduced Binlog size for RBR
• Extra flexibility
• Time-delayed replication
• Simpler troubleshooting
• Row-based repl. logging of original query
• Enhanced Monitoring/Management
25Copyright Oracle Corporation 2012
•Foundation for reliable, automatic failover & recovery
• Unique identifier for each replication event written to the Binlog
•Simple to track & compare replication across the cluster
•Automatically identify the most up-to-date slave for failover
•Deploy complex replication topologies
•Eliminates Dev/Ops overhead
Master
GTID=123456
GTID=123456
GTID=123456 GTID=123456
MySQL 5.6.5 - Global Transaction Ids
26Copyright Oracle Corporation 2012
MySQL Utilities
• Automate common Dev/Ops tasks
• Replication: provisioning, testing, monitoring and failover
• Database comparisons: consistency checking
• Database administration: users, connections, tables, etc
• New utilities in development, ie log analysis
• Implemented as Python scripts, executed within MySQL
Workbench
• Extensible to include custom scripting
• Resources: Documentation & Community Forum
• http://dev.mysql.com/doc/workbench/en/mysql-utils-man.html
• http://forums.mysql.com/list.php?155
27Copyright Oracle Corporation 2012
Utility Workflow for Replication
• Check: Verifies pre-requisites for Replication
• Repl: Initiates Replication to the new slave
• Show: Display Replication topology
• Fail-Over & Admin: Detects and failovers (or switches)
from master to slave. Status monitoring
Check Repl Show
Fail-Over
& Admin
28Copyright Oracle Corporation 2012
•Automatic failover & slave promotion
• Continuous health monitoring & recovery
•Default is to promote most up-to-date
slave, based on GTID
• Slave promotion policies are fully
configurable
•Never lose replication events
• Nominated slave automatically retrieves
updates from later slaves
Replication Failover Utility
Failover
Utility
Monitoring
Fail-
Over
Master
Slaves
Auto-Failover &
Slave Promotion
29Copyright Oracle Corporation 2012
Replication Administration Utility
•Perform switchover to eliminate
downtime during planned
maintenance
•Start and stop slaves
•Slave discovery & monitoring
• Slave status, thread status
• Replication processing, including any lag
• Configure slave promotion policies
Master
Slaves
Administration
Utility
Status &
Switchover
Admin
Copyright Oracle Corporation 2012
MySQL <5.6
Transaction Data: in tables
Replication Info: in files
MySQL 5.6
Transaction Data: in tables
Replication Info: in tables
Slave Tables for Replication Information
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012

System tables:

slave_master_info (mysql.slave_master_info)

--master-info-repository=TABLE

slave_relay_log_info (mysql.slave_relay_log_info)

--relay-log-info-repository=TABLE

mysql_slave> stop slave;

mysql_slave> SET GLOBAL master_info_repository = 'TABLE';

mysql_slave> SET GLOBAL relay_log_info_repository = 'TABLE';

mysql_slave> start slave;

Make sure you add to my.cnf

master-info-repository =TABLE

relay-log-info-repository =TABLE

Transactional tables enables transactional slave positions

Automatic conversion between files and tables on startup

Long time awaited feature
http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html
Slave Tables for Replication Information
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
mysql_slave> select * from slave_master_info G

*************************** 1. row ***************************

Master_id: 2

Number_of_lines: 22

Master_log_name: yoda-bin.000003

Master_log_pos: 323

Host: yoda

User_name: replication

User_password: slavepass

Port: 3306

Connect_retry: 10

Enabled_ssl: 0

Ssl_ca:

Ssl_capath:

Ssl_cert:

Ssl_cipher:

Ssl_key:

Ssl_verify_server_cert: 0

Heartbeat: 1800

Bind:

Ignored_server_ids: 0

Uuid: 75d407df-2be4-11e1-9668-b4be9bce39b0

Retry_count: 86400

Ssl_crl:

Ssl_crlpath:

1 row in set (0.00 sec)
Slave Tables for Replication Information
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012

Detects corrupt replication events before they are
applied

Guards against bugs and disk or network corruptions

CRC-32 checksum, more precisely ISO-3309 (supplied
with zlib)

New mysqld options:

binlog-checksum= NONE or CRC32 generated
by the session thread and written to the binary log

SET GLOBAL binlog_checksum = 1;

master-verify-checksum= 0 or 1 Master
validates checksum read from the binary log

SET GLOBAL master_verify_checksum = 1;

slave-sql-verify-checksum= 0 or 1 SQL
thread should verify the checksum when reading it
from the relay log on the slave

mysql> SET GLOBAL slave_sql_verify_checksum=1;
http://mysqlmusings.blogspot.com/2011/04/replication-event-checksum.html
Replication Event Checksums
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Problem: events get corrupted while en route from master to slave.
Why and where it got corrupted?
Disk corruption, network, bugs in replication, faulty memory, cosmic ray, act of God?
Solution: include in each event its control checksum and verify it before:
sending it to the slave (master - dump thread)
storing it in the relay log (slave - IO thread)
applying it (slave - SQL thread)
several verification points: flexibility
mysql> show global variables like '%checksum%';
+---------------------------+--------+
| Variable_name | Value |
+---------------------------+--------+
| binlog_checksum | CRC32 |
| innodb_checksum_algorithm | innodb |
| innodb_checksums | ON |
| master_verify_checksum | ON |
| slave_sql_verify_checksum | ON |
+---------------------------+--------+
Replication Event Checksums
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Throughput of slave increased by allowing multiple slave threads:

0 - functionality disabled

0 to 1024
Exec_Master_Log_Posn in SHOW SLAVE STATUS represents a “low-
water” mark, before which no uncommitted transactions remain.
Configure using:

slave-parallel-workers=4
On a per-database basis

can process successive transactions on a given database without
waiting for updates on other databases to complete
http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workers
Multi-Threaded Slave
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
mysql_luke> show slave statusG
*************************** 1. row ***************************
....
Exec_Master_Log_Pos: 114
mysql> show global variables like '%workers%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| slave_parallel_workers | 0 |
+------------------------+-------+
1 row in set (0.00 sec)
mysql> SET GLOBAL slave_parallel_workers=4;
Query OK, 0 rows affected (0.00 sec)
mysql> show global variables like '%workers%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| slave_parallel_workers | 4 |
+------------------------+-------+
1 row in set (0.00 sec)
http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workers
Multi-Threaded Slave
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
In MySQL row-based replication (RBR), each row change event contains two images, a
“before” image whose columns are matched against when searching for the row to be
updated, and an “after” image containing the changes.

can often save disk, memory, and network usage by logging only those columns which
are actually required.

Default is full : Log all columns in both the before image and the after image.

New option: binlog-row-image= minimal

no effect when the binary logging format is STATEMENT. When binlog_format is MIXED,
the setting for binlog_row_image is applied to changes that are logged using row-based
format, but this setting no effect on changes logged as statements.

mysql> show global variables like '%binlog_row_image%';

mysql> SET GLOBAL binlog_row_image=minimal;
http://d2-systems.blogspot.com/2011/04/mysql-562-dm-optimized-row-based.html
http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_row_image
Optimized Row Based Replication
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Problem: Make replication slave to lag a specified amount of time behind
the master to:

To protect against user mistakes on the master.

To test how the system behaves when there is a lag.

To inspect what the database looked like long ago, without having to
reload a backup.
Solution: The slave waits until a given number of seconds elapses before
applying the changes:

Delays configured per slave: flexible deployment;

Are implemented in the SQL thread layer.

Rolling Database Backups with Relayed Replication
Time Delayed Replication
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
User interface:

CHANGE MASTER TO MASTER_DELAY = <NUM_SECONDS>;

mysql> stop slave;

mysql> CHANGE MASTER TO MASTER_DELAY=86400; start slave;

SHOW SLAVE STATUS:

SQL_Delay: 86400

SQL_Remaining_Delay: 86395

Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master
executed event

RESET SLAVE clears the configured delay;
Rolling forward delayed slaves until bad event:
START SLAVE [SQL_THREAD] UNTIL MASTER_LOG_FILE = 'log_name',
MASTER_LOG_POS = log_pos
http://dev.mysql.com/doc/refman/5.6/en/replication-delayed.html
http://dev.mysql.com/doc/refman/5.6/en/start-slave.html
Time Delayed Replication
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
86400 seconds in a day.
slave2> CHANGE MASTER TO
-> MASTER_HOST = 'localhost',
-> MASTER_PORT = 3306,
-> MASTER_USER = 'repl_user',
-> MASTER_PASSWORD = 'pw',
-> MASTER_DELAY = 86400;
slave2> START SLAVE;
Time Delayed Replication
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
mysql_luke> STOP SLAVE;
mysql_luke>SHOW RELAYLOG EVENTS FROM 2337G
*************************** 4. row ***************************
Log_name: luke-relay-bin.000005
Pos: 2674
Event_type: Query
Server_id: 1
End_log_pos: 2623
Info: drop database Tatooine
mysql_luke> START SLAVE UNTIL
-> MASTER_LOG_FILE='luke-relay-bin.000005',
-> MASTER_LOG_POS=2674;
Time Delayed Replication
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Problem: no way to send informational events down the replication stream.
Solution: Create a class of events that carry information from master to slave(s):

Use case: log the query that originated several rows events up-front as an
informational event;

Feature often requested for debugging.
http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.html
http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#option_mysqld_binlog-rows-query-log-events
Informational Log Events
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Enhances auditing and debugging when using Row-Based Replication by writing
the original query to the binary log, which is then replicated with its associated
row-based event to the slave.
write informational log events such as row query log events into its binary log.
sysvar_binlog_rows_query_log_events must be disabled during logging.
Logs the query that originated the subsequent rows changes.
Shows up in mysqlbinlog and SHOW SLAVE STATUS output.
New variable:
--binlog-rows-query-log-events= ON|OFF (default: OFF)
mysql> SET GLOBAL binlog_rows_query_log_events=ON;
mysql> show global variables like '%binlog_rows_query_log_events%';
+------------------------------+-------+
| Variable_name | Value |
+------------------------------+-------+
| binlog_rows_query_log_events | ON |
+------------------------------+-------+
Informational Log Events
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
mysql> SET binlog_format=ROW;
Query OK, 0 rows affected (0.00 sec)
mysql> SET SESSION binlog_rows_query_log_events=ON;
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE TABLE t1 (a INT);
Query OK, 0 rows affected (0.07 sec)
mysql> INSERT INTO t1 VALUES (1), (2), (3);
Query OK, 3 rows affected (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 0
mysql> SHOW BINLOG EVENTS;
+-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+
| master-bin.000001 | 4 | Format_desc | 1 | 114 | Server ver: 5.6.3-m5-debug-log, Binlog ver: 4 |
| master-bin.000001 | 114 | Query | 1 | 200 | use `test`; CREATE TABLE t1 (a INT) |
| master-bin.000001 | 200 | Query | 1 | 268 | BEGIN |
| master-bin.000001 | 268 | Rows_query | 1 | 323 | # INSERT INTO t1 VALUES (1), (2), (3) |
| master-bin.000001 | 323 | Table_map | 1 | 364 | table_id: 54 (test.t1) |
| master-bin.000001 | 364 | Write_rows | 1 | 408 | table_id: 54 flags: STMT_END_F |
| master-bin.000001 | 408 | Query | 1 | 477 | COMMIT |
+-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+
7 rows in set (0.00 sec)
http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.html
Informational Log Events
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Problem: There is no way to create real-time backups of the master's binary logs.
Solution: Make use of mysqlbinlog facilities that retrieve and dump remote
MySQL log contents as SQL statements to make it output in raw format:

DBAs don't need to do remote logins to retrieve master's binlogs or setup
an intermediate slave.
Remote Backup of Binary logs
MySQL 5.6.5 – Replication Enhancements
Copyright Oracle Corporation 2012
Make use of mysqlbinlog facilities that retrieve and dump remote MySQL log contents.
Writes to a local file with the same name as the original.
DBAs don't need to do remote logins to retrieve master's binlogs or setup an
intermediate slave.
Relevant new options for mysqlbinlog:

raw: dump in raw format

stop-never: waits for new data upon reaching the end of the log

stop-never-slave-server-id: id that mysqlbinlog will use to emulate itself as a slave.
Raw format use cases:

make a static backup

backing up a set of log files and stopping when the end of the last file is reached

continuous (“live”) backup
$> mysqlbinlog --read-from-remote-server –raw -h secret_server -P 3306 -u root mysql-bin.000001
http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html
Remote Backup of Binary logs
MySQL 5.6.5 – Replication Enhancements
47Copyright Oracle Corporation 2012
MySQL 5.6.5 – Other Enhancements
• TIME/TIMESTAMP/DATETIME – fractional second precision
• 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/
48Copyright Oracle Corporation 2012
• Replication
• Binlog Group Commit
• Binlog API
• InnoDB
• Memcached API for accessing InnoDB data
• Online operations (INDEX add, FK drop, Column rename)
• SSD/Flash Optimizations
• And More...
MySQL Database - Under Development
Early Access Features
labs.mysql.com/
Try it now!
labs.mysql.com
49Copyright Oracle Corporation 2012
• Fast, simple access to InnoDB
• Accessed via Memcached API
• Use existing Memcached clients
• Bypasses SQL transformations
• NotOnlySQL access
• For key-value operations
• SQL for rich queries, JOINs, FKs, etc.
• Implementation
• Memcached daemon plug-in to mysqld
• Memcached protocol mapped to the
native InnoDB API
• Shared process space for ultra-low
latency
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
50Copyright Oracle Corporation 2012
MySQL Database Development Priorities
• Performance/Scale – more threads/cores, SSD
• Cloud/SaaS/DaaS
• Multi-tenancy - Role-based security/ACLs, session/host level
throttling, more authentication options
• Elastic Scale – Auto-sharding/partitioning of data, provisioning of
replicas, load balancing, “elastic” allocation of server/VM resources
• Web-based management, monitoring, backup/recovery
• High Availability
• Multi-source, master replication, conflict detection
• Auto-failover, redundancy
• Management tools and utilities for ease of use
• Pluggable, micro-kernel architecture
51Copyright Oracle Corporation 2012
• Foreign Keys
• Ease of Use
• Tools for simplified configuration, provisioning &
management
• Enhanced API Support
• New NoSQL Interfaces
• Richer SQL Functionality
• Performance & Capacity Increases
• Optimizations for latest hardware developments
• Wider Deployment Options
• Virtualization
• Cloud
MySQL Cluster Development Priorities
52Copyright Oracle Corporation 2012
MySQL Enterprise Edition
Most secure, scalable MySQL Database, Online Backup,
Development/Monitoring Tools, backed by Oracle Premier
Lifetime Support
Oracle Premier
Support
Oracle Product
Certifications/Integrations
MySQL Enterprise
High Availability
MySQL Enterprise
Security
MySQL Enterprise
Scalability
MySQL Enterprise
Backup
MySQL Enterprise
Monitor/Query Analyzer
MySQL Workbench
53Copyright Oracle Corporation 2012
• MySQL Enterprise Security
• External Authentication for Windows and PAM
• Integrates MySQL apps with existing infrastructures
• MySQL Enterprise Scalability
• MySQL Thread Pool
• Improves sustained performance/scale as connections grow
• 20x scale improvement in SysBench OLTP R/W benchmarks
• MySQL High Availability
• Oracle VM Template for MySQL
• Windows Clustering
• Oracle Product Certifications
• Manage MySQL with Oracle tools that are already in use
MySQL Enterprise Edition
Commercial Extensions Available Now
54Copyright Oracle Corporation 2012
Connect as
4. Tokens are checked, win_joe
user is authenticated using
Windows login, password with
MySQL specific privs
Connect as
1. MyDomain/joe logs into
environment with Windows
login, password
Connected
Authenticate
CREATE USER win_joe
IDENTIFIED WITH authentication_windows
AS ‘joe';
App
Win OS users,
groups, etc
Windows
Auth
Connect as
2. MyDomainjoe is
authenticated on
Windows OSConnect as
3. MyDomain/joe logs into
application, application
connects to MySQL with user
win_joe.
Connector
Windows Authentication
Example
55Copyright Oracle Corporation 2012
3. User name/password sent
to the PAM library, yes/no
answer from PAM library
returned to client.
1. Joe logs in using
application user
name/password.
Connected
CREATE USER joe
IDENTIFIED WITH 'authentication_pam'
AS ‘mysql';
App
PAM library
and various
backends
2. Connector sends the user
name/password to the
MySQL server.
Connector
4. PAM library verifies credentials
(using e.g. LDAP or Kerberos etc)
and returns yes/no answer for
delivery to client.
PAM
Authentication
PAM Authentication
Example
56Copyright Oracle Corporation 2012
Default Thread Handling
Internal Clients
Default
Thread Handling
Connections
/statements
assigned
to Threads
for life
• Connections assigned to 1 thread for the life of the connection, same
thread used for all statements
• No prioritization of threads, statement executions
• Many concurrent connections = many concurrent execution threads to
consume server memory, limit scalability
Connection Execution Threads
External Clients
57Copyright Oracle Corporation 2012
With Thread Pool Enabled
Internal Clients
Connection Execution Threads
External Clients
Thread Pool
Thread Group 1
Threads 1 - 4096
Thread Group 2
Threads 4097 - 8193
Thread Group N
Threads 8194 - N
• Thread Pool contains configurable number of thread groups (default = 16),
each manages up to 4096 re-usable threads
• Each connection assigned to thread group via round robin
• Threads are prioritized, statements queued to limit concurrent executions,
load on server, improve scalability as connections grow
Thread Group 1
Thread Group 2
Thread Group N
58Copyright Oracle Corporation 2012
MySQL Enterprise Edition
With Thread Pool
MySQL Community Server
Without Thread Pool
MySQL Enterprise Edition
20x Better Scalability with Thread Pool
8 32 128 512 1536 2560 3584
0
1000
2000
3000
4000
5000
6000
7000
8000
MySQL 5.5 Sysbench OLTP Read/Write
Simultaneous Database Connections
Transactions Per Second
MySQL 5.5.16
Oracle Linux 6.1, Unbreakable Kernel 2.6.32
2 sockets, 24 cores, 2 X 12-core
Intel(R) Xeon(R) X5670 2.93GHz CPUs
72GB DDR3 RAM
2 X LSI SCSI Disk (MR9261-8i) (597GB)
59Copyright Oracle Corporation 2012
MySQL Enterprise Edition
With Thread Pool
MySQL Community Server
Without Thread Pool
MySQL Enterprise Edition
3x Better Scalability with Thread Pool
MySQL 5.5.16
Oracle Linux 6.1, Unbreakable Kernel 2.6.32
2 sockets, 24 cores, 2 X 12-core
Intel(R) Xeon(R) X5670 2.93GHz CPUs
72GB DDR3 RAM
2 X LSI SCSI Disk (MR9261-8i) (597GB)
8 32 128 512 1536 2560 3584
0
2000
4000
6000
8000
10000
12000
MySQL 5.5 Sysbench OLTP Read Only
Simultaneous Database Connections
Transactions Per Second
60Copyright Oracle Corporation 2012
• MySQL Enterprise Security
• MySQL Database Auditing extension
• More Authentication plug-ins
• Oracle Product Certifications
• Oracle Audit Vault
• MySQL Enterprise High Availability
• Oracle Clusterware
MySQL Enterprise Development Priorities
61Copyright Oracle Corporation 2012
• MySQL Enterprise Backup
• Performance – parallel backups, skip empty pages,
more
• Efficiency, Ease of use
• Better PIT recovery
• Remote backup administration (on-premise, Cloud)
• Integration with Enterprise tools
• MySQL Workbench SE
• Schema/data migration from SQL Server
• ER Model Repository
• Code generation – PHP, Python
MySQL Enterprise Development Priorities
62Copyright Oracle Corporation 2012
• MySQL Enterprise Monitor
• Evolve into management
• Instance, Backup, ReplicationHA
• Integration with Oracle Enterprise Manager
MySQL Enterprise Development Priorities
63Copyright Oracle Corporation 2012
Oracle Fusion MiddleWare
• WebLogic Server
• Database Adapter for Oracle
SOA Suite
• Oracle Business Process
Management
• Oracle Virtual Directory
• Oracle Data Integrator
• Oracle Enterprise
Performance Management
• Oracle Identity Analytics
• Open SSO STS, Open SSO
Fedlet
• Oracle Linux
• Oracle VM
• Oracle VM Template for
MySQL Enterprise Edition
• Oracle GoldenGate
• Oracle Secure Backup
• Oracle Database Firewall
• MyOracle Online Support
MySQL Enterprise Oracle Certifications
Completed
64Copyright Oracle Corporation 2012
mysql.com

TCO calculator: http://www.mysql.com/tcosavings/

White Papers: http://www.mysql.com/why-mysql/white-papers/

Customer use cases and success stories:
http://www.mysql.com/why-mysql/case-studies/
dev.mysql.com

Downloads: http://dev.mysql.com/downloads/

Documentation: http://dev.mysql.com/doc/

Forums: http://forums.mysql.com/

PlanetMySQL: http://planet.mysql.com

List of resources (books) : http://dev.mysql.com/resources/
MySQL Resources
65Copyright Oracle Corporation 2012
eDelivery.com

Download and evaluate all MySQL products
Wiki:
https://wikis.oracle.com/display/mysql/Home
50 things to know before migrating Oracle to MySQL
It is a little old but worth the read
www.xaprb.com/blog/2009/03/13/50-things-to-know-before-migrating-oracle-to-mysql/
MySQL Resources
66Copyright Oracle Corporation 2012
https://blogs.oracle.com/MySQL/entry/more_early_access_features_in
http://mysqlblog.fivefarmers.com/2012/05/29/overlooked-mysql-5-6-new-features-
timestamp-and-datetime-improvements/
http://mysqlblog.fivefarmers.com/2012/05/23/overlooked-mysql-5-6-new-features-wl5217/
MySQL Resources
67Copyright Oracle Corporation 2012
https://blogs.oracle.com/MySQL/entry/more_early_access_features_in
<Insert Picture Here>
CONFIDENTIAL – ORACLE HIGHLY RESTRICTED
68
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMario Beck
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMiguel Araújo
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017Ivan Ma
 
Making MySQL highly available using Oracle Grid Infrastructure
Making MySQL highly available using Oracle Grid InfrastructureMaking MySQL highly available using Oracle Grid Infrastructure
Making MySQL highly available using Oracle Grid InfrastructureIlmar Kerm
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015Mario Beck
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONMario Beck
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesSven Sandberg
 
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - TutorialMySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - TutorialKenny Gryp
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellEmily Ikuta
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017Ivan Ma
 
How WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your ProductivityHow WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your ProductivityBruno Borges
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMatt Lord
 
MySQL Replication Performance in the Cloud
MySQL Replication Performance in the CloudMySQL Replication Performance in the Cloud
MySQL Replication Performance in the CloudVitor Oliveira
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7Zhaoyang Wang
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11Kenny Gryp
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMatt Lord
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News Ted Wennmark
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 

Was ist angesagt? (20)

MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
MySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA ToolMySQL Shell - The Best MySQL DBA Tool
MySQL Shell - The Best MySQL DBA Tool
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
 
Making MySQL highly available using Oracle Grid Infrastructure
Making MySQL highly available using Oracle Grid InfrastructureMaking MySQL highly available using Oracle Grid Infrastructure
Making MySQL highly available using Oracle Grid Infrastructure
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
NoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSONNoSQL and MySQL: News about JSON
NoSQL and MySQL: News about JSON
 
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best PracticesOracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
Oracle OpenWorld 2013 - HOL9737 MySQL Replication Best Practices
 
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - TutorialMySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - Tutorial
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
 
How WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your ProductivityHow WebLogic 12c Can Boost Your Productivity
How WebLogic 12c Can Boost Your Productivity
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
MySQL Replication Performance in the Cloud
MySQL Replication Performance in the CloudMySQL Replication Performance in the Cloud
MySQL Replication Performance in the Cloud
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7
 
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
MySQL Database Architectures - MySQL InnoDB ClusterSet 2021-11
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
 
MySQL Cluster Basics
MySQL Cluster BasicsMySQL Cluster Basics
MySQL Cluster Basics
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 

Ähnlich wie My sql 56_roadmap_april2012

My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2Ivan Tu
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMorgan Tocker
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014Ryusuke Kajiyama
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQLTommy Lee
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMark Swarbrick
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7Olivier DASINI
 
My sqlstrategyroadmap
My sqlstrategyroadmapMy sqlstrategyroadmap
My sqlstrategyroadmapslidethanks
 
MySQL Strategy&Roadmap
MySQL Strategy&RoadmapMySQL Strategy&Roadmap
MySQL Strategy&Roadmapslidethanks
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMark Swarbrick
 
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim TkachenkoNoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim TkachenkoData Con LA
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Ivan Ma
 
MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012Colin Charles
 
A26 MariaDB : The New&Implemented MySQL Branch by Colin Charles
A26 MariaDB : The New&Implemented MySQL Branch by Colin CharlesA26 MariaDB : The New&Implemented MySQL Branch by Colin Charles
A26 MariaDB : The New&Implemented MySQL Branch by Colin CharlesInsight Technology, Inc.
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?Alkin Tezuysal
 

Ähnlich wie My sql 56_roadmap_april2012 (20)

My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2My sql 56_roadmap_april2012_zht2
My sql 56_roadmap_april2012_zht2
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
MySQL Cluster
MySQL ClusterMySQL Cluster
MySQL Cluster
 
Fudcon talk.ppt
Fudcon talk.pptFudcon talk.ppt
Fudcon talk.ppt
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
 
MySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats newMySQL Tech Tour 2015 - 5.7 Whats new
MySQL Tech Tour 2015 - 5.7 Whats new
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7
 
My sqlstrategyroadmap
My sqlstrategyroadmapMy sqlstrategyroadmap
My sqlstrategyroadmap
 
MySQL Strategy&Roadmap
MySQL Strategy&RoadmapMySQL Strategy&Roadmap
MySQL Strategy&Roadmap
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim TkachenkoNoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
 
MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012
 
MySQL 开发
MySQL 开发MySQL 开发
MySQL 开发
 
A26 MariaDB : The New&Implemented MySQL Branch by Colin Charles
A26 MariaDB : The New&Implemented MySQL Branch by Colin CharlesA26 MariaDB : The New&Implemented MySQL Branch by Colin Charles
A26 MariaDB : The New&Implemented MySQL Branch by Colin Charles
 
My sql indo_comm
My sql indo_commMy sql indo_comm
My sql indo_comm
 
MySQL 5.7 what's new
MySQL 5.7 what's newMySQL 5.7 what's new
MySQL 5.7 what's new
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
 

Kürzlich hochgeladen

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Kürzlich hochgeladen (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

My sql 56_roadmap_april2012

  • 1. <Insert Picture Here> CONFIDENTIAL – ORACLE HIGHLY RESTRICTED
  • 2. <Insert Picture Here> CONFIDENTIAL – ORACLE HIGHLY RESTRICTED 2 The MySQL Roadmap: Discover What’s New June, 2012 Keith Larson, MySQL Community Manager
  • 3. 3Copyright Oracle Corporation 2012 Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decision. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 4. 4Copyright Oracle Corporation 2012 localhost ~]$ whoami Keith Larson keith.larson@oracle.com MySQL Community Manager sqlhjalp.blogspot.com Started with MySQL 3.23 during the dot.com days. Primary real world work was with a MySQL InnoDB delayed replicated environment that easily held over 4 billion rows of user data. Did a lot of data mining of that data over the years. Numerous other sites developed on LAMP stack over the last 13 years. Who are you? DBAs? Developers?
  • 5. 5Copyright Oracle Corporation 2012 Oracle’s Investment in MySQL Rapid Innovation Make MySQL a Better MySQL • #1 Open Source Database for Web Applications • “M” in most complete LAMP stack • Embedded Develop, Promote and Support MySQL • Improved engineering, consulting and support • Leverage 24x7, World-Class Oracle Support MySQL Community Edition • Source and binary releases • GPL license
  • 6. 6Copyright Oracle Corporation 2012 More Product Releases Than Ever Before 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”) Driving MySQL Innovation 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!
  • 7. 7Copyright Oracle Corporation 2012 InnoDB is the default storage engine • ACID Transactions, FKs, Crash Recovery Improved Performance • Enhancements in MySQL DB • Enhancements in InnoDB • + 360% over 5.1 on Linux • + 1500% over 5.1 on Windows Improved Availability • Semi-synchronous Replication • Replication Heartbeat Improved Usability • SIGNAL/RESIGNAL • More Partitioning Options • New PERFORMANCE_SCHEMA MySQL 5.5 – Best Release Ever
  • 8. 8Copyright Oracle Corporation 2012 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/Second
  • 9. 9Copyright Oracle Corporation 2012 • MySQL 5.6 builds on MySQL 5.5 by improving: • 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 m8 latest DMR -- 2012 MySQL Database 5.6: A Better MySQL.
  • 10. 10Copyright Oracle Corporation 2012 Model: Development Milestone Releases (“DMR”) • New DMR every 3-6 months • Accumulating features for Next GA (5.6) • New features integrated on stable trunk • Features signed off by QA and tested together • Close to Release Quality • Next GA cut from one upcoming DMR Model: MySQL Labs “Early Access” features • Previews, not on trunk • No promise of making GA release MySQL “Early Access” Release Models Database and Cluster
  • 11. 11Copyright Oracle Corporation 2012 MySQL 5.6.5 – Optimizer Enhancements • 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
  • 12. 12Copyright Oracle Corporation 2012 MySQL 5.6.5 – Optimizer Postpone materialization of views/subqueries 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
  • 13. EXPLAIN in MySQL 5.5: Room for Improvement ● SELECT statements only ● What about INSERT, UPDATE, DELETE ? ● Tabular output ● Difficult to see the structure of the query plan ● More information would be useful ● E.g., When are the WHERE conditions evaluated? ● Shows the chosen plan, but does not tell you why this plan was chosen.
  • 14. 14Copyright Oracle Corporation 2012 • 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 – Optimizer Add 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;
  • 15. MySQL 5.6: EXPLAIN for Data-Modifying Statements EXPLAIN UPDATE t1 SET b = 'b' WHERE a > 2 G id: 1 select_type: SIMPLE table: t1 type: range possible_keys: a,a_2 key: a key_len: 16 ref: null rows: 2 Extra: Using where; Using temporary
  • 16. MySQL 5.6: EXPLAIN for Data-Modifying Statements, cont. EXPLAIN INSERT INTO t1 SELECT * FROM t2 WHERE a IN (1, 3, 5) G id: 1 select_type: SIMPLE table: t2 type: range possible_keys: t2i1 key: t2i1 key_len: 4 ref: null rows: 3 Extra: Using index condition
  • 17. MySQL 5.6: Structured EXPLAIN EXPLAIN FORMAT=JSON SELECT * FROM t2 WHERE i > 1 AND j < 3; { "query_block": { "select_id": 1, "table": { "table_name": "t2", "access_type": "range", "possible_keys": [ "PRIMARY" ] /* possible_keys */, ...
  • 18. MySQL 5.6: Structured EXPLAIN, cont. ... "key": "PRIMARY", "key_length": "4", "rows": 2, "filtered": 100, "index_condition": "(`test`.`t2`.`i` > 1)", "attached_condition": "(`test`.`t2`.`j` < 3)" } /* table */ } /* query_block */ }
  • 19. SET SESSION.OPTIMIZER_TRACE=‘enabled=on’; SELECT v FROM t1 WHERE i1 = 1 AND v = 'a'; SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE; "rows_estimation": [ { "table": "`t1`", "range_analysis": { "table_scan": { "rows": 5, "cost": 4.1 }, "potential_range_indices": [ { "index": "v_idx", "usable": true, "key_parts": [ "v", "i1" ] } ], "best_covering_index_scan": { "index": "v_idx", "cost": 2.0063, "chosen": true }, • EXPLAIN shows the generated plan • TRACE shows how the plan was generated, decision points etc. • JSON format • Developers, support, advanced customers Query Plan Debugging MySQL 5.6.5 – Optimizer Traces
  • 20. 20Copyright Oracle Corporation 2012 testpe r 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 – Optimizer Enhancements Index Condition Pushdown (ICP) • With ICP Enabled ⇒ Execution time drops to 90 ms for both
  • 21. 21Copyright Oracle Corporation 2012 0 8 16 24 32 40 48 56 64 5 50 500 5000 1225 9.63 2821 No BKA BKA Join Buffer Size (MB) QueryTime(secs) MySQL 5.6.5 – Optimizer Enhancements Batched Key Access (BKA) and 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”
  • 22. 22Copyright Oracle Corporation 2012 • Statements/Stages • What are my most resource intensive queries? Where do they spend time? • Table/Index I/O, Table Locks • Which application tables/indexes cause the most load or contention? • Users/Hosts/Accounts • Which application users, hosts, accounts are consuming the most resources? • Network I/O • What is the network load like? How long do sessions idle? • Summaries • Aggregated statistics grouped by thread, user, host, account or object MySQL 5.6.5 – Performance Schema Instrumentation Improved Database Profiling/Application Tuning
  • 23. 23Copyright Oracle Corporation 2012 MySQL 5.6.5 – InnoDB Enhancements • Better Performance, Scale • 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 • Better recovery • Dump and restore buffer pool • Better Usability • Full-text Search • Variable page sizes – 4k, 8k • Larger limit of index key prefixes (3072 bytes)
  • 24. 24Copyright Oracle Corporation 2012 MySQL 5.6.5 – Replication Enhancements • High Availability and Fail-over • Global Transaction Ids • Replication Administration and Fail-over Utilities • Better Data Integrity • Crash-Safe Slaves, Replication Checksums, Crash-Safe Binlog • Better Performance, Scale • Multi-threaded slaves • Reduced Binlog size for RBR • Extra flexibility • Time-delayed replication • Simpler troubleshooting • Row-based repl. logging of original query • Enhanced Monitoring/Management
  • 25. 25Copyright Oracle Corporation 2012 •Foundation for reliable, automatic failover & recovery • Unique identifier for each replication event written to the Binlog •Simple to track & compare replication across the cluster •Automatically identify the most up-to-date slave for failover •Deploy complex replication topologies •Eliminates Dev/Ops overhead Master GTID=123456 GTID=123456 GTID=123456 GTID=123456 MySQL 5.6.5 - Global Transaction Ids
  • 26. 26Copyright Oracle Corporation 2012 MySQL Utilities • Automate common Dev/Ops tasks • Replication: provisioning, testing, monitoring and failover • Database comparisons: consistency checking • Database administration: users, connections, tables, etc • New utilities in development, ie log analysis • Implemented as Python scripts, executed within MySQL Workbench • Extensible to include custom scripting • Resources: Documentation & Community Forum • http://dev.mysql.com/doc/workbench/en/mysql-utils-man.html • http://forums.mysql.com/list.php?155
  • 27. 27Copyright Oracle Corporation 2012 Utility Workflow for Replication • Check: Verifies pre-requisites for Replication • Repl: Initiates Replication to the new slave • Show: Display Replication topology • Fail-Over & Admin: Detects and failovers (or switches) from master to slave. Status monitoring Check Repl Show Fail-Over & Admin
  • 28. 28Copyright Oracle Corporation 2012 •Automatic failover & slave promotion • Continuous health monitoring & recovery •Default is to promote most up-to-date slave, based on GTID • Slave promotion policies are fully configurable •Never lose replication events • Nominated slave automatically retrieves updates from later slaves Replication Failover Utility Failover Utility Monitoring Fail- Over Master Slaves Auto-Failover & Slave Promotion
  • 29. 29Copyright Oracle Corporation 2012 Replication Administration Utility •Perform switchover to eliminate downtime during planned maintenance •Start and stop slaves •Slave discovery & monitoring • Slave status, thread status • Replication processing, including any lag • Configure slave promotion policies Master Slaves Administration Utility Status & Switchover Admin
  • 30. Copyright Oracle Corporation 2012 MySQL <5.6 Transaction Data: in tables Replication Info: in files MySQL 5.6 Transaction Data: in tables Replication Info: in tables Slave Tables for Replication Information MySQL 5.6.5 – Replication Enhancements
  • 31. Copyright Oracle Corporation 2012  System tables:  slave_master_info (mysql.slave_master_info)  --master-info-repository=TABLE  slave_relay_log_info (mysql.slave_relay_log_info)  --relay-log-info-repository=TABLE  mysql_slave> stop slave;  mysql_slave> SET GLOBAL master_info_repository = 'TABLE';  mysql_slave> SET GLOBAL relay_log_info_repository = 'TABLE';  mysql_slave> start slave;  Make sure you add to my.cnf  master-info-repository =TABLE  relay-log-info-repository =TABLE  Transactional tables enables transactional slave positions  Automatic conversion between files and tables on startup  Long time awaited feature http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html Slave Tables for Replication Information MySQL 5.6.5 – Replication Enhancements
  • 32. Copyright Oracle Corporation 2012 mysql_slave> select * from slave_master_info G  *************************** 1. row ***************************  Master_id: 2  Number_of_lines: 22  Master_log_name: yoda-bin.000003  Master_log_pos: 323  Host: yoda  User_name: replication  User_password: slavepass  Port: 3306  Connect_retry: 10  Enabled_ssl: 0  Ssl_ca:  Ssl_capath:  Ssl_cert:  Ssl_cipher:  Ssl_key:  Ssl_verify_server_cert: 0  Heartbeat: 1800  Bind:  Ignored_server_ids: 0  Uuid: 75d407df-2be4-11e1-9668-b4be9bce39b0  Retry_count: 86400  Ssl_crl:  Ssl_crlpath:  1 row in set (0.00 sec) Slave Tables for Replication Information MySQL 5.6.5 – Replication Enhancements
  • 33. Copyright Oracle Corporation 2012  Detects corrupt replication events before they are applied  Guards against bugs and disk or network corruptions  CRC-32 checksum, more precisely ISO-3309 (supplied with zlib)  New mysqld options:  binlog-checksum= NONE or CRC32 generated by the session thread and written to the binary log  SET GLOBAL binlog_checksum = 1;  master-verify-checksum= 0 or 1 Master validates checksum read from the binary log  SET GLOBAL master_verify_checksum = 1;  slave-sql-verify-checksum= 0 or 1 SQL thread should verify the checksum when reading it from the relay log on the slave  mysql> SET GLOBAL slave_sql_verify_checksum=1; http://mysqlmusings.blogspot.com/2011/04/replication-event-checksum.html Replication Event Checksums MySQL 5.6.5 – Replication Enhancements
  • 34. Copyright Oracle Corporation 2012 Problem: events get corrupted while en route from master to slave. Why and where it got corrupted? Disk corruption, network, bugs in replication, faulty memory, cosmic ray, act of God? Solution: include in each event its control checksum and verify it before: sending it to the slave (master - dump thread) storing it in the relay log (slave - IO thread) applying it (slave - SQL thread) several verification points: flexibility mysql> show global variables like '%checksum%'; +---------------------------+--------+ | Variable_name | Value | +---------------------------+--------+ | binlog_checksum | CRC32 | | innodb_checksum_algorithm | innodb | | innodb_checksums | ON | | master_verify_checksum | ON | | slave_sql_verify_checksum | ON | +---------------------------+--------+ Replication Event Checksums MySQL 5.6.5 – Replication Enhancements
  • 35. Copyright Oracle Corporation 2012 Throughput of slave increased by allowing multiple slave threads:  0 - functionality disabled  0 to 1024 Exec_Master_Log_Posn in SHOW SLAVE STATUS represents a “low- water” mark, before which no uncommitted transactions remain. Configure using:  slave-parallel-workers=4 On a per-database basis  can process successive transactions on a given database without waiting for updates on other databases to complete http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workers Multi-Threaded Slave MySQL 5.6.5 – Replication Enhancements
  • 36. Copyright Oracle Corporation 2012 mysql_luke> show slave statusG *************************** 1. row *************************** .... Exec_Master_Log_Pos: 114 mysql> show global variables like '%workers%'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | slave_parallel_workers | 0 | +------------------------+-------+ 1 row in set (0.00 sec) mysql> SET GLOBAL slave_parallel_workers=4; Query OK, 0 rows affected (0.00 sec) mysql> show global variables like '%workers%'; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | slave_parallel_workers | 4 | +------------------------+-------+ 1 row in set (0.00 sec) http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workers Multi-Threaded Slave MySQL 5.6.5 – Replication Enhancements
  • 37. Copyright Oracle Corporation 2012 In MySQL row-based replication (RBR), each row change event contains two images, a “before” image whose columns are matched against when searching for the row to be updated, and an “after” image containing the changes.  can often save disk, memory, and network usage by logging only those columns which are actually required.  Default is full : Log all columns in both the before image and the after image.  New option: binlog-row-image= minimal  no effect when the binary logging format is STATEMENT. When binlog_format is MIXED, the setting for binlog_row_image is applied to changes that are logged using row-based format, but this setting no effect on changes logged as statements.  mysql> show global variables like '%binlog_row_image%';  mysql> SET GLOBAL binlog_row_image=minimal; http://d2-systems.blogspot.com/2011/04/mysql-562-dm-optimized-row-based.html http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_row_image Optimized Row Based Replication MySQL 5.6.5 – Replication Enhancements
  • 38. Copyright Oracle Corporation 2012 Problem: Make replication slave to lag a specified amount of time behind the master to:  To protect against user mistakes on the master.  To test how the system behaves when there is a lag.  To inspect what the database looked like long ago, without having to reload a backup. Solution: The slave waits until a given number of seconds elapses before applying the changes:  Delays configured per slave: flexible deployment;  Are implemented in the SQL thread layer.  Rolling Database Backups with Relayed Replication Time Delayed Replication MySQL 5.6.5 – Replication Enhancements
  • 39. Copyright Oracle Corporation 2012 User interface:  CHANGE MASTER TO MASTER_DELAY = <NUM_SECONDS>;  mysql> stop slave;  mysql> CHANGE MASTER TO MASTER_DELAY=86400; start slave;  SHOW SLAVE STATUS:  SQL_Delay: 86400  SQL_Remaining_Delay: 86395  Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master executed event  RESET SLAVE clears the configured delay; Rolling forward delayed slaves until bad event: START SLAVE [SQL_THREAD] UNTIL MASTER_LOG_FILE = 'log_name', MASTER_LOG_POS = log_pos http://dev.mysql.com/doc/refman/5.6/en/replication-delayed.html http://dev.mysql.com/doc/refman/5.6/en/start-slave.html Time Delayed Replication MySQL 5.6.5 – Replication Enhancements
  • 40. Copyright Oracle Corporation 2012 86400 seconds in a day. slave2> CHANGE MASTER TO -> MASTER_HOST = 'localhost', -> MASTER_PORT = 3306, -> MASTER_USER = 'repl_user', -> MASTER_PASSWORD = 'pw', -> MASTER_DELAY = 86400; slave2> START SLAVE; Time Delayed Replication MySQL 5.6.5 – Replication Enhancements
  • 41. Copyright Oracle Corporation 2012 mysql_luke> STOP SLAVE; mysql_luke>SHOW RELAYLOG EVENTS FROM 2337G *************************** 4. row *************************** Log_name: luke-relay-bin.000005 Pos: 2674 Event_type: Query Server_id: 1 End_log_pos: 2623 Info: drop database Tatooine mysql_luke> START SLAVE UNTIL -> MASTER_LOG_FILE='luke-relay-bin.000005', -> MASTER_LOG_POS=2674; Time Delayed Replication MySQL 5.6.5 – Replication Enhancements
  • 42. Copyright Oracle Corporation 2012 Problem: no way to send informational events down the replication stream. Solution: Create a class of events that carry information from master to slave(s):  Use case: log the query that originated several rows events up-front as an informational event;  Feature often requested for debugging. http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.html http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#option_mysqld_binlog-rows-query-log-events Informational Log Events MySQL 5.6.5 – Replication Enhancements
  • 43. Copyright Oracle Corporation 2012 Enhances auditing and debugging when using Row-Based Replication by writing the original query to the binary log, which is then replicated with its associated row-based event to the slave. write informational log events such as row query log events into its binary log. sysvar_binlog_rows_query_log_events must be disabled during logging. Logs the query that originated the subsequent rows changes. Shows up in mysqlbinlog and SHOW SLAVE STATUS output. New variable: --binlog-rows-query-log-events= ON|OFF (default: OFF) mysql> SET GLOBAL binlog_rows_query_log_events=ON; mysql> show global variables like '%binlog_rows_query_log_events%'; +------------------------------+-------+ | Variable_name | Value | +------------------------------+-------+ | binlog_rows_query_log_events | ON | +------------------------------+-------+ Informational Log Events MySQL 5.6.5 – Replication Enhancements
  • 44. Copyright Oracle Corporation 2012 mysql> SET binlog_format=ROW; Query OK, 0 rows affected (0.00 sec) mysql> SET SESSION binlog_rows_query_log_events=ON; Query OK, 0 rows affected (0.00 sec) mysql> CREATE TABLE t1 (a INT); Query OK, 0 rows affected (0.07 sec) mysql> INSERT INTO t1 VALUES (1), (2), (3); Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> SHOW BINLOG EVENTS; +-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+ | Log_name | Pos | Event_type | Server_id | End_log_pos | Info | +-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+ | master-bin.000001 | 4 | Format_desc | 1 | 114 | Server ver: 5.6.3-m5-debug-log, Binlog ver: 4 | | master-bin.000001 | 114 | Query | 1 | 200 | use `test`; CREATE TABLE t1 (a INT) | | master-bin.000001 | 200 | Query | 1 | 268 | BEGIN | | master-bin.000001 | 268 | Rows_query | 1 | 323 | # INSERT INTO t1 VALUES (1), (2), (3) | | master-bin.000001 | 323 | Table_map | 1 | 364 | table_id: 54 (test.t1) | | master-bin.000001 | 364 | Write_rows | 1 | 408 | table_id: 54 flags: STMT_END_F | | master-bin.000001 | 408 | Query | 1 | 477 | COMMIT | +-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+ 7 rows in set (0.00 sec) http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.html Informational Log Events MySQL 5.6.5 – Replication Enhancements
  • 45. Copyright Oracle Corporation 2012 Problem: There is no way to create real-time backups of the master's binary logs. Solution: Make use of mysqlbinlog facilities that retrieve and dump remote MySQL log contents as SQL statements to make it output in raw format:  DBAs don't need to do remote logins to retrieve master's binlogs or setup an intermediate slave. Remote Backup of Binary logs MySQL 5.6.5 – Replication Enhancements
  • 46. Copyright Oracle Corporation 2012 Make use of mysqlbinlog facilities that retrieve and dump remote MySQL log contents. Writes to a local file with the same name as the original. DBAs don't need to do remote logins to retrieve master's binlogs or setup an intermediate slave. Relevant new options for mysqlbinlog:  raw: dump in raw format  stop-never: waits for new data upon reaching the end of the log  stop-never-slave-server-id: id that mysqlbinlog will use to emulate itself as a slave. Raw format use cases:  make a static backup  backing up a set of log files and stopping when the end of the last file is reached  continuous (“live”) backup $> mysqlbinlog --read-from-remote-server –raw -h secret_server -P 3306 -u root mysql-bin.000001 http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html Remote Backup of Binary logs MySQL 5.6.5 – Replication Enhancements
  • 47. 47Copyright Oracle Corporation 2012 MySQL 5.6.5 – Other Enhancements • TIME/TIMESTAMP/DATETIME – fractional second precision • 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/
  • 48. 48Copyright Oracle Corporation 2012 • Replication • Binlog Group Commit • Binlog API • InnoDB • Memcached API for accessing InnoDB data • Online operations (INDEX add, FK drop, Column rename) • SSD/Flash Optimizations • And More... MySQL Database - Under Development Early Access Features labs.mysql.com/ Try it now! labs.mysql.com
  • 49. 49Copyright Oracle Corporation 2012 • Fast, simple access to InnoDB • Accessed via Memcached API • Use existing Memcached clients • Bypasses SQL transformations • NotOnlySQL access • For key-value operations • SQL for rich queries, JOINs, FKs, etc. • Implementation • Memcached daemon plug-in to mysqld • Memcached protocol mapped to the native InnoDB API • Shared process space for ultra-low latency 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
  • 50. 50Copyright Oracle Corporation 2012 MySQL Database Development Priorities • Performance/Scale – more threads/cores, SSD • Cloud/SaaS/DaaS • Multi-tenancy - Role-based security/ACLs, session/host level throttling, more authentication options • Elastic Scale – Auto-sharding/partitioning of data, provisioning of replicas, load balancing, “elastic” allocation of server/VM resources • Web-based management, monitoring, backup/recovery • High Availability • Multi-source, master replication, conflict detection • Auto-failover, redundancy • Management tools and utilities for ease of use • Pluggable, micro-kernel architecture
  • 51. 51Copyright Oracle Corporation 2012 • Foreign Keys • Ease of Use • Tools for simplified configuration, provisioning & management • Enhanced API Support • New NoSQL Interfaces • Richer SQL Functionality • Performance & Capacity Increases • Optimizations for latest hardware developments • Wider Deployment Options • Virtualization • Cloud MySQL Cluster Development Priorities
  • 52. 52Copyright Oracle Corporation 2012 MySQL Enterprise Edition Most secure, scalable MySQL Database, Online Backup, Development/Monitoring Tools, backed by Oracle Premier Lifetime Support Oracle Premier Support Oracle Product Certifications/Integrations MySQL Enterprise High Availability MySQL Enterprise Security MySQL Enterprise Scalability MySQL Enterprise Backup MySQL Enterprise Monitor/Query Analyzer MySQL Workbench
  • 53. 53Copyright Oracle Corporation 2012 • MySQL Enterprise Security • External Authentication for Windows and PAM • Integrates MySQL apps with existing infrastructures • MySQL Enterprise Scalability • MySQL Thread Pool • Improves sustained performance/scale as connections grow • 20x scale improvement in SysBench OLTP R/W benchmarks • MySQL High Availability • Oracle VM Template for MySQL • Windows Clustering • Oracle Product Certifications • Manage MySQL with Oracle tools that are already in use MySQL Enterprise Edition Commercial Extensions Available Now
  • 54. 54Copyright Oracle Corporation 2012 Connect as 4. Tokens are checked, win_joe user is authenticated using Windows login, password with MySQL specific privs Connect as 1. MyDomain/joe logs into environment with Windows login, password Connected Authenticate CREATE USER win_joe IDENTIFIED WITH authentication_windows AS ‘joe'; App Win OS users, groups, etc Windows Auth Connect as 2. MyDomainjoe is authenticated on Windows OSConnect as 3. MyDomain/joe logs into application, application connects to MySQL with user win_joe. Connector Windows Authentication Example
  • 55. 55Copyright Oracle Corporation 2012 3. User name/password sent to the PAM library, yes/no answer from PAM library returned to client. 1. Joe logs in using application user name/password. Connected CREATE USER joe IDENTIFIED WITH 'authentication_pam' AS ‘mysql'; App PAM library and various backends 2. Connector sends the user name/password to the MySQL server. Connector 4. PAM library verifies credentials (using e.g. LDAP or Kerberos etc) and returns yes/no answer for delivery to client. PAM Authentication PAM Authentication Example
  • 56. 56Copyright Oracle Corporation 2012 Default Thread Handling Internal Clients Default Thread Handling Connections /statements assigned to Threads for life • Connections assigned to 1 thread for the life of the connection, same thread used for all statements • No prioritization of threads, statement executions • Many concurrent connections = many concurrent execution threads to consume server memory, limit scalability Connection Execution Threads External Clients
  • 57. 57Copyright Oracle Corporation 2012 With Thread Pool Enabled Internal Clients Connection Execution Threads External Clients Thread Pool Thread Group 1 Threads 1 - 4096 Thread Group 2 Threads 4097 - 8193 Thread Group N Threads 8194 - N • Thread Pool contains configurable number of thread groups (default = 16), each manages up to 4096 re-usable threads • Each connection assigned to thread group via round robin • Threads are prioritized, statements queued to limit concurrent executions, load on server, improve scalability as connections grow Thread Group 1 Thread Group 2 Thread Group N
  • 58. 58Copyright Oracle Corporation 2012 MySQL Enterprise Edition With Thread Pool MySQL Community Server Without Thread Pool MySQL Enterprise Edition 20x Better Scalability with Thread Pool 8 32 128 512 1536 2560 3584 0 1000 2000 3000 4000 5000 6000 7000 8000 MySQL 5.5 Sysbench OLTP Read/Write Simultaneous Database Connections Transactions Per Second MySQL 5.5.16 Oracle Linux 6.1, Unbreakable Kernel 2.6.32 2 sockets, 24 cores, 2 X 12-core Intel(R) Xeon(R) X5670 2.93GHz CPUs 72GB DDR3 RAM 2 X LSI SCSI Disk (MR9261-8i) (597GB)
  • 59. 59Copyright Oracle Corporation 2012 MySQL Enterprise Edition With Thread Pool MySQL Community Server Without Thread Pool MySQL Enterprise Edition 3x Better Scalability with Thread Pool MySQL 5.5.16 Oracle Linux 6.1, Unbreakable Kernel 2.6.32 2 sockets, 24 cores, 2 X 12-core Intel(R) Xeon(R) X5670 2.93GHz CPUs 72GB DDR3 RAM 2 X LSI SCSI Disk (MR9261-8i) (597GB) 8 32 128 512 1536 2560 3584 0 2000 4000 6000 8000 10000 12000 MySQL 5.5 Sysbench OLTP Read Only Simultaneous Database Connections Transactions Per Second
  • 60. 60Copyright Oracle Corporation 2012 • MySQL Enterprise Security • MySQL Database Auditing extension • More Authentication plug-ins • Oracle Product Certifications • Oracle Audit Vault • MySQL Enterprise High Availability • Oracle Clusterware MySQL Enterprise Development Priorities
  • 61. 61Copyright Oracle Corporation 2012 • MySQL Enterprise Backup • Performance – parallel backups, skip empty pages, more • Efficiency, Ease of use • Better PIT recovery • Remote backup administration (on-premise, Cloud) • Integration with Enterprise tools • MySQL Workbench SE • Schema/data migration from SQL Server • ER Model Repository • Code generation – PHP, Python MySQL Enterprise Development Priorities
  • 62. 62Copyright Oracle Corporation 2012 • MySQL Enterprise Monitor • Evolve into management • Instance, Backup, ReplicationHA • Integration with Oracle Enterprise Manager MySQL Enterprise Development Priorities
  • 63. 63Copyright Oracle Corporation 2012 Oracle Fusion MiddleWare • WebLogic Server • Database Adapter for Oracle SOA Suite • Oracle Business Process Management • Oracle Virtual Directory • Oracle Data Integrator • Oracle Enterprise Performance Management • Oracle Identity Analytics • Open SSO STS, Open SSO Fedlet • Oracle Linux • Oracle VM • Oracle VM Template for MySQL Enterprise Edition • Oracle GoldenGate • Oracle Secure Backup • Oracle Database Firewall • MyOracle Online Support MySQL Enterprise Oracle Certifications Completed
  • 64. 64Copyright Oracle Corporation 2012 mysql.com  TCO calculator: http://www.mysql.com/tcosavings/  White Papers: http://www.mysql.com/why-mysql/white-papers/  Customer use cases and success stories: http://www.mysql.com/why-mysql/case-studies/ dev.mysql.com  Downloads: http://dev.mysql.com/downloads/  Documentation: http://dev.mysql.com/doc/  Forums: http://forums.mysql.com/  PlanetMySQL: http://planet.mysql.com  List of resources (books) : http://dev.mysql.com/resources/ MySQL Resources
  • 65. 65Copyright Oracle Corporation 2012 eDelivery.com  Download and evaluate all MySQL products Wiki: https://wikis.oracle.com/display/mysql/Home 50 things to know before migrating Oracle to MySQL It is a little old but worth the read www.xaprb.com/blog/2009/03/13/50-things-to-know-before-migrating-oracle-to-mysql/ MySQL Resources
  • 66. 66Copyright Oracle Corporation 2012 https://blogs.oracle.com/MySQL/entry/more_early_access_features_in http://mysqlblog.fivefarmers.com/2012/05/29/overlooked-mysql-5-6-new-features- timestamp-and-datetime-improvements/ http://mysqlblog.fivefarmers.com/2012/05/23/overlooked-mysql-5-6-new-features-wl5217/ MySQL Resources
  • 67. 67Copyright Oracle Corporation 2012 https://blogs.oracle.com/MySQL/entry/more_early_access_features_in
  • 68. <Insert Picture Here> CONFIDENTIAL – ORACLE HIGHLY RESTRICTED 68 Thank You