My sql 56_roadmap_april2012

841 views

Published on

MySQL 5.6 Roadmap April2012
Atlanta MySQL user Group

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
841
On SlideShare
0
From Embeds
0
Number of Embeds
95
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

My sql 56_roadmap_april2012

  1. 1. <Insert Picture Here>CONFIDENTIAL – ORACLE HIGHLY RESTRICTED
  2. 2. <Insert Picture Here>CONFIDENTIAL – ORACLE HIGHLY RESTRICTED2The MySQL Roadmap: Discover What’s NewJune, 2012Keith Larson, MySQL Community Manager
  3. 3. 3Copyright Oracle Corporation 2012Safe Harbor StatementThe following is intended to outline our generalproduct direction. It is intended for informationpurposes only, and may not be incorporated intoany contract. It is not a commitment to deliver anymaterial, code, or functionality, and should not berelied upon in making purchasing decision. Thedevelopment, release, and timing of any featuresor functionality described for Oracle’s productsremains at the sole discretion of Oracle.
  4. 4. 4Copyright Oracle Corporation 2012localhost ~]$ whoamiKeith Larsonkeith.larson@oracle.comMySQL Community Managersqlhjalp.blogspot.comStarted with MySQL 3.23 during the dot.com days.Primary real world work was with a MySQL InnoDB delayed replicated environmentthat easily held over 4 billion rows of user data. Did a lot of data mining of that dataover the years.Numerous other sites developed on LAMP stack over the last 13 years.Who are you?DBAs?Developers?
  5. 5. 5Copyright Oracle Corporation 2012Oracle’s Investment in MySQLRapid InnovationMake MySQL a Better MySQL• #1 Open Source Database for Web Applications• “M” in most complete LAMP stack• EmbeddedDevelop, Promote and Support MySQL• Improved engineering, consulting and support• Leverage 24x7, World-Class Oracle SupportMySQL Community Edition• Source and binary releases• GPL license
  6. 6. 6Copyright Oracle Corporation 2012More Product Releases Than Ever BeforeCY2010 CY2011• MySQL Workbench 5.2• MySQL Database 5.5• MySQL Enterprise Backup3.5• MySQL Enterprise Monitor2.3• MySQL Cluster Manager 1.1All GA!A Better MySQLQ1 CY2012• MySQL Enterprise Monitor2.2• MySQL Cluster 7.1• MySQL Cluster Manager 1.0• MySQL Enterprise Backup3.7• Oracle VM Template forMySQL Enterprise Edition• MySQL Enterprise OracleCertifications• MySQL Windows Installer• New MySQL EnterpriseCommercial Extensions*Development Milestone Release• MySQL Database 5.6 DMR*• MySQL Cluster 7.2 DMRand MySQL Labs!(“early and often”)Driving MySQLInnovationAll GA!• MySQL Cluster 7.2• MySQL ClusterManager 1.4• MySQL Utilities 1.0.6• MySQL Database5.6.5 DMR*and MySQL Labs!(“early and often”)All GA!
  7. 7. 7Copyright Oracle Corporation 2012InnoDB is the default storage engine• ACID Transactions, FKs, Crash RecoveryImproved Performance• Enhancements in MySQL DB• Enhancements in InnoDB• + 360% over 5.1 on Linux• + 1500% over 5.1 on WindowsImproved Availability• Semi-synchronous Replication• Replication HeartbeatImproved Usability• SIGNAL/RESIGNAL• More Partitioning Options• New PERFORMANCE_SCHEMAMySQL 5.5 – Best Release Ever
  8. 8. 8Copyright Oracle Corporation 2012MySQL 5.5 Scales On Multi-CoreSysBench Read WriteMySQL 5.1MySQL 5.5.3MySQL 5.5.4AMD Opteron 7160 (Magny-Cours) @2100 MHz64 GB memory2 x Intel X25E SSD drivesOS is Oracle Enterprise Linux with the Enterprise Kernel4 sockets with a total of 48 cores.Transactions/Second
  9. 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 -- 2012MySQL Database 5.6: A Better MySQL.
  10. 10. 10Copyright Oracle Corporation 2012Model: 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 DMRModel: MySQL Labs “Early Access” features• Previews, not on trunk• No promise of making GA releaseMySQL “Early Access” Release ModelsDatabase and Cluster
  11. 11. 11Copyright Oracle Corporation 2012MySQL 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. 12. 12Copyright Oracle Corporation 2012MySQL 5.6.5 – OptimizerPostpone materialization of views/subqueriesLate materialization• Allows fast EXPLAINs for views/subqueries• Avoid materialization when possible, faster bail outA 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 dtjoin table AS t WHERE dt.fld = t.dlf
  13. 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 planwas chosen.
  14. 14. 14Copyright Oracle Corporation 2012• Long standing feature request from customers and usersmysql> 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/DELETECREATE TABLE t1(c1 INT, c2 INT, KEY(c2), KEY(c2, c1));EXPLAIN UPDATE t1 SET c1 = 10 WHERE c2 = 1;
  15. 15. MySQL 5.6: EXPLAIN for Data-ModifyingStatementsEXPLAIN UPDATE t1 SET b = b WHERE a > 2 Gid: 1select_type: SIMPLEtable: t1type: rangepossible_keys: a,a_2key: akey_len: 16ref: nullrows: 2Extra: Using where; Using temporary
  16. 16. MySQL 5.6: EXPLAIN for Data-ModifyingStatements, cont.EXPLAIN INSERT INTO t1SELECT * FROM t2 WHERE a IN (1, 3, 5) Gid: 1select_type: SIMPLEtable: t2type: rangepossible_keys: t2i1key: t2i1key_len: 4ref: nullrows: 3Extra: Using index condition
  17. 17. MySQL 5.6: Structured EXPLAINEXPLAIN FORMAT=JSONSELECT * 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. 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. 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 customersQuery Plan DebuggingMySQL 5.6.5 – Optimizer Traces
  20. 20. 20Copyright Oracle Corporation 2012testperCREATE 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 personWHERE 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 EnhancementsIndex Condition Pushdown (ICP)• With ICP Enabled⇒ Execution time drops to 90 ms for both
  21. 21. 21Copyright Oracle Corporation 20120 8 16 24 32 40 48 56 64550500500012259.632821No BKABKAJoin Buffer Size (MB)QueryTime(secs)MySQL 5.6.5 – Optimizer EnhancementsBatched Key Access (BKA) and Multi Range ReadImproves performance of disk-bound join queriesExecution timewithout BKA + MRRExecution timewith BKA + MRRDBT3 Q3: “Customer Distribution Query”
  22. 22. 22Copyright Oracle Corporation 2012• Statements/Stages• What are my most resource intensive queries? Where do they spendtime?• 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 mostresources?• Network I/O• What is the network load like? How long do sessions idle?• Summaries• Aggregated statistics grouped by thread, user, host, account or objectMySQL 5.6.5 – Performance Schema InstrumentationImproved Database Profiling/Application Tuning
  23. 23. 23Copyright Oracle Corporation 2012MySQL 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. 24. 24Copyright Oracle Corporation 2012MySQL 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. 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 overheadMasterGTID=123456GTID=123456GTID=123456 GTID=123456MySQL 5.6.5 - Global Transaction Ids
  26. 26. 26Copyright Oracle Corporation 2012MySQL 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 MySQLWorkbench• 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. 27. 27Copyright Oracle Corporation 2012Utility 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 monitoringCheck Repl ShowFail-Over& Admin
  28. 28. 28Copyright Oracle Corporation 2012•Automatic failover & slave promotion• Continuous health monitoring & recovery•Default is to promote most up-to-dateslave, based on GTID• Slave promotion policies are fullyconfigurable•Never lose replication events• Nominated slave automatically retrievesupdates from later slavesReplication Failover UtilityFailoverUtilityMonitoringFail-OverMasterSlavesAuto-Failover &Slave Promotion
  29. 29. 29Copyright Oracle Corporation 2012Replication Administration Utility•Perform switchover to eliminatedowntime during plannedmaintenance•Start and stop slaves•Slave discovery & monitoring• Slave status, thread status• Replication processing, including any lag• Configure slave promotion policiesMasterSlavesAdministrationUtilityStatus &SwitchoverAdmin
  30. 30. Copyright Oracle Corporation 2012MySQL <5.6Transaction Data: in tablesReplication Info: in filesMySQL 5.6Transaction Data: in tablesReplication Info: in tablesSlave Tables for Replication InformationMySQL 5.6.5 – Replication Enhancements
  31. 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 featurehttp://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.htmlSlave Tables for Replication InformationMySQL 5.6.5 – Replication Enhancements
  32. 32. Copyright Oracle Corporation 2012mysql_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 InformationMySQL 5.6.5 – Replication Enhancements
  33. 33. Copyright Oracle Corporation 2012Detects corrupt replication events before they areappliedGuards against bugs and disk or network corruptionsCRC-32 checksum, more precisely ISO-3309 (suppliedwith zlib)New mysqld options:binlog-checksum= NONE or CRC32 generatedby the session thread and written to the binary logSET GLOBAL binlog_checksum = 1;master-verify-checksum= 0 or 1 Mastervalidates checksum read from the binary logSET GLOBAL master_verify_checksum = 1;slave-sql-verify-checksum= 0 or 1 SQLthread should verify the checksum when reading itfrom the relay log on the slavemysql> SET GLOBAL slave_sql_verify_checksum=1;http://mysqlmusings.blogspot.com/2011/04/replication-event-checksum.htmlReplication Event ChecksumsMySQL 5.6.5 – Replication Enhancements
  34. 34. Copyright Oracle Corporation 2012Problem: 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: flexibilitymysql> 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 ChecksumsMySQL 5.6.5 – Replication Enhancements
  35. 35. Copyright Oracle Corporation 2012Throughput of slave increased by allowing multiple slave threads:0 - functionality disabled0 to 1024Exec_Master_Log_Posn in SHOW SLAVE STATUS represents a “low-water” mark, before which no uncommitted transactions remain.Configure using:slave-parallel-workers=4On a per-database basiscan process successive transactions on a given database withoutwaiting for updates on other databases to completehttp://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workersMulti-Threaded SlaveMySQL 5.6.5 – Replication Enhancements
  36. 36. Copyright Oracle Corporation 2012mysql_luke> show slave statusG*************************** 1. row ***************************....Exec_Master_Log_Pos: 114mysql> 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_workersMulti-Threaded SlaveMySQL 5.6.5 – Replication Enhancements
  37. 37. Copyright Oracle Corporation 2012In 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 beupdated, and an “after” image containing the changes.can often save disk, memory, and network usage by logging only those columns whichare 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-basedformat, 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.htmlhttp://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_row_imageOptimized Row Based ReplicationMySQL 5.6.5 – Replication Enhancements
  38. 38. Copyright Oracle Corporation 2012Problem: Make replication slave to lag a specified amount of time behindthe 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 toreload a backup.Solution: The slave waits until a given number of seconds elapses beforeapplying the changes:Delays configured per slave: flexible deployment;Are implemented in the SQL thread layer.Rolling Database Backups with Relayed ReplicationTime Delayed ReplicationMySQL 5.6.5 – Replication Enhancements
  39. 39. Copyright Oracle Corporation 2012User 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 masterexecuted 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_poshttp://dev.mysql.com/doc/refman/5.6/en/replication-delayed.htmlhttp://dev.mysql.com/doc/refman/5.6/en/start-slave.htmlTime Delayed ReplicationMySQL 5.6.5 – Replication Enhancements
  40. 40. Copyright Oracle Corporation 201286400 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 ReplicationMySQL 5.6.5 – Replication Enhancements
  41. 41. Copyright Oracle Corporation 2012mysql_luke> STOP SLAVE;mysql_luke>SHOW RELAYLOG EVENTS FROM 2337G*************************** 4. row ***************************Log_name: luke-relay-bin.000005Pos: 2674Event_type: QueryServer_id: 1End_log_pos: 2623Info: drop database Tatooinemysql_luke> START SLAVE UNTIL-> MASTER_LOG_FILE=luke-relay-bin.000005,-> MASTER_LOG_POS=2674;Time Delayed ReplicationMySQL 5.6.5 – Replication Enhancements
  42. 42. Copyright Oracle Corporation 2012Problem: 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 aninformational event;Feature often requested for debugging.http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.htmlhttp://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#option_mysqld_binlog-rows-query-log-eventsInformational Log EventsMySQL 5.6.5 – Replication Enhancements
  43. 43. Copyright Oracle Corporation 2012Enhances auditing and debugging when using Row-Based Replication by writingthe original query to the binary log, which is then replicated with its associatedrow-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 EventsMySQL 5.6.5 – Replication Enhancements
  44. 44. Copyright Oracle Corporation 2012mysql> 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: 0mysql> 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.htmlInformational Log EventsMySQL 5.6.5 – Replication Enhancements
  45. 45. Copyright Oracle Corporation 2012Problem: There is no way to create real-time backups of the masters binary logs.Solution: Make use of mysqlbinlog facilities that retrieve and dump remoteMySQL log contents as SQL statements to make it output in raw format:DBAs dont need to do remote logins to retrieve masters binlogs or setupan intermediate slave.Remote Backup of Binary logsMySQL 5.6.5 – Replication Enhancements
  46. 46. Copyright Oracle Corporation 2012Make 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 dont need to do remote logins to retrieve masters binlogs or setup anintermediate 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.000001http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.htmlRemote Backup of Binary logsMySQL 5.6.5 – Replication Enhancements
  47. 47. 47Copyright Oracle Corporation 2012MySQL 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 operationsGet it now!dev.mysql.com/downloads/mysql/
  48. 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 DevelopmentEarly Access Featureslabs.mysql.com/Try it now!labs.mysql.com
  49. 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 thenative InnoDB API• Shared process space for ultra-lowlatencyInnoDB Storage EngineMySQL Server Memcached pluginApplicationSQL(MySQL Client)NoSQL(MemcachedProtocol)mysqldMySQL Database – Key-value access for InnoDBNotOnlySQL: Memcached APITry it now!labs.mysql.com
  50. 50. 50Copyright Oracle Corporation 2012MySQL Database Development Priorities• Performance/Scale – more threads/cores, SSD• Cloud/SaaS/DaaS• Multi-tenancy - Role-based security/ACLs, session/host levelthrottling, more authentication options• Elastic Scale – Auto-sharding/partitioning of data, provisioning ofreplicas, 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. 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• CloudMySQL Cluster Development Priorities
  52. 52. 52Copyright Oracle Corporation 2012MySQL Enterprise EditionMost secure, scalable MySQL Database, Online Backup,Development/Monitoring Tools, backed by Oracle PremierLifetime SupportOracle PremierSupportOracle ProductCertifications/IntegrationsMySQL EnterpriseHigh AvailabilityMySQL EnterpriseSecurityMySQL EnterpriseScalabilityMySQL EnterpriseBackupMySQL EnterpriseMonitor/Query AnalyzerMySQL Workbench
  53. 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 useMySQL Enterprise EditionCommercial Extensions Available Now
  54. 54. 54Copyright Oracle Corporation 2012Connect as4. Tokens are checked, win_joeuser is authenticated usingWindows login, password withMySQL specific privsConnect as1. MyDomain/joe logs intoenvironment with Windowslogin, passwordConnectedAuthenticateCREATE USER win_joeIDENTIFIED WITH authentication_windowsAS ‘joe;AppWin OS users,groups, etcWindowsAuthConnect as2. MyDomainjoe isauthenticated onWindows OSConnect as3. MyDomain/joe logs intoapplication, applicationconnects to MySQL with userwin_joe.ConnectorWindows AuthenticationExample
  55. 55. 55Copyright Oracle Corporation 20123. User name/password sentto the PAM library, yes/noanswer from PAM libraryreturned to client.1. Joe logs in usingapplication username/password.ConnectedCREATE USER joeIDENTIFIED WITH authentication_pamAS ‘mysql;AppPAM libraryand variousbackends2. Connector sends the username/password to theMySQL server.Connector4. PAM library verifies credentials(using e.g. LDAP or Kerberos etc)and returns yes/no answer fordelivery to client.PAMAuthenticationPAM AuthenticationExample
  56. 56. 56Copyright Oracle Corporation 2012Default Thread HandlingInternal ClientsDefaultThread HandlingConnections/statementsassignedto Threadsfor life• Connections assigned to 1 thread for the life of the connection, samethread used for all statements• No prioritization of threads, statement executions• Many concurrent connections = many concurrent execution threads toconsume server memory, limit scalabilityConnection Execution ThreadsExternal Clients
  57. 57. 57Copyright Oracle Corporation 2012With Thread Pool EnabledInternal ClientsConnection Execution ThreadsExternal ClientsThread PoolThread Group 1Threads 1 - 4096Thread Group 2Threads 4097 - 8193Thread Group NThreads 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 growThread Group 1Thread Group 2Thread Group N
  58. 58. 58Copyright Oracle Corporation 2012MySQL Enterprise EditionWith Thread PoolMySQL Community ServerWithout Thread PoolMySQL Enterprise Edition20x Better Scalability with Thread Pool8 32 128 512 1536 2560 3584010002000300040005000600070008000MySQL 5.5 Sysbench OLTP Read/WriteSimultaneous Database ConnectionsTransactions Per SecondMySQL 5.5.16Oracle Linux 6.1, Unbreakable Kernel 2.6.322 sockets, 24 cores, 2 X 12-coreIntel(R) Xeon(R) X5670 2.93GHz CPUs72GB DDR3 RAM2 X LSI SCSI Disk (MR9261-8i) (597GB)
  59. 59. 59Copyright Oracle Corporation 2012MySQL Enterprise EditionWith Thread PoolMySQL Community ServerWithout Thread PoolMySQL Enterprise Edition3x Better Scalability with Thread PoolMySQL 5.5.16Oracle Linux 6.1, Unbreakable Kernel 2.6.322 sockets, 24 cores, 2 X 12-coreIntel(R) Xeon(R) X5670 2.93GHz CPUs72GB DDR3 RAM2 X LSI SCSI Disk (MR9261-8i) (597GB)8 32 128 512 1536 2560 3584020004000600080001000012000MySQL 5.5 Sysbench OLTP Read OnlySimultaneous Database ConnectionsTransactions Per Second
  60. 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 ClusterwareMySQL Enterprise Development Priorities
  61. 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, PythonMySQL Enterprise Development Priorities
  62. 62. 62Copyright Oracle Corporation 2012• MySQL Enterprise Monitor• Evolve into management• Instance, Backup, ReplicationHA• Integration with Oracle Enterprise ManagerMySQL Enterprise Development Priorities
  63. 63. 63Copyright Oracle Corporation 2012Oracle Fusion MiddleWare• WebLogic Server• Database Adapter for OracleSOA Suite• Oracle Business ProcessManagement• Oracle Virtual Directory• Oracle Data Integrator• Oracle EnterprisePerformance Management• Oracle Identity Analytics• Open SSO STS, Open SSOFedlet• Oracle Linux• Oracle VM• Oracle VM Template forMySQL Enterprise Edition• Oracle GoldenGate• Oracle Secure Backup• Oracle Database Firewall• MyOracle Online SupportMySQL Enterprise Oracle CertificationsCompleted
  64. 64. 64Copyright Oracle Corporation 2012mysql.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. 65. 65Copyright Oracle Corporation 2012eDelivery.comDownload and evaluate all MySQL productsWiki:https://wikis.oracle.com/display/mysql/Home50 things to know before migrating Oracle to MySQLIt is a little old but worth the readwww.xaprb.com/blog/2009/03/13/50-things-to-know-before-migrating-oracle-to-mysql/MySQL Resources
  66. 66. 66Copyright Oracle Corporation 2012https://blogs.oracle.com/MySQL/entry/more_early_access_features_inhttp://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. 67. 67Copyright Oracle Corporation 2012https://blogs.oracle.com/MySQL/entry/more_early_access_features_in
  68. 68. <Insert Picture Here>CONFIDENTIAL – ORACLE HIGHLY RESTRICTED68Thank You

×