Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

My sql5.7 whatsnew_presentedatgids2015

1,682 views

Published on

MySQL -Discover Whats New, Presented at #GIDS Bangalore on 24th April 2015

Published in: Software
  • Be the first to comment

My sql5.7 whatsnew_presentedatgids2015

  1. 1. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What’s New in MySQL 5.7 Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
  2. 2. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  3. 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Please fill the feedback form @ Oracle Booth and get a memento 3
  4. 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Cloud Web & Enterprise OEM & ISVs Industry Leaders Rely on MySQL
  5. 5. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Powers The Web Over 500 million Tweets/day. 143,200 Tweets/sec in Aug 2013 ”Many petabytes” of data. 11.2 Million Row changes & 2.5 billion rows read /sec handled in MySQL 6 billion hours of video watched each month Globally-distributed database with 100 terabytes of user-related data based on MySQL Cluster
  6. 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Best Choice for Next Generation Web & Cloud Applications World’s Most Popular Open Source Database Leading Open Source Database for Web Applications #1 Open Source Database in the Cloud Integrated with Hadoop in Big Data Platforms Strong MySQL Momentum 6
  7. 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Government & BFSI Sample MySQL Customers in India )
  8. 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Telecom & Others Sample MySQL Customers in India
  9. 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Release Candidate Available! 9 Enhanced InnoDB Performance & Scalability 2 X Faster than MySQL 5.6 Faster Connects RC And many more new features and enhancements... http://mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available/
  10. 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Release Candidate Available! 10 Fabric, GTID, Multi-Master Replication, New GIS with Boost NEW! JSON Support (now in labs) RC And many more new features and enhancements... http://mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available/ Next Gen App Support
  11. 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Release Candidate Available! 11 Improved Security : Safer initialization, setup & management Enterprise: Firewall, Audit, Encryption RC And many more new features and enhancements... http://mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available/ Security
  12. 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Release Candidate Available! 12 ONLINE ONLINE ONLINE MySQL SYS Schema, Optimizer refactored Manageability/Modularity RC And many more new features and enhancements... http://mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available/
  13. 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Release Candidate Available! 13 Enhanced InnoDB Improved Security : Safer initialization, setup & management Enterprise: Firewall, Audit, Encryption ONLINE ONLINE ONLINE MySQL SYS Schema, Optimizer refactored Performance & Scalability Manageability/Modularity 2 X Faster than MySQL 5.6 Faster Connects Fabric, GTID, Multi-Master Replication, New GIS with Boost NEW! JSON Support (now in labs) RC And many more new features and enhancements... http://mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available/ Security Next Gen App Support
  14. 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 14 Performance and Scalability
  15. 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 0 100,000 200,000 300,000 400,000 500,000 600,000 700,000 8 16 32 64 128 256 512 1,024 QueriesperSecond Connections MySQL 5.7: Sysbench Read Only (Point Select) MySQL 5.7 MySQL 5.6 MySQL 5.5 MySQL 5.7: Sysbench: Read Only Intel(R) Xeon(R) CPU E7-4860 x86_64 4 sockets x 10 cores-HT (80 CPU threads) 2.3 GHz, 512 GB RAM Oracle Linux 6.5 2x Faster than MySQL 5.6 3x Faster than MySQL 5.5 645,000 QPS
  16. 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB, NoSQL With Memcached 6x Faster than MySQL 5.6 Thank you, Facebook 0 200,000 400,000 600,000 800,000 1,000,000 1,200,000 8 16 32 64 128 256 512 1,024 QueriesperSecond Connections MySQL 5.7 vs 5.6 - InnoDB & Memcached MySQL 5.7 MySQL 5.6 1 Million QPS Intel(R) Xeon(R) CPU E7-4860 x86_64 4 sockets x 10 cores-HT (80 CPU threads) 2.3 GHz, 512 GB RAM Oracle Linux 6.5
  17. 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Connections per Second 1.7x Faster than MySQL 5.6 2.5x Faster than MySQL 5.5 67,000 Connections/Sec 0 10,000 20,000 30,000 40,000 50,000 60,000 70,000 80,000 MySQL 5.5 MySQL 5.6 MySQL 5.7 Connections/Second Connections Per Second MySQL 5.5 MySQL 5.6 MySQL 5.7 Intel(R) Xeon(R) CPU E7-4860 x86_64 4 sockets x 10 cores-HT (80 CPU threads) 2.3 GHz, 512 GB RAM Oracle Linux 6.5
  18. 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Optimizer Cost Model: Performance Improvements DBT-3 (Size Factor 10, CPU bound) 0 20 40 60 80 100 Q3 Q7 Q8 Q9 Q12 Executiontimerelativeto5.6(%) 5 out of 22 queries get a much improved query plan (others remain the same) MySQL 5.6 MySQL 5.7
  19. 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 0 20 40 60 80 100 Q2 Q18 Executiontimerelativeto5.6(%) CPU bound 5.6 5.7 Optimizer Cost Model: Performance Improvements DBT-3 (Size Factor 10) 2 out of 22 queries get a significantly improved query plan (others remain the same) 0 20 40 60 80 100 Q2 Q18 Executiontimerelativeto5.6(%) Disk bound 5.6 5.7
  20. 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Often removes slave as a bottleneck; keep pace with master with 8+ slave threads • Option to preserve Commit order • Automatic slave transaction retries Replication : Multi Threaded Slaves 20 0% 50% 100% 150% 200% 250% 1 8 24 48 Slave Threads Slave throughput vs. 96 Thread Master • 8-10x Faster slave throughput
  21. 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Improved MDL locking • Fast-path for DML locks • Lock-free DML lock acquisition • Lock-free hash – Now uses MurmurHash library • Removes bottlenecks around DML access to a single table – 10% increased throughput in OLTP_RO/POINT_SELECT sysbench – Optimized for typical DML heavy workloads 21
  22. 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 22 Next Generation Application Support 22Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  23. 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: JSON • Native JSON data types – Native internal binary format for efficient processing & storage • Built-in JSON functions – Allowing you to efficiently store, search, update, and manipulate Documents • JSON Comparator – Allows for easy integration of Document data within your SQL queries • Indexing of Documents using Generated Columns – InnoDB supports indexes on both stored and virtual Generated Columns – New expression analyzer automatically uses the best “functional” index available 23 labs.mysql.com
  24. 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Replaced custom code with Boost.Geometry – For spatial calculations – For spatial analysis – Enabling full OGC compliance – We’re also Boost.Geometry contributors! • InnoDB R-tree based spatial indexes – Full ACID, MVCC, & transactional support – Index records contain minimum bounding box • GeoHash • GeoJSON • Helper functions such as ST_Distance_Sphere() and ST_MakeEnvelope() MySQL 5.7: GIS Improvements 24
  25. 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • R-tree based – Full transactional support – Predicate locking to prevent phantoms – Records contain minimum bounding box • Small and compact – Currently only supports 2D data • We would like to add 3D support in the future – Supports historical spatial index DDL syntax MySQL 5.7: GIS - InnoDB Spatial Indexes 25
  26. 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric 1.5 • High Availability – Server monitoring with auto-promotion and transparent application failover • Optionally scale-out through sharding – Application provides shard key – Range or Hash – Tools for resharding – Global updates & tables • Fabric-aware connectors rather than proxy: Python, Java, PHP, .NET, C (labs) – Lower latency, bottleneck-free • Server provisioning using OpenStack etc. High Availability + Sharding-Based Scale-out MySQL Fabric Connector Application Read-slaves SQL HA group Read-slaves HA group Connector Application GA
  27. 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Multi-master update anywhere – Conflict detection and resolution (transaction rollback) – Optimistic State Machine Replication • Automatic group membership management and failure detection – No need for server fail-over – Elastic scale out/in – No single point of failure – Automatic reconfiguration • Well integrated – InnoDB – GTID-based replication – PERFORMANCE_SCHEMA EAF: Group Replication Application MySQL Masters Replication Plugin API MySQL Server Group Comms labs.mysql.com Multi-master update anywhere
  28. 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • Multi-Source Replication – Consolidate updates from multiple Masters into one Slave • Consolidated view of all shards • More flexible topologies • Centralized point for backups – Compatible with Semi-Sync Replication & enhanced MTS • Performance Schema tables for monitoring slave MySQL 5.7: Multi-Source Replication Binlog Master 1 Binlog Master 2 … … Binlog Master N IO 1 Relay 1 Coordinator W1 W2 … WX IO 2 Relay 2 Coordinator W1 W2 … WX … … Coordinator W1 W2 … WX IO N Relay N Coordinator W1 W2 … WX Slave
  29. 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB Full-Text CJK Support • Two new Full-Text Parser plugins • N-gram parser supports Chinese, Japanese, & Korean – Supports all ideographic languages that do not use word delimiters • MeCab parser supports Japanese – Native Japanese focused language support • Easily customized – Token sizes, stop words, … • Supports advanced searches – BOOLEAN MODE, NATURAL LANGUAGE MODE, with Ranking
  30. 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EAF: InnoDB Compression Thank you, SanDisk Fusion-io • Transparent Page Level Compression – Happens transparently in background threads – Managed entirely within the IO layer – Uses sparse file and "hole punching" support in OS kernels and File Systems • Reduces IO – Improves MySQL performance – Improves storage efficiency – Reduces write cycles, thus increasing SSD lifespan • Applies to all InnoDB data, including the system tablespace and UNDO logs 30 labs.mysql.com
  31. 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | EAF: HTTP Plugin for MySQL • Server Plugin adds HTTP(S) endpoints to MySQL • Results are serialized to JSON format encoded as UTF8 • Provides 3 choices of User Endpoint Types – SQL – CRUD - Key-Value – JSON - Document labs.mysql.com
  32. 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.6+: NoSQL InnoDB Memcached Plugin
  33. 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Cluster 7.4 GA • 200 Million NoSQL Reads/Sec • 2.5M SQL Ops/Sec • 50% Faster Reads • 40% Faster Mixed Performance • Active-Active Geographic Redundancy • Conflict Detection/Resolution Active-Active • 5X Faster Maintenance Ops • Detailed Reporting Management Copyright 2015, oracle and/or its affiliates. All rights reserved 33 Real-Time in-Memory Performance
  34. 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL HA & Scaling Solutions MySQL Replication MySQL Fabric Oracle VM Template Oracle Clusterware Solaris Cluster Windows Cluster DRBD MySQL Cluster App Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Data Layer Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Zero Data Loss MySQL 5.7 MySQL 5.7 ✔ ✔ ✔ ✔ ✔ ✔ Platform Support All All Linux Linux Solaris Windows Linux All Clustering Mode Master + Slaves Master + Slaves Active/Pas sive Active/Passi ve Active/P assive Active/Pas sive Active/P assive Multi- Master Failover Time N/A Secs Secs + Secs + Secs + Secs + Secs + < 1 Sec Scale-out Reads ✔ ✖ ✖ ✖ ✖ ✖ ✔ Cross-shard operations N/A ✖ N/A N/A N/A N/A N/A ✔ Transparent routing ✖ For HA ✔ ✔ ✔ ✔ ✔ ✔ Shared Nothing ✔ ✔ ✖ ✖ ✖ ✖ ✔ ✔ Storage Engine InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ NDB Single Vendor Support ✔ ✔ ✔ ✔ ✔ ✖ ✔ ✔
  35. 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 35 Security
  36. 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Security - Encryption, Passwords, Installation • AES 256 Encryption – Default in MySQL 5.7 • Password rotation policies – Can be set globally, and at the user level • Deployment: enable secure unattended install by default – Random password set on install – Remove anonymous accounts – Deployment without test account, schema, demo files • Easier instance initialization and setup: mysqld –initialize • New detection and support for systemd 36
  37. 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Security – SSL, Proxy User • SSL – Enabled by default – Auto-detection of existing keys and certs – Auto generation of keys and certs when needed – New helper utility: mysql_ssl_rsa_setup • Extended Proxy User Support – Added Built-in Authentication Plugins support for Proxy Users – Allows multiple users to share a single set of managed privileges 37
  38. 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Encryption • MySQL encryption libraries – Symmetric encryption AES256 – Public-key / asymmetric cryptography • Key management – Generate public and private keys – Key exchange methods: RSA, DSA, DH • Sign and verify data – Cryptographic hashing for digital signing, verification, & validation
  39. 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Audit • Out-of-the-box logging of connections, logins, and query • User defined policies for filtering, and log rotation • Dynamically enabled, disabled: no server restart • XML-based audit stream per Oracle Audit Vault spec Adds regulatory compliance to MySQL applications (HIPAA, Sarbanes-Oxley, PCI, etc.)
  40. 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Audit 2. User Joe connects and runs a query 1. DBA enables Audit plugin 3. Joe’s connection & query logged
  41. 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Authentication • PAM (Pluggable Authentication Modules) – Access external authentication methods – Standard interface (Unix, LDAP, Kerberos, others) – Proxied and non-proxied users • Windows – Access native Windows services – Authenticate users already logged into Windows (Windows Active Directory) • Pluggable Authentication API Integrates MySQL with existing security infrastructures and SOPs
  42. 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Firewall • Real Time Protection – Queries analyzed and matched against White List • Blocks SQL Injection Attacks – Positive Security Model • Block Suspicious Traffic – Out of Policy Transactions detected & blocked • Learns White List – Automated creation of approved list of SQL command patterns on a per user basis • Transparent – No changes to application required 42 MySQL Enterprise Firewall monitoring
  43. 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Firewall • SQL Injection Protection with Positive Security Model 43 • Out of policy database transactions detected and blocked • Logging & Analysis Select *.* from employee where id=22 Select *.* from employee where id=22 or 1=1 Block & Log✖ Allow & Log✔ White ListApplications
  44. 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Manageability & Modularity 4444
  45. 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Memory Instrumentation • Aggregates statistics by – Type of memory used (caches, internal buffers, …) – Thread/account/user/host indirectly performing the memory operation • Attributes include – Memory used (bytes) – Operation counts – High/Low Water Marks Statement Instrumentation • Stored Procedures • Stored Functions • Prepared Statements • Transactions Additional Information • Replication slave status • MDL lock instrumentation • Status and variables per thread • Server stage tracking • Track long running SQL • Improved configuration and ease-of-use • All while reducing total footprint and overhead MySQL 5.7: Performance Schema
  46. 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: SYS Schema Helper objects for DBAs, Developers and Operations staff • Helps simplify DBA / Ops tasks - Monitor server health, user, host statistics - Spot, diagnose, and tune performance issues • Easy to understand views with insights into - IO hot spots, Locking, Costly SQL statements - Schema, table and index statistics • SYS is similar to - Oracle V$ catalog views - Microsoft SQL DMVs (Dynamic Mgmnt Views)
  47. 47. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB – Always Online • Resize the InnoDB Buffer Pool online – Allows DBAs to tune the buffer size without any downtime – Adapt in real-time to changes in database usage patterns • Separate UNDO tablespace – With automatic online truncation • Additional Online ALTER TABLE support – Enlarge VARCHAR, Rename Index • Dynamic configuration – Making existing settings dynamically configurable – As a design principle for new features & settings 47
  48. 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Replication : Enabling GTIDs Check Compatibility • Server reports any incompatible operations Generate GTIDs • All servers generate GTIDs but don’t depend on them Brief wait • Allow all legacy events to work through all servers GTIDs Enabled • All Servers generate and expect GTIDs only • Full benefits of GTIDs available Phased, On-line Introduction Oracle Confidential – Internal/Restricted/Highly Restricted 48 Online Operations: Dynamic Replication Filters, switch master
  49. 49. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Replication : Online Operations & monitoring Oracle Confidential – Internal/Restricted/Highly Restricted 49 •Online Dynamic Replication Filters • Online Switch master •Performance Schema tables for monitoring slave
  50. 50. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB - Bulk Load for Create Index • Much faster INDEX creation and bulk loads • Sorted index builds, done from the bottom-up – Improves speed by increasing locality and decreasing node splitting • Pages are compressed only when full • New innodb_fill_factor option controls free space left in each page • Performance results show – 2-3x performance improvement for ADD/CREATE INDEX operations • Up to 500x improvement with larger --innodb_sort_buffer_size values – 2-5% improvement for standard INSERT operations 50
  51. 51. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB Temporary Tables • New separate tablespace for temporary tables – Improved CREATE/DROP performance – DDL changes are transient, which eliminates some disk IO • Optimize DML operations – No REDO logging, no change buffering, less locking • New intrinsic temporary tables – Specialized temporary tables with tailored ACID/MVCC semantics – Light weight and ultra-fast, great for intermediate query execution operations • InnoDB as default storage engine for disk based temp tables – Optimizer switched from MyISAM to InnoDB (faster) for internal temp tables 51
  52. 52. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Syslog Support for Linux/Unix platforms • Native support for syslog • Simple option to (re)direct log output to native syslog facility • Start-up server configuration option • Dynamically in the running server – System variable log_syslog (ON/OFF, defaults to OFF). Thank you, Simon Mudd at booking.com
  53. 53. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Locking Multiple User Level Locks per Connection • User-level locks can be used to organize mutual exclusion – When accessing some resource – When table or row-level locks are not appropriate • Request multiple locks by issuing a series of GET_LOCK statements • Replaces custom user-level lock implementation – With one based on the MDL lock manager – Deadlocks between different connections acquiring user-level locks, metadata locks, and those waiting for table flushes are properly detected and reported as errors. Thank you, Konstantin Osipov!
  54. 54. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Server-side Statement Timeouts Thank you Davi Arnaut! • Server side statement timeouts – Global for server, per session, or for individual SELECT statements • Expanded to Windows and Solaris, restricted by removing USER option SELECT MAX_STATEMENT_TIME = 109 * FROM my_table; 54
  55. 55. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Workbench 6.3 • Fabric – Add node, browse, view, connect • Performance Dashboard – Performance Schema Reports & Graphs • Visual Explain • GIS Viewer • Migration – New: Microsoft Access – Microsoft SQL Server, Sybase, PostgreSQL, SQLite RC 55 • New Easy to Use Wizards for – Fast Data Migration – Table<->File Data Import/Export (like Excel) – SSL Certificate Creation
  56. 56. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL on Windows • MySQL Installer for Windows • MySQL Workbench • MySQL Migration Wizard – Microsoft SQL Server – Microsoft Access • MySQL for Visual Studio • MySQL for Excel • MySQL Notifier • MySQL Connector/.Net • MySQL Connector/ODBC
  57. 57. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL Repos • Distributions – Oracle, Red Hat, CentOS – Fedora – Ubuntu, Debian – SUSE • Official MySQL Docker Image from Oracle • Coming Soon – Preconfigured Containers – Improved support for popular DevOps deployment tools https://dev.mysql.com/downloads/repo MySQL on GitHub • Git for MySQL Engineering – Fast, flexible and great for a distributed team – Great tooling – Large and vibrant community • GitHub for MySQL Community – Easy and fast code availability to the community and to downstream projects – New Pull Requests https://github.com/mysql 57
  58. 58. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Parser & Optimizer Refactoring Optimizer Logical transformations Cost-based optimizer: Join order and access methods Plan refinement Query execution plan Query execution Parser Resolver: Semantic check,name resolution SQL DML query Query result Storage Engine InnoDB MyISAM Improves readability, maintainability and stability – Cleanly separate the parsing, optimizing, and execution stages – Allows for easier feature additions, with lessened risk
  59. 59. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Optimizer: New Cost Model • More accurate cost estimates – Better decisions by the optimizer should improve query performance • Adapt to new hardware architectures – SSDs, larger memory sizes, improved caches • More maintainable cost model implementation – Avoid hard coded “cost constants” – Refactoring of existing cost model code • Configurable and tunable – mysql.server_cost and mysql.engine_cost tables – API for determining where data resides: on disk or in cache 59
  60. 60. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Query Rewrite Plugin • New pre and post parse query rewrite APIs – Users can write their own plug-ins • Provides a post-parse query plugin – Rewrite problematic queries without the need to make application changes – Add hints – Modify join order – Many more … • Improve problematic queries from ORMs, third party apps, etc • Eliminates many legacy use cases for proxies
  61. 61. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Optimizer - Cost Info in JSON EXPLAIN • Expanded JSON EXPLAIN – Now includes all available cost info – Used for Visual Explain In MySQL Workbench 61 { "query_block": { "select_id": 1, "cost_info": { "query_cost": "200.40" }, "table": { "table_name": "nicer_but_slower_film_list", "access_type": "ALL", "rows_examined_per_scan": 992, "rows_produced_per_join": 992, "filtered": 100, "cost_info": { "read_cost": "2.00", "eval_cost": "198.40", "prefix_cost": "200.40", "data_read_per_join": "852K" }, "used_columns": [ "FID", "title", "description", "category", "price", "length", "rating", "actors" ], ...
  62. 62. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Early Access Feature (EAF): Data Dictionary Replacing the FRMs • A single repository for database object metadata – InnoDB tables replace .frm, .trg, .trn, .par files • Atomic & crash-safe operations today – Transactional in the future • Makes adding new features much easier • Eliminates complexity, resolves bugs • Improves performance • Leverages InnoDB strengths 62 labs.mysql.com
  63. 63. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Polygot Persistence 63 Using the right tool for the right job
  64. 64. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Additional Info • http://mysqlserverteam.com/whats-new-in-mysql-5-7-first-release-candidate/ • http://mysqlserverteam.com/json-labs-release-overview/ • http://mysqlserverteam.com/?s=query+rewrite • http://mysqlserverteam.com/category/performance/optimizer/ • http://mysqlserverteam.com/category/innodb/ • http://mysqlserverteam.com/category/mysql/performance-schema/ • http://mysqlserverteam.com/category/gis/ • http://mysqlserverteam.com/category/full-text-search/ • http://mysqlserverteam.com/category/dictionary/ • http://dev.mysql.com/doc/refman/5.7/en/ 64
  65. 65. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Please fill the feedback form @ Oracle Booth and get a memento 65

×