Sales Consultant Mysql GBU ([email protected]) Agenda 1 Mysql Within Oracle
Total Page:16
File Type:pdf, Size:1020Kb
MySQL @ Oracle Carsten Thalheimer Sales Consultant MySQL GBU ([email protected]) Agenda 1 MySQL within Oracle 2 Overview of MySQL architecture 3 Inside MySQL 4 Commercial MySQL vs. „Open Source“ MySQL 5 MySQL Subscription / MySQL License 6 A MySQL Reference 7 Questions and Answers Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 2 MySQL within Oracle More Investment, More Innovation ... 20 Years MySQL … 10 Years InnoDB of Oracle Stewardship … 5 Years MySQL within Oracle 2x Engineering Staff 3x QA Staff Dez 2009 2x Support Staff May 2015 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 3 Source: http://db-engines.com/en/ranking Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Source: http://db-engines.com/en/ranking Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Driving MySQL Innovation Year 2010 – 2013 (from MySQL Release 5.1 to MySQL Release 5.6) MySQL Enterprise Monitor 2.2 MySQL Cluster Manager 1.1 MySQL Enterprise Backup 3.7 MySQL Database 5.6 MySQL Cluster 7.1 Oracle VM Template for MySQL MySQL Cluster 7.2 MySQL Utilities 1.3 MySQL Cluster Manager 1.0 Enterprise Edition MySQL Cluster Manager 1.2 MySQL Cluster 7.3 MySQL Workbench 5.2 MySQL Enterprise Oracle Certifications MySQL Utilities 1.0 MySQL Workbench 6.0 MySQL Database 5.5 MySQL Windows Installer MySQL Migration Wizard MySQL Enterprise Monitor 3.0 MySQL Enterprise Backup 3.5 MySQL Enterprise Security MySQL for Excel 1.0 / 1.1 MySQL Enterprise Backup 3.9 MySQL Enterprise Monitor 2.3 MySQL Enterprise Scalability MySQL Enterprise Backup 3.8 MySQL Yum Linux repository MySQL Enterprise Audit MySQL Enterprise HA (DRBD) All GA! - 2010 All GA! - 2011 All GA! - 2012 All GA! - 2013 and Connector/ODBC, Connector/PHP, Connector/Net, Connector/J, Connector Python, Connector /C++, Connector/C, Ruby Driver … Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Driving MySQL Innovation (Fall 2015) Year 2014 Year 2015 New Data Dictionary: Replacing FRMs MySQL Cluster Manager 1.3 Optimizer improvements, Cost model MySQL Workbench 6.1 & 6.2 5.7.1 MySQL HTTP Plugin MySQL for Excel 1.2 & 1.3 5.7.2 MySQL Multi-source Replication MySQL Enterprise Backup 3.10, 3.11, 312 5.7.3 Intra-Schema Multi-Threaded Slave 5.7.4 Oracle Clusterware XAG Agent for MySQL MySQL Group Replication 5.7.5 MySQL Utilities / Fabric 1.4 & 1.5 MySQL JSON UDFs 5.7.6 MySQL Enterprise Manager Plugin (EM 12c) MySQL Applier for Hadoop 5.7.7 (RC1) MYSQL Enterprise Backup 3.11 5.7.8 (RC2) MySQL Enterprise Encryption 5.7.9 GA Latest: MySQL 5.5.45 / 5.6.26 MySQL Cluster 7.2.21/7.3.10/7.4.7 MySQL Labs – 2014/2015 DMR* 2013/2014/2015 *Development Milestone Release GA! And of course … Connector/ODBC, Connector/PHP, Connector/Net, Connector/J, Connector Python, Connector /C++, Connector/C, Ruby Driver Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL – The view from the moon • MySQL < 5.0/5.1 [pre Oracle] - MyISAM default, InnoDB optional Before 2010 - Very often defaults in Linux distributions • MySQL 5.5 more ‘SQLish’ - First release under Oracle Dec 2010 - InnoDB default (MVCC, ACID), MyISAM optional - MS Windows optimized • MySQL 5.6 Replication revamp - InnoDB+, GTID, NoSQL, Performance SchemaIn Feb 2013 - Used by some of the biggest Websites - Introduction of MySQL Fabric • MySQL 5.7 New ways … - InnoDB++, GIS Support, QRP, Instrinc Tables 2015 (NoSQL and JSON) - MultiThreaded Sls, MultiSourceRpl, Group Rpl - MySQL Fabric, SemiSync+ Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 8 Agenda 1 MySQL within Oracle 2 Overview of MySQL architecture 3 Inside MySQL 4 Commercial MySQL vs. „Open Source“ MySQL 5 MySQL Subscription / MySQL License 6 A MySQL Reference 7 Questions and Answers Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 9 Server runs on MS Windows, MySQL Database Linux, Solaris and others OSes Efficient multi- Support for common threaded session development handling languages/platforms Full DML, DDL parsing, cost based optimizer, caching of queries and result sets Flexible Storage Engine InnoDB Default! ACID Transactions, Crash Recovery, Foreign Keys, Up to 64 TByte Flexible logging and physical storage options Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL 5.7 Sysbench Benchmark: OLTP Read Write 1.5x Faster than MySQL 5.6 3x Faster than MySQL 5.5 MySQL 5.7: Sysbench OLTP Read Write 700.000 600.000 MySQL 5.7 500.000 400.000 MySQL 5.6 300.000 200.000 Queries per Second per Queries MySQL 5.5 100.000 0 8 16 32 64 128 256 512 1.024 Intel(R) Xeon(R) CPU E7-8890 v3 Connections 4 sockets x 18 cores-HT (144 CPU threads) 2.5 Ghz, 512GB RAM Linux kernel 3.16 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 11 MySQL 5.7: InnoDB Improvements - Sysbench Benchmark Scaling with InnoDB, 5.6 (up to 48 CPUs*) vs. 5.7 (beyond 72 CPUs*) * CPU Cores-HT MySQL 5.7: Sysbench – OLTP Read Write 700.000 600.000 MySQL 5.7 500.000 MySQL 5.6 400.000 300.000 MySQL 5.5 Queries per Second per Queries 200.000 100.000 0 18 36 72 Intel(R) Xeon(R) CPU E7-8890 v3 CPU Cores – HT 4 sockets x 18 cores-HT (144 CPU threads) 2.5 Ghz, 512GB RAM Linux kernel 3.16 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL Replication (HA’) • Native to MySQL, Duplicates updates from a “master” to a “slave” • Failover is either scripted or provided by additional middleware • Supports Asynchronous and Semi-Synchronous replication • Most common solution for HA – Used to scale out as well Web / App Servers Writes & Reads Reads Master Master Status & Administration Switchover Utility Slaves Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | MySQL Fabric 1.5 (HA’’) High Availability • High Availability Application Application – Server monitoring with auto-promotion and transparent application failover Connector Connector • Fabric-aware connectors: MySQL Fabric Python, Java, PHP (lim. HA yet), .NET, C (labs) • Or MySQL Router (DMR) Read-slaves HA group Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 14 MySQL 5.6 / 5.7: InnoDB, NoSQL (Memcached) 6x Faster than MySQL 5.6 1 Million QPS MySQL 5.7 vs 5.6 - InnoDB & Memcached 1.200.000 MySQL 1.000.000 5.7 800.000 600.000 400.000 MySQL 200.000 5.6 Queries per Second per Queries 0 8 16 32 64 128 256 512 1.024 Connections Same app can leverage: . Key-value access to InnoDB via Memcached API Intel(R) Xeon(R) CPU E7-4860 x86_64 4 sockets x 10 cores-HT (80 CPU threads) . SQL for rich queries, fully transactional 2.3 GHz, 512 GB RAM Oracle Linux 6.5 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 15 MySQL 5.7: JSON • Native JSON data type – Native internal binary format for efficient processing & storage • Built-in JSON functions – Allowing you to efficiently store, search, update, and manipulate Documents • Indexing of Documents using Generated Columns – InnoDB supports indexes on both stored and virtual Generated Columns • New inline syntax for easy SQL integration # as JSON type from 206k document SELECT DISTINCT feature->"$.type" as json_extract FROM devices; +--------------+ | json_extract | +--------------+ | "Feature" | +--------------+ 1 row in set (1.25 sec) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 16 The perfect MySQL Server … it’s 2015 . Choice of Operating system – Linux or Windows or Solaris or … ? . MySQL in virtual environments or within Cloud Environments? . Does a server with more than >>80 CPU Threads make sense? . InnoDB loves Memory, (DB size + Index) < available Memory . Fast HD or SSD or RAID10? . Own disk/partition for MySQL data (EXT4 and XFS if possible)? . Dedicated NICs for Replication? Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Agenda 1 MySQL within Oracle 2 Overview of MySQL architecture 3 Inside MySQL 4 Commercial MySQL vs. „Open Source“ MySQL 5 MySQL Subscription / MySQL License 6 A MySQL Reference 7 Questions and Answers Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 18 MySQL wording • Database Schema – Points (normally) to /var/lib/mysql • InnoDB Buffer Pool → Database Buffer Cache – innodb_buffer_pool_size • InnoDB Log File → Redo Logs – innodb_log_file_size • InnoDB System Tablespace (ibdata1) • InnoDB TS Konzept (innodb_file_per_table): – alles im System TS (default bis 5.5) – 1x Tablespace pro Tabelle (default ab 5.6) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Settings See: http://www.fromdual.com/mysql-configuration-file-sample • my.cnf or my.ini (Linux/Win) • Check /etc/ oder /etc/mysql • Check C:\ProgramData\MySQL • innodb_flush_log_at_trx_commit (InnoDB) • innodb_buffer_pool_size (InnoDB) • innodb_log_file_size (InnoDB) • key_buffer_size (MyISAM) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Access MySQL • CLI vs. GUI (check next slides) – CLI: mysql Oracle: SQL*Plus shell> mysql --user=... --password=... --host=... -- port=... Database mysql> help – GUI: MySQL Enterprise Workbench (WB) • Administration (Backup, Monitoring, ...) • Entwicklung (SQL, Migration) • Designer (ER-Diagramme) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 21 Access MySQL MySQL Workbench EE New! Database Migration Wizard • Administration for SQL Server, Sybase, SQLite, SQL Anywhere & PostgreSQL – Start Stop, Backup, Monitoring • Development • ER-Diagrams • Database migrations – From Microsoft SQL Server, PostgreSQL, Sybase ASE, Sybase SQL Anywhere, SQLite, Microsoft Access, and more Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 22 Examples • show databases; show tables; • use database; e.g. use world; • show processlist; • select user, host from mysql.user; • show grants for user@host; e.g. show grants for [email protected]; • show global variables\G; • show global status; • show engines; Copyright © 2014, Oracle and/or its affiliates.