MySQL Breakfast in London - 24 June 2010
Upcoming SlideShare
Loading in...5
×
 

MySQL Breakfast in London - 24 June 2010

on

  • 7,008 views

These are the slides presented at the MySQL Breakfast in London on June 24 2010

These are the slides presented at the MySQL Breakfast in London on June 24 2010

Statistics

Views

Total Views
7,008
Slideshare-icon Views on SlideShare
7,008
Embed Views
0

Actions

Likes
0
Downloads
125
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    MySQL Breakfast in London - 24 June 2010 MySQL Breakfast in London - 24 June 2010 Presentation Transcript

    • <Insert Picture Here> MySQL Breakfast London, 24 June 2010 Friday, 25 June 2010
    • Agenda <Insert Picture Here> 9 am Welcome Coffee and Tea 9.30 am Oracle’s MySQL Strategy and Positioning 10 am What’s new with MySQL Server 5.5 MySQL Cluster 7.1 10.45 am Coffee and Tea Break 11 am MySQL Enterprise 2.2 MySQL Workbench 5.2 11.45 am Q&A Friday, 25 June 2010
    • <Insert Picture Here> Strategy & Positioning Rich Mason Vice President Friday, 25 June 2010
    • Oracle’s Strategy: Complete. Open. Integrated. • Built together • Tested together • Managed together • Serviced together • Based on open standards • Lower cost • Lower risk • More reliable Friday, 25 June 2010
    • Oracle’s Investment in Open Source • Supported popular open source projects for many years • Part of Oracle’s Complete, Open, Integrated strategy • Speed up time-to-innovation • Expand the developer community Friday, 25 June 2010
    • Complete. Open. Integrated. Two more important attributes • Oracle never settles for being second best at any level of the stack • “Complete” means we meet most customer requirements at every level That’s why MySQL matters to Oracle and Oracle customers Friday, 25 June 2010
    • Industry’s most complete LAMP Stack • Oracle Enterprise Linux Applications • Oracle VM (Xen-based) Eclipse Netbeans • Apache, Glassfish Apache Glassfish • MySQL MySQL • PHP, Perl, Python, Ruby, Java, C, C++ Oracle Enterprise Linux & Oracle VM Friday, 25 June 2010
    • Investment in MySQL • Make MySQL a Better MySQL • #1 Open Source Database for Web Applications • Develop, Promote and Support MySQL • Improve engineering, consulting and support • Leverage 24x7, World-Class Oracle Support • MySQL Community Edition • Source and binary releases • GPL license Friday, 25 June 2010
    • Investment in MySQL • MySQL Focus Areas • Web, Embedded & Telecom • LAMP • Windows • Oracle + MySQL Customers • Oracle Enterprise Manager • Oracle Secure Backup • Oracle Audit Vault Friday, 25 June 2010
    • Products Making MySQL Better Today MySQL 5.5 MySQL Cluster 7.1 MySQL Workbench 5.2 MySQL Enterprise Monitor 2.2 Friday, 25 June 2010
    • Oracle OpenWorld and JavaOne + Develop Conferences • September 19-23, 2010 • San Francisco, CA • Over 2,100 sessions • Includes a MySQL track • 3 Exhibition Halls • For more information: • Oracle OpenWorld: oracle.com/openworld • JavaOne + Develop: oracle.com/javaonedevelop Friday, 25 June 2010
    • Key Takeaways • MySQL is important to Oracle and our customers • Part of our Complete, Open, Integrated strategy • Oracle is making MySQL better today • Major Feature, Performance, Scalability enhancements • 24x7, Global support in 145 countries Download Now http://dev.mysql.com/downloads Friday, 25 June 2010
    • Friday, 25 June 2010
    • <Insert Picture Here> What’s New with MySQL Server 5.5 Ivan Zoratti Sales Consulting Manager EMEA 1006.01 Friday, 25 June 2010
    • 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Friday, 25 June 2010
    • Agenda • Intro to MySQL 5.5 Server <Insert Picture Here> • Replication with MySQL 5.5 • InnoDB 1.1 for MySQL 5.5 • MySQL 5.5 Usability Friday, 25 June 2010
    • <Insert Picture Here> MySQL 5.5 Server Friday, 25 June 2010
    • Pluggable Storage Engine Architecture Friday, 25 June 2010
    • MySQL 5 Reliability Performance Ease of Use • SQL Mode • Stored Procedures • Instance Manager • Triggers & Views • Cluster query push down • Information Schema . 50 • Precision Math • Query optimisations • Cursors • Increased object support • Archive Engine • Enterprise Backup & Recovery • Enteprise Monitoring Tool • InnoDB storage improvements Manager • Row-Based Replication • Table/Index Partitioning • XML/XPath Support . 51 • Disk-based Cluster • Full-Text Index Improvements • Task Scheduler • Cluster Replication with • Faster ALTER TABLE • Storage Engine Plug-in API Conflict Resolution • Faster ADD/DROP Index • CSV Storage Engine • Enterprise Query Analyser • Parallel Data Import β • Default InnoDB (Barracuda) • Multiple Buffer Pool and • SIGNAL/RESIGNAL 5.5 • Semi-Sync Replication Rollback Segment • NDB_INFO Schema • Enterprise Connectors • Eliminated Lock bottlenecks • MySQL Cluster Manager • Enterprise Support • Extended Change Buffering & • MySQL Workbench 5.2 Diagnostics Purge Scheduling • MySQL Cluster Connectors • MySQL Cluster on Windows • PERFORMANCE_SCHEMA • MySQL Enterprise Backup • Fast InnoDB Recovery • Multithreaded Cluster Friday, 25 June 2010
    • MySQL 5.5 at a glance Improved Performance and Scalability Beta • InnoDB becomes default storage engine • Better metadata locking within transactions • Improved performance and scalability on Windows • InnoDB Improvements Improved Availability • Semi-synchronous Replication • Replication Heartbeat Improved Usability • SIGNAL/RESIGNAL • More Partitioning Options • PERFORMANCE_SCHEMA http://dev.mysql.com/tech-resources/articles/introduction-to-mysql-55.html Friday, 25 June 2010
    • InnoDB 1.1 for MySQL 5.5 at a glance Beta Performance Improvements • Improved recovery performance • Multiple buffer pool instances • Multiple rollback segments • Native asynchronous I/O for Linux • Extended change buffering Scalability Improvements • Improved Log Sys Mutex • Separate Flush List Mutex • Improved purge scheduling Better Instrumentation and Diagnostics • InnoDB stats in PERFORMANCE_SCHEMA http://dev.mysql.com/tech-resources/articles/introduction-to-mysql-55.html Friday, 25 June 2010
    • Replication with MySQL 5.5 Friday, 25 June 2010
    • MySQL Replication • Achieve higher availability with a master/slave setup • In the event of problems with the master, you can switch to the slave as a backup • Available for all platforms • Enabled for all storage engines • Asynchronous or Semi-Synchronous with Heartbeat • Statement Based (SBR), Row Based (RBR) or mixed-format (MIXED) • Replicate data from one MySQL server/storage engine combination to a different MySQL Server/storage engine combination • Perform backups using a slave server and continue to process updates on the master while the backup is being made on the slave • Extremely simple configuration to enable very robust replication • Multiple replication topologies supported Application Master Slave http://www.mysql.com/why-mysql/white-papers/mysql_ha_solutions.php Friday, 25 June 2010
    • MySQL Replication • Data written on the master is also written into the binary log • The I/O thread on the slave collects logs from the master binary log and writes a relay log on the slave • The SQL thread on the slave reads the relay log and apply the writes on the slave • Slave writes are optionally added to the binary log on the slave Friday, 25 June 2010
    • Replication with MySQL 5.5 • Semi-Synchronous Replication • Improves the reliability of failover • COMMITs on the Master node are acknowledged only when at least one of the Slave nodes has logged the event • Data is not lost in case of failover • Replication Heartbeat • Avoids spurious relay log rotation when the Master node is idle • Replication delay is more accurate • Reliability and Administration • Slave fsync tuning • Automatic Relay Log recovery • SHOW RELAYLOG EVENTS • Per server replication filtering Friday, 25 June 2010
    • Semi-synchronous Replication • A Slave indicates whether it is semisync-capable when it connects to the Master. • There must be at least one semisync Slave on. • The COMMIT on the Master waits until at least one semisync Slave acknowledges that it has received the transaction, or until a timeout occurs. • The Slave acknowledges a transaction only after it has been written to its relay log and flushed to disk. • If a timeout occurs, the Master reverts to async replication. When at least one semisync Slave catches up, the Master returns to semisync replication. • Semisync replication must be enabled on both the Master and Slave sides. On Master and Slave: have_dynamic_loading=YES On the Master: INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so'; SET GLOBAL rpl_semi_sync_master_enabled = 1; SET GLOBAL rpl_semi_sync_master_timeout = N; On the Slave: INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so'; SET GLOBAL rpl_semi_sync_master_enabled = 1; STOP SLAVE IO_THREAD; START SLAVE IO_THREAD; Friday, 25 June 2010
    • Semi-sync Option and System Variables System/ Name Dyn Description Status init_slave SYS ✔ Executed by a Slave when the SQL thread starts rpl_semi_sync_master_clients STA # of semi-sync slaves rpl_semi_sync_master_enabled SYS ✔ Enable semi-sync replication on the Master rpl_semi_sync_master_net_avg_wait_time STA Avg a Master waited for a Slave to reply rpl_semi_sync_master_net_wait_time STA Tot a Master waited for a Slave to reply rpl_semi_sync_master_net_waits STA # of times a Master waited for a Slave to reply rpl_semi_sync_master_no_times STA # of times a Master turned off semi-sync replication rpl_semi_sync_master_no_tx STA # of COMMITs that were not acknowledged successfully by a Slave rpl_semi_sync_master_status STA Whether semi-sync replication currently is operational on the Master rpl_semi_sync_master_timefunc_failures STA The number of times the Master failed when calling time functions rpl_semi_sync_master_timeout SYS ✔ # of sec the Master waits before reverting to async rpl_semi_sync_master_trace_level SYS ✔ Debug trace level - 1/16/32/64 rpl_semi_sync_master_tx_avg_wait_time STA Avg time the Master waited for each transaction rpl_semi_sync_master_tx_wait_time STA Tot time the Master waited for each transaction rpl_semi_sync_master_tx_waits STA # of times the Master waited for transactions rpl_semi_sync_master_wait_no_slave SYS ✔ ON/OFF - Always wait for the timeout to expire to revert to aync rpl_semi_sync_master_wait_pos_backtraverse STA # of times the Master waited for events with lower coordinates rpl_semi_sync_master_wait_sessions STA # of sessions waiting for Slave replied rpl_semi_sync_master_yes_tx STA # of successful COMMITs on a Slave rpl_semi_sync_slave_enabled SYS ✔ Enable semi-sync replication on the Slave rpl_semi_sync_slave_status STA Whether semi-sync replication currently is operational on the Slave rpl_semi_sync_slave_trace_level SYS ✔ Debug trace level - 1/16/32/64 Friday, 25 June 2010
    • Replication Heartbeat • Sets an heartbeat between Master and Slave nodes to control replication operations • Prior to MySQL 5.5: • Relay logs were rotated every slave_net_timeout even when no statements were replicated • SHOW SLAVE STATUS showed an incorrect seconds_behind_master after a FLUSH LOGS On Master and Slave: have_dynamic_loading=YES On the Master: CHANGE MASTER TO master_heartbeat_period = <milliseconds>; On the Slave: SHOW STATUS like 'slave_heartbeat period' SHOW STATUS like 'slave_received_heartbeats' Friday, 25 June 2010
    • Replication reliability • Safe logging of mixed transactions • Each thread has 2 caches: a statement cache and a transaction cache Stmt Cache • InnoDB and MyISAM changes are correctly serialised in RBR and TXN MIXED Cache • binlog_direct_non_transactional_ updates are written directly to the Binary Log instead of the transaction BinLog cache in SBR MyISAM InnoDB Friday, 25 June 2010
    • Slave reliability • sync_master_info • N (N > 0): A Slave node syncs its master.info file to disk (using fdatasync()) after N transactions • sync_relay_log • 0: The operating system is responsible to sync the Relay Log • 1: The Slave node syncs its Relay Log to disk (using fdatasync ()) after every transaction • sync_relay_log_info • N (N > 0): A Slave node syncs its relay-log.info file to disk (using fdatasync()) after every N transactions • relay_log_recovery • 1: Enables automatic Relay Log recovery immediately following server startup. The Slave node discards all unprocessed relay logs and retrieves them from the Master node Friday, 25 June 2010
    • Replication Administration • SHOW RELAY LOG EVENTS IN ‘<relaylogfile>’ • Shows events in the Relay Log • CHANGE MASTER TO IGNORE_SERVER_IDS = (...); • Does not replicate events with the specified Server ID • SLAVE_TYPE_CONVERSION = (ALL_LOSSY, ALL_NON_LOSSY) • Enable conversions of datatypes between Master and Slave nodes in RBR • Allowed ALL_LOSSY: INT > TINYINT, not TINYINT > INT • If no conversion is set, columns on Master and Slave nodes must have the same datatype • FLUSH <LogType> LOGS • SLOW, ERROR, BINARY, ENGINE, GENERAL, RELAY Friday, 25 June 2010
    • MySQL Replication and Linux Heartbeat Applications Virtual IP Master Semisync Slave Scale-out Slave Scale-out Slave Scale-out Slave Semisync Replication Replication Friday, 25 June 2010
    • <Insert Picture Here> InnoDB 1.1 for MySQL 5.5 Friday, 25 June 2010
    • InnoDB Plugin 1.0 • Available GA with MySQL 5.1 • Data compression with the Barracuda file format • Backward compatibility with previous InnoDB features • Improvements • Performance, Scalability, Throughput • Thread/Concurrency management • OS memory allocators • Adaptive Hash Indexing and Insert Buffer • Faster locking • GROUP COMMIT • Manageability and Efficiency • Faster ADD/DROP INDEX • New storage options for large objects and variable lengths datatypes • Uptime and Availability • Dynamic control of configuration variables • InnoDB strict mode • Control of optimizer statistics estimation http://www.innodb.com/doc/innodb_plugin-1.0/ Friday, 25 June 2010
    • InnoDB Crash Recovery • Improved algorithm for memory management • Faster redo log scan and redo log apply • Available in InnoDB Plugin 1.0.7 and 1.1 • Phases: 1.Redo Log scan 2.Redo Log application • Change from linear search to binary search of n operations from n*n to n*log n 3.Rollback of uncommitted transactions • Standard sysbench recovery improved from 7 hours to 14 minutes http://dev.mysql.com/doc/innodb-plugin/1.1/en/innodb-performance-recovery.html Friday, 25 June 2010
    • Multiple Buffer Pool • Prior to InnoDB 1.1: All threads had to acquire exclusive access to a single buffer pool • ca 700k/sec, held 50% of the time • Minimise contention by assigning DB pages randomly to one of the buffer pools • For each buffer pool there are Free list, Flush list, LRUs Page Hash Table and other data structures and a buffer pool mutex • The Flush List is also split from the buffer pool mutex • innodb_buffer_pool_instances=N • 1 <= N <= 64 • Only when innodb_buffer_pool_size >= 1GB (total pool) http://dev.mysql.com/doc/innodb-plugin/1.1/en/innodb-multiple-buffer-pools.html Friday, 25 June 2010
    • Multiple Buffer Pool - Results • sysbench RW on 16 cores shows 10% improvement • Large improvement on more cores Friday, 25 June 2010
    • Multiple Rollback Segments • Prior to InnoDB 1.1: A Rollback Segment can handle up to 1023 concurrent “write” transactions • ca 20k/sec, held ca 25% of the time • InnoDB 1.1: the Rollback segment is divided into 128 segments. Each segment supports 1024 concurrent W transactions, i.e. 128k concurrent W transactions • Transactions are associated to a segment using a hashing function • Significant improvement with 32+ cores • Execute a slow shutdown (SET GLOBAL innodb_fast_shutdown=0) and a restart to enable the Multiple Rollback Segments http://dev.mysql.com/doc/innodb-plugin/1.1/en/innodb-multiple-rollback-segments.html Friday, 25 June 2010
    • Native Asynchronous I/O • Prior to InnoDB 1.1: asynchronous I/O was supported on Windows systems only • On Linux systems the query thread blocked until the request finished • True synchronous I/O support on Linux • innodb_use_native_aio=[0|1] • Set to 1 by default, it can be set to 0 if the Operating System prevents InnoDB from starting • Apply to Linux systems only http://dev.mysql.com/doc/innodb-plugin/1.1/en/innodb-performance-aio-linux.html Friday, 25 June 2010
    • Extended Change Buffering • Controls the flush to disk of secondary indexes when data is available in the buffer pool • Buffers deletes and purges and perform those in background • Delete-only benchmark may increase from 50 del/sec to 8000 del/sec • innodb_change_buffering = [all|none|inserts|deletes|changes|purges] http://dev.mysql.com/doc/innodb-plugin/1.1/en/innodb-performance-change_buffering.html Friday, 25 June 2010
    • log_sys and others mutex • Prior to InnoDB 1.1: the log_sys mutex was responsible for the protection of different memory areas • ca 350k/sec, held ca 75% of the time • InnoDB 1.1: the mutex is split in log_sys and log_flush_order • ca 5% performance increase • LOCK_alarm has been removed - ca 2% performance increase • LOCK_open has been modified, removing hash calculation and splitting the old mutex in more mutexes (new MDL - MetaData Locking) • LOCK_thread_count has been removed in several places http://dev.mysql.com/doc/innodb-plugin/1.1/en/innodb-improved-log-sys-mutex.html Friday, 25 June 2010
    • Other Improvements • Adaptive Hash Indexing • Automatically creates in-memory hash tables from B-tree index keys • innodb_adaptive_hash_index=[ON|OFF] • Thread Concurrency • innodb_thread_concurrency = 0 • innodb_thread_sleep_delay = 10000 (microsec) • innodb_concurrency_tickets = 500 • Multiple Background I/O Threads • The # of read and write I/O threads can be configured • Each thread handles up to 256 pending I/O requests • innodb_read_io_threads = 4 • innodb_write_io_threads = 4 • Group Commit reintroduced • Master Thread I/O Rate • Controls the number of background I/O operations • innodb_io_capacity = 200 • Spin Lock Polling • innodb_spin_wait_delay=6 (microsec) • Controls the polling of mutexes and rw-locks • May be set to 0 for fast CPU servers Friday, 25 June 2010
    • InnoDB Stats • InnoDB statistics are part of the PERFORMANCE_SCHEMA • Special tables: • MUTEX_INSTANCES • RWLOCK_INSTANCES • FILE_INSTANCES • FILE_SUMMARY_BY_EVENT_NAME • FILE_SUMMARY_BY_INSTANCE • EVENTS_WAITS_CURRENT • EVENTS_WAIT_HISTORY_LONG Friday, 25 June 2010
    • MySQL 5.5 SysBench Benchmarks MySQL 5.5.4 (New InnoDB) MySQL 5.1.40 (InnoDB Plug-in) MySQL 5.1.40 (InnoDB built-in) 200% performance gain Intel Xeon X7460 x86_64 4 CPU x 6 Cores/CPU for MySQL 5.5 over 5.1.40; at scale 2.66 GHz, 32GB RAM Fedora 10 Friday, 25 June 2010
    • MySQL 5.5 SysBench Benchmarks MySQL 5.5.4 (New InnoDB) MySQL 5.1.40 (InnoDB Plug-in) MySQL 5.1.40 (InnoDB built-in) 364% performance gain Intel Xeon X7460 x86_64 4 CPU x 6 Cores/CPU for MySQL 5.5 over 5.1.40; at scale 2.66 GHz, 32GB RAM Fedora 10 Friday, 25 June 2010
    • What Facebook is saying I previously tested InnoDB on an 8-core server to determine how many IOPs it can do for a simple IO-bound workload. The limits were ~12k disk reads/second for MySQL 5.0 and ~18k reads/second for MySQL 5.1. I just repeated the tests using a 16-core server and the results are much better. I can get 20,000 to 30,000 disk reads/second using InnoDB 5.1. InnoDB 5.5 appears to be capable of 50,000 to 70,000 disk reads/second courtesy of support for multiple buffer pools (innodb_buffer_pool_instances). Mark Callaghan’s Blog, Facebook - 21 June 2010 http://www.facebook.com/note.php?note_id=403975340932 Friday, 25 June 2010
    • What Facebook is saying http://www.facebook.com/note.php?note_id=403975340932 Friday, 25 June 2010
    • MySQL 5.5 Usability Friday, 25 June 2010
    • SIGNAL/RESIGNAL CREATE PROCEDURE p (pval INT) • Allow error handling in BEGIN DECLARE specialty CONDITION FOR SQLSTATE '45000'; IF pval = 0 THEN stored routines SIGNAL SQLSTATE '01000'; ELSEIF pval = 1 THEN • The execution is SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'An error occurred'; ELSEIF pval = 2 THEN passed to an error SIGNAL specialty SET MESSAGE_TEXT = 'An error occurred'; handler ELSE SIGNAL SQLSTATE '01000' • Accessible error SET MESSAGE_TEXT = 'A warning occurred', MYSQL_ERRNO = 1000; SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'An error occurred', MYSQL_ERRNO = 1001; values are SQLSTATE, END IF; END; MESSAGE_TEXT and DROP TABLE IF EXISTS xx; CREATE PROCEDURE p () MYSQL_ERRNO BEGIN DECLARE EXIT HANDLER FOR SQLEXCEPTION • RESIGNAL can pass BEGIN SET @error_count = @error_count + 1; along the original or a IF @a = 0 THEN RESIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=5; END IF; END; DROP TABLE xx; new information END; SET @error_count = 0; SET @a = 0; SET @@max_error_count = 2; CALL p(); SHOW ERRORS; Friday, 25 June 2010
    • MySQL 5.5 Performance Schema mysql> SELECT EVENT_ID, EVENT_NAME, TIMER_WAIT • PERFORMANCE_SCHEMA -> FROM EVENTS_WAITS_HISTORY WHERE THREAD_ID = 13 -> ORDER BY EVENT_ID; presents low level +----------+-----------------------------------------+------------+ | EVENT_ID | EVENT_NAME | TIMER_WAIT | +----------+-----------------------------------------+------------+ MySQL performance | | 86 | wait/synch/mutex/mysys/THR_LOCK::mutex | 87 | wait/synch/mutex/mysys/THR_LOCK_malloc | 686322 | 320535 | information | 88 | wait/synch/mutex/mysys/THR_LOCK_malloc | 339390 | | 89 | wait/synch/mutex/mysys/THR_LOCK_malloc | 377100 | | 90 | wait/synch/mutex/sql/LOCK_plugin | 614673 | • Data can be cleared | | | 91 | wait/synch/mutex/sql/LOCK_open 92 | wait/synch/mutex/sql/THD::LOCK_thd_data | 93 | wait/synch/mutex/mysys/THR_LOCK_malloc | | 659925 | 494001 | 222489 | • Filters with WHERE are | | 94 | wait/synch/mutex/mysys/THR_LOCK_malloc | 95 | wait/synch/mutex/mysys/LOCK_alarm | 214947 | 312993 | +----------+-----------------------------------------+------------+ allowed mysql> UPDATE SETUP_INSTRUMENTS • Must be enabled with -> SET ENABLED = 'NO' -> WHERE NAME = 'wait/synch/mutex/myisammrg/MYRG_INFO::mutex'; --performance_schema mysql> UPDATE SETUP_CONSUMERS -> SET ENABLED = 'NO' WHERE NAME = 'file_summary_by_instance'; Friday, 25 June 2010
    • MySQL 5.5 Partitioning • New RANGE COLUMNS CREATE TABLE expenses ( expense_date DATE NOT NULL, category VARCHAR(30), and LIST COLUMNS amount DECIMAL (10,3) ); ALTER TABLE expenses PARTITION BY LIST COLUMNS (category) ( added to the CREATE PARTITION p01 VALUES IN ( 'lodging', 'food'), PARTITION p02 VALUES IN ( 'flights', 'ground transportation'), TABLE statement PARTITION p03 VALUES IN ( 'leisure', 'customer entertainment'), PARTITION p04 VALUES IN ( 'communications'), PARTITION p05 VALUES IN ( 'fees') • Single or multiple column ); CREATE TABLE employees ( emp_no int(11) NOT NULL, names can be used birth_date date NOT NULL, first_name varchar(14) NOT NULL, instead of expressions last_name varchar(16) NOT NULL, gender char(1) DEFAULT NULL, hire_date date NOT NULL ) ENGINE=MyISAM • Range and list partitions PARTITION BY RANGE COLUMNS(gender,hire_date) (PARTITION p01 VALUES LESS THAN ('F','1990-01-01'), can be based in integers, PARTITION p02 VALUES LESS THAN ('F','2000-01-01'), PARTITION p03 VALUES LESS THAN ('F',MAXVALUE), PARTITION p04 VALUES LESS THAN ('M','1990-01-01'), DATE, DATETIME, CHAR or PARTITION p05 VALUES LESS THAN ('M','2000-01-01'), PARTITION p06 VALUES LESS THAN ('M',MAXVALUE), PARTITION p07 VALUES LESS THAN (MAXVALUE,MAXVALUE) VARCHAR Friday, 25 June 2010
    • Thank You Download Now http://dev.mysql.com/downloads • Documentation: http://dev.mysql.com/doc • Blogs: http://planet.mysql.com • Forums: http://forums.mysql.com ivan@mysql.com - ivan.zoratti@oracle.com http://izoratti.blogspot.com Friday, 25 June 2010
    • Friday, 25 June 2010
    • <Insert Picture Here> MySQL Cluster 7.1 Andrew Morgan Senior Product Manager, MySQL Cluster 1006.01 Friday, 25 June 2010
    • 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Friday, 25 June 2010
    • MySQL Cluster Clients MySQL Cluster Application Nodes MySQL MySQL Cluster Cluster Mgmt Mgmt MySQL Cluster Data Nodes Friday, 25 June 2010
    • Leading Open-Source, Carrier Grade Real Time Database • Network Subscriber Databases • Service Delivery Platforms • Messaging • Presence • VoIP Infrastructure • Intelligent Networks • Value Added Services • IPTV • Mobile Content Delivery • Gaming • DNS/DHCP for Broadband • Payment Gateways Friday, 25 June 2010
    • MySQL Cluster 7.1 – Key Enhancements Reducing Cost of Operations • Simplified Management & Monitoring: • ndbinfo real-time monitoring • MySQL Cluster Manager • Faster system restarts Delivering up to 10x higher Java Throughput • MySQL Cluster Connector for Java: • Native Java API • OpenJPA Plug-In Windows Support • GA Version - Ready for production http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster7_architecture.php Friday, 25 June 2010
    • MySQL Cluster 7.1: ndbinfo • New database (ndbinfo) which presents real-time metric data in the mysql> use ndbinfo form of tables mysql> show tables; +-------------------+ • Exposes new information together | Tables_in_ndbinfo | +-------------------+ with providing a simpler, more | blocks | consistent way to access existing | config_params | | counters | data | logbuffers | | logspaces | • Examples include: | memoryusage | • Resource usage (memory, buffers) | nodes | | resources | • Event counters (such as number of READ | transporters | operations since last restart) +-------------------+ • Data node status and connection status http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster7_architecture.php Friday, 25 June 2010
    • MySQL Cluster 7.1: ndbinfo • Example 1: Check memory usage/availability mysql> select * from ndbinfo.memoryusage; +---------+--------------+--------+------------+-----------+-------------+ | node_id | memory_type | used | used_pages | total | total_pages | +---------+--------------+--------+------------+-----------+-------------+ | 3 | Data memory | 917504 | 28 | 104857600 | 3200 | | 3 | Index memory | 221184 | 27 | 11010048 | 1344 | | 4 | Data memory | 917504 | 28 | 104857600 | 3200 | | 4 | Index memory | 221184 | 27 | 11010048 | 1344 | +---------+--------------+--------+------------+-----------+-------------+ • Note that there is a DATA_MEMORY and INDEX_MEMORY row for each data node in the cluster • If the Cluster is nearing the configured limit then increase the DataMemory and/or IndexMemory parameters in config.ini and then perform a rolling restart http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster7_architecture.php Friday, 25 June 2010
    • MySQL Cluster 7.1: ClusterJ/JPA Plugin Apps Apps Apps Apps • Traditionally, Java applications have Apps OpenJPA accessed MySQL Cluster in one of two ways: ClusterJPA • JDBC Driver for MySQL (Connector/J) via JDBC ClusterJ MySQL Server • Written own JNI layer on top of NDB API MySQL JNI JNI • New Domain Object Model Persistence API NDB API (C++) (ClusterJ) : • Java API • High performance, low latency Network • Feature rich • JPA interface built upon this new Java layer: • Java Persistence API compliant • Implemented as an OpenJPA plugin • Uses ClusterJ where possible, reverts to JDBC for some operations • Higher performance than JDBC • More natural for most Java designers • Easier Cluster adoption for web applications Data Nodes http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_connector_for_java.php Friday, 25 June 2010
    • Java Access Performance http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_connector_for_java.php Friday, 25 June 2010
    • MySQL Cluster Manager 1.0 Features Automated Management • Cluster-Wide Management • Process Management • On-Line Operations (Upgrades / Reconfiguration) Monitoring • Status Monitoring & Recovery HA Operations • Disk Persistence • Configuration Consistency • HA Agent Operation Delivered as part of MySQL Cluster CGE 7.1 http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_manager.php Friday, 25 June 2010
    • Creating & Starting a Cluster 1.Define the site: mysql client Mysql> create site --hosts=192.168.0.10,192.168.0.11, -> 192.168.0.12,192.168.0.13 mysite; 2.Expand the MySQL Cluster tar-ball(s) from mysql.com to known directory 7. mysqld 8. mysqld 3.Define the package(s): Mysql> add package --basedir=/usr/local/mysql_6_3_26 6.3; 1. ndb_mgmd 2. ndb_mgmd Mysql> add package --basedir=/usr/local/mysql_7_0_7 7.0; agent agent Note that the basedir should match the directory used in Step 2. 192.168.0.10 192.168.0.11 4. Create the Cluster Mysql> create cluster --package=6.3 -> --processhosts=ndb_mgmd@192.168.0.10,ndb_mgmd@192.168.0.11, 3. ndbd 4. ndbd -> ndbd@192.168.0.12,ndbd@192.168.0.13, ndbd@192.168.0.12, -> ndbd@192.168.0.13,mysqld@192.168.9.10,mysqld@192.168.9.11 5. ndbd 6. ndbd -> mycluster; agent agent This is where you define what nodes/processes make up the Cluster and where they should run 192.168.0.12 192.168.0.13 5. Start the Cluster: Mysql> start cluster mycluster; http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_manager.php Friday, 25 June 2010
    • Setting Cluster parameters mysql client 7. mysqld 8. mysqld Example: Turn of privilege checking for all MySQL Servers and change the port for connecting to the 1. ndb_mgmd 2. ndb_mgmd mysqld with ID = 8 to 3307. Allow data nodes to be agent agent automatically restarted after they fail: mysql> set skip_grant_tables:mysqld=true, 192.168.0.10 192.168.0.11 --> port:mysqld:8=3307, --> StopOnError:ndbd=false mycluster; 3. ndbd 4. ndbd MySQL Cluster Manager automatically determines 5. ndbd 6. ndbd which nodes (processes) need to be restarted and agent agent in which order to make the change take effect but avoid loss of service 192.168.0.12 192.168.0.13 http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_manager.php Friday, 25 June 2010
    • Upgrade Cluster mysql client 7. mysqld 8. mysqld • Upgrade from MySQL Cluster 6.3.26 to 7.0.7: 1. ndb_mgmd 2. ndb_mgmd mysql> upgrade cluster --package=7.0 mycluster; agent agent • Automatically upgrades each node and restarts 192.168.0.10 192.168.0.11 the process – in the correct order to avoid any loss of service 3. ndbd 4. ndbd • Without MySQL Cluster Manager, the 5. ndbd 6. ndbd administrator must stop each process in turn, start the process with the new version and wait agent agent for the node to restart before moving onto the next one 192.168.0.12 192.168.0.13 http://www.mysql.com/why-mysql/white-papers/mysql_wp_cluster_manager.php Friday, 25 June 2010
    • Thank You Have a look Now http://www.mysql.com/products/database/cluster/ andrew.morgan@oracle.com http://clusterdb.com Friday, 25 June 2010
    • Friday, 25 June 2010
    • <Insert Picture Here> MySQL Enterprise Ivan Zoratti Sales Consulting Manager EMEA 1006.01 Friday, 25 June 2010
    • 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Friday, 25 June 2010
    • MySQL Product Offering and Licensing Community Server Embedded Server Community Commercial Enterprise GPL Licence GPL • Available under GPL • Sold to OEMs and • Significantly improved release- • Software tested by the ISVs management, testing, certification Community • Frees from applying and service • Bleeding edge GPL rules to source • Services to ensure the maximum • No Maintenance SLA code and IP quality, uptime, and performance of • Not Supported MySQL Enterprise systems • No ISV Certification • Around-the-clock support for the MySQL Enterprise server, along with consultative services and self- help knowledge aids • Extended Lifecycle Support Friday, 25 June 2010
    • MySQL Comparison Chart Feature Community Server Embedded Server Open Source - GPL License ✔ ✔ Open Source - Commercial License ✔ Option Benefits from testing by worldwide Community ✔ ✔ ✔ Feature Releases Mature Mature Mature Benchmarked with 2,000+ connections ✔ ✔ Rapid Update Service Pack Program ✔ ✔ ✔ Quarterly Service Pack Program ✔ ✔ Hot Fix Program ✔ ✔ MySQL Enterprise Monitor and Advisors ✔ MySQL Query Analyzer ✔ Bug Escalation Privilege ✔ ✔ Live feeds for Software/Support Status updates ✔ ✔ Online Knowledge Base ✔ ✔ 24x7 Production/Consulting Support Services ✔ ✔ Extended End-of-Life Support Policy ✔ ✔ Legal indemnification ✔ ✔ Friday, 25 June 2010
    • MySQL Enterprise: Commercial Offering • MySQL Enterprise Server • Monthly Rapid Updates Database • Quarterly Service Packs • Hot Fix Program • Subscription: • Extended End-of-Life • MySQL Enterprise • License (OEM): • Global Monitoring of All Servers • Embedded Server • Web-Based Central Console Monitoring • Built-in Advisors, Expert Advice • MySQL Query Analyzer • Support • Specialised Scale-Out Help Cluster Carrier- • MySQL Grade • Training • 24 x 7 x 365 Problem Resolution • Consulting • Online Self help Knowledge Base Support • Consultative Help• NRE • Bug Escalation Program http://www.mysql.com/products/enterprise/ Friday, 25 June 2010
    • MySQL Enterprise Monitor • Single, consolidated view into entire MySQL environment • Monitor MySQL Sessions, Connections, Replication Latency • Improve Application Performance • Gain Immediate Visibility into Your Replication Topologies • Customisable rules-based monitoring and alerts • Identifies problems before they occur • Makes it easier to scale out without requiring more DBAs A Virtual MySQL DBA Assistant! http://www.mysql.com/products/enterprise/monitor.html Friday, 25 June 2010
    • MySQL Enterprise Monitor Architecture Individual Servers w/Agent Configuration Advisor Scheduling Alerts/Notifications Service Agent written in C and Visual Monitoring supports all MySQL Enterprise Query Analysis Service platforms Manager Service Manager written in Java Collects MySQL and OS servlets exposed as web services. specific metrics, Query Supports Linux, Solaris, Mac OSX content/stats and Microsoft Windows Enterprise Dashboard Enterprise Dashboard Web- based, written in JSP Advisor Monitoring Event based Alerts Advice/Corrective Actions Repository holds historical performance data for analysis Repository Holds historical MySQL and OS data, Query Statistics Master-Slave Replication Friday, 25 June 2010
    • MySQL Enterprise Monitor 2.2 Spring 2010 Release • Performance Optimization for Java and .NET applications • Improved Performance Monitoring • MySQL Enterprise Connector Plugins to Query Analyzer • MySQL Query Analyzer Advanced Search Options • New Query Analyzer Execution Notices • Filter for Specific Query Problems • Full Table Scans, Bad Indexes • Improved User/Security Model • New Read Only User • New LDAP Authentication • Improved Integration with MySQL Support • New MySQL Support Diagnostic Reports Friday, 25 June 2010
    • MySQL Enterprise Monitor 2.2 Spring 2010 Release • Improved Usability • New Auto-closing Events • New Searchable Graphs • New Custom Rule/Graph Import and Export • New Intelligent Installation Options • New Faster Purging of Repository Data • New UI Session Management • Improved Advisor Rules and Graphs • New Advisor Rules and Graphs • 600+ MySQL and OS variables • 140+ Rules • 40+ MySQL and OS Graphs Friday, 25 June 2010
    • MySQL Enterprise Monitor 2.2 Friday, 25 June 2010
    • MySQL Query Analyzer • Centralised monitoring of queries across all servers • No reliance on Slow Query Logs, SHOW PROCESSLIST;, vmstat, etc. • Aggregated view of query execution counts, time, and rows • Saves time parsing atomic executions for total query expense Friday, 25 June 2010
    • Monitoring Queries with MySQL Proxy MySQL Database Application Server 3306 (SQL statements & result sets)‫‏‬ 2. MySQL Proxy 6446 & MySQL Agent ** (MySQL, OS monitoring data, SQL performance data: statements, examples, EXPLAINs, aggregated stats)‫‏‬ 18080 1. MySQL Enterprise Monitor (Service Manager, Dashboard) List of components to download & configure: 1. MySQL Enterprise Monitor & Query Analyzer ** MySQL Proxy is optionally deployed and 2. MySQL Proxy & Agent configured as a plugin with the MySQL Agent Friday, 25 June 2010
    • Connector Plugins to Query Analyzer • Enable Query Analyzer without need for MySQL Proxy • More configuration options • Less overhead than proxied connection to database • Proxy for dev/QA, Connectors for production • Adds query collection to Connector components used by most/all MySQL applications • Plugins available for: • Connector/J • Connector/Net Friday, 25 June 2010
    • Monitoring Queries with Connector/J, .NET Application Server MySQL Database (SQL statements & result sets)‫‏‬ 3. Connector/J, NET 3306 4. Plugin for Connector/J, NET 2. MySQL Agent (SQL performance data: statements, examples, EXPLAINs, aggregated stats)‫‏‬ (MySQL & OS monitoring data)‫‏‬ 18080 1. MySQL Enterprise Monitor (Service Manager, Dashboard)‫‏‬ List of components to download & configure: 1. MySQL Enterprise Monitor & Query Analyzer 2. MySQL Agent 3. Connector/J v5.1 or newer/ Connector/NET v6.2 or newer 4. MySQL Enterprise Plugin for Connector/J, NET Friday, 25 June 2010
    • What Promovacances.com is saying The MySQL Query Analyzer has enabled us to save a huge amount of time. We can very quickly identify and analyze the SQL code causing problems on the most used queries and fix the issues. I highly recommend the MySQL Query Analyzer to all DBAs and developers who want the best performance for their applications. Guillaume Postaire, Infrastructure Manager, Promovacances.com Friday, 25 June 2010
    • MySQL Enterprise Features MySQL Enterprise Basic Silver Gold Platinum Software MySQL Enterprise Server Pro Pro Advanced Advanced Monthly Rapid Updates ✔ ✔ ✔ ✔ Quarterly Service Packs ✔ ✔ ✔ ✔ MySQL Connectors ✔ ✔ ✔ ✔ Add-on Products & Services Memcached for MySQL ✔ ✔ Software Update Services Software Updates Service ✔ ✔ ✔ ✔ Technical Alerts ✔ ✔ ✔ ✔ MySQL Enterprise Monitor Enterprise Dashboard ✔ ✔ ✔ Live Feeds, Notifications and Alerts ✔ ✔ ✔ Custom Advisor ✔ ✔ ✔ Upgrade Advisor ✔ ✔ ✔ Administration Advisor ✔ ✔ ✔ Security Advisor ✔ ✔ ✔ MySQL Query Analyzer ✔ ✔ Replication Monitor ✔ ✔ Replication Advisor ✔ ✔ Memory Usage Advisor ✔ ✔ Schema Advisor ✔ Performance Advisor ✔ Consultative Support Remote Troubleshooting ✔ ✔ Replication Review ✔ ✔ Partitioning Review ✔ ✔ Query Review ✔ Schema Review ✔ Performance Tuning ✔ Customer Code Reviews: MySQL Client APIs ✔ Customer Code Reviews: MySQL User Defined Functions & Server Extensions ✔ Customer Code Reviews: MySQL Stored Procedures, Triggers & Functions ✔ Install Advantage Phone Phone, Remote Install Phone, Remote Install http://www.mysql.com/products/enterprise/features.html Friday, 25 June 2010
    • MySQL Enterprise Features MySQL Enterprise Basic Silver Gold Platinum Problem Resolution Support Number of Incidents 2 Unlimited Unlimited Unlimited Web-based Case Management ✔ ✔ ✔ ✔ Phone Access Business Hours 24x7 24x7 Support Access Business Hours Business Hours 24x7 24x7 Max Initial Response Time 2 bus. days 4 hours 2 hours 1 hour Emergency 2 Response Time 1 hour 30m Emergency 2 Bug Fix Escalation ✔ ✔ Emergency 2 Hot Fix Build ✔ ✔ Custom Build Option Self Help Support Knowledge Base ✔ ✔ ✔ ✔ Lifecycle/EOL Support Active ✔ ✔ ✔ ✔ Extended ✔ ✔ ✔ ✔ Account Management Technical Account Manager (TAM) Option Proactive Case Mgmt. Option Scheduled Status Calls Option Scheduled Onsite Visits Option Scheduled Environment & Performance Review Option Indemnification Indemnification Option Option Unlimited Unlimited Option Option http://www.mysql.com/products/enterprise/features.html Friday, 25 June 2010
    • MySQL Enterprise Backup Beta • Formerly “InnoDB Hot Backup” • Online, non-locking backup & recovery • Tables, Indexes • Server, database, or object-level • Logical and physical backups • Full or incremental backups • Supports InnoDB and MyISAM • Cross-Platform (Windows, Linux, Unix) • Features • Point-in-time recovery • Compressed backups • Partial Backup Friday, 25 June 2010
    • MySQL Enterprise Backup 3.5 Beta • Incremental Backup • Support for Barracuda file format • Backup of compressed tables • Backup additional files such as partition files • Backup of in-memory database with --exec-when-locked option Friday, 25 June 2010
    • Backup Steps 1.Backup data files • Copy and compress data files • Omit free space and empty pages 2.Copy log records created during data file copy • All redo records with LSN > backup starting time • Portions of the log file that contain all the required redo information 3.Backup MyISAM files •FLUSH TABLES WITH READ LOCK 4.Execute additional actions under --exec-when- locked • FLUSH TABLES WITH READ LOCK • mysqldump Friday, 25 June 2010
    • Restore Steps 1.Uncompress and restore backup files 2.Recreate InnoDB log files 3.Apply log files 4.Restore MyISAM and other files Friday, 25 June 2010
    • Incremental and Partial Backup • Incremental • Last backup or any point in time can be identified to start the backup • Incremental backups must be restored in the right order • Partial • Can be used with the “file per table” option • The system tablespace will always be backed up • Regular expressions are allowed to select tables and schemas to back up Friday, 25 June 2010
    • Thank You Download the Trial Now http://www.mysql.com/trials ivan@mysql.com http://izoratti.blogspot.com Friday, 25 June 2010
    • Friday, 25 June 2010
    • <Insert Picture Here> MySQL Workbench Andrew Morgan Senior Product Manager, MySQL Cluster 1006.01 Friday, 25 June 2010
    • 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Friday, 25 June 2010
    • MySQL Workbench 5.2 RC • Three Tools in One Product • SQL Editor • Database Administrator • Data Modeller • Cross Platform and Native UI • Windows • Linux • Mac OS X http://dev.mysql.com/doc/index-gui.html Friday, 25 June 2010
    • Design, Develop, Admin Design Development Administration • Data modeling tool for • Graphical SQL IDE for • Graphical interface for developers, DBAs, developers MySQL administrators architects • Create and execute SQL • Stop/Start, Check, Edit • Design new database queries, procedures, etc. configuration designs from scratch • Edit data inline with table • Manage permissions, • Reverse engineer and results Import/Export data, more.. edit existing databases Friday, 25 June 2010
    • Tab-Oriented Workflow •Quick Switching Between Contexts • Modelling and SQL Editor • Admin and SQL Editor •Multiple DB Connections • Single Instance per Tab • Open as many Tabs as needed Friday, 25 June 2010
    • SQL Editor UI • Object Browser • Schema Browsing • SQL Statements • Multiple tabs to work with several scripts • Content Tabs • Overview • MS Access like icon listing • Output • MySQL Server output messages • History • All executed SQL commands • Snippets • User- / Pre-defined SQL scripts • Result Set Tabs • One tab per result set Friday, 25 June 2010
    • MySQL Model Tab •Sidebar • Description for schema objects • User defined data types • History listing of all actions •Model Overview • Lists all EER Diagrams • Physical Schema listing • Schema Privileges Management • SQL Scripts • Model Notes Friday, 25 June 2010
    • Diagram Tab •Sidebar • Bird’s Eye View • Catalog Tree • UI Layers Tree • User Datatypes • Description Editor • UI Figure Properties Editor •Diagram • Worktool - Toolbar • Diagram Area • Displays UI Figures for Schema Objects like Tables, Views, Routines • UI Figures for Layers, Notes, Images Friday, 25 June 2010
    • Admin Tab •Server Status • Displays CPU/Mem usage • Graphs for MySQL performance •Configuration • MySQL Startup/Shutdown • my.ini Configuration • Account Management • Server Connection Listing • Server & Status Variables Browsing • Data Dump Export / Import • Log Table Browsing Friday, 25 June 2010
    • Thank You Try it Now http://dev.mysql.com/downloads/workbench/5.2.html • Documentation: http://dev.mysql.com/doc • Blogs: http://planet.mysql.com • Forums: http://forums.mysql.com andrew.morgan@oracle.com http://clusterdb.com Friday, 25 June 2010
    • Friday, 25 June 2010