SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Demystifying MySQL for Oracle DBAs
and Developers
https://www.facebook.com/groups/hkmysqlusergroup/
Ivan Ma
ivanxma@yahoo.com
2015-06-26
February 2015
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.
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 2
Who am I [ Ivan Ma ]
• MySQL User Group Lead in Hong Kong
• 20+ years of experience in enterprise system infrastructure and software
technologies.
• Certified on MySQL
– MySQL DBA 5.6, MySQL DBA 5.1,
– MySQL Developer 5.1 and MySQL Cluster 5.1 DBA.
• MySQL HK blogging
– http://mysqlhk.blogspot.hk/
https://www.facebook.com/groups/hkmysqlusergroup/
Overview
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 4
Mystery of MySQL
•Installation & Configuration
•Performance, Performance, Performance
•MySQL and NoSQL
• Linux / Unix (rpm & tar/zip/gz) Securing the Initial MySQL DB
Running the command
- > mysql_secure_installation
• Assign root passwod
• Remove root user from remote
access
• Remove guest account
• Remove test database
February 2015 5
Installation & Configuration
Copyright 2015, oracle and/or its affiliates. All rights reserved
MySQL Performance Tips
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 6
It is the balance, trade-off and priority
Resource
Cost
Performance
Complexity
CPU
IO
Performance
Memory
Performance Tips 01
• Knowing your system behavior and simulate the workload
• Benchmarking and monitoring
– To measure and define the baseline
– System Performance + DB Performance + App Performance
• What tools are available
– To Measure & monitor
• MySQL Enterprise Monitor
• Performance Schema
– Your testing tools / Your applications (Benchmarking)
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 7
MySQL Enterprise Monitor
• A fantastic tool!!!
– Have you seen this… Try it…. Running Live….
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 8
MySQL Workbench
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 9
Performance Schema
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 10
Performance Schema – A gold mine with performance data
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 11
MySQL Workbench and Performance Schema
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 12
MySQL Workbench and Performance Schema
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 13
MySQL Workbench and Performance Schema
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 14
Performance Tips 02
• Do it RIGHT at the beginning
– There is no definite answer otherwise, the system running out-of-the-box should fit
everything.
– No ONE size fit all scenario
• But at least try to get the best/optimal config as good as possible
– More physical resources (CPU, RAM, FAST DISK, NETWORK)
• Question : What is the Optimal : You do not want to provision more than enough (COST)
• In General TODAY – CPU <Start with small, enough, and RAM is cheap, FAST DISK/SSD– possibly,
network should be okay).
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 15
Think ‘Database Performance’ at the beginning!
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 16
Performance Tips 03
Operating System –
– Solaris, Linux, Windows,
– ulimit,
– cpu affinity like using taskset command on linux
• taskset –c 1-4 `pidof mysqld`
– Solaris (Containers, project, task…)
File System
– ZFS, UFS
– XFS, EXT4, EXT3
– NFS..
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 17
Warning
It is not a good idea to configure InnoDB to use
data files or log files on NFS volumes. Otherwise,
the files might be locked by other processes and
become unavailable for use by MySQL.
https://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html
Performance Tips 04
• 90% people may be using single disk
• What-if having several disks,
– One disk is not good enough
– Separate disk for different uses
• Random IO/SSD/Fast IO
– datadir
– innodb_data_home_dir
– innodb_undo_directory
• Sequential, spinning
– innodb_log_group_home_dir
– log-bin
• tmpdir (Memory, Random, tmpfs, SSD)
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 18
Performance Tips 05
• Use Thread Pool (if you have the
Enterprise Edition)
• Stable TPS for high concurrency
• Useful if high concurrency >
hardware threads
• Decreases Context Switching
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 19
Performance Tips 06
• Compare the rows examined and rows sent.
• Using Performance Schema to identify the query with the pattern
– SELECT abs(SUM_ROWS_EXAMINED - SUM_ROWS_SENT ), digest_text FROM
performance_schema.events_statements_summary_by_digest order by 1 desc;
– SELECT * FROM performance_schema.events_statements_summary_by_digest
where SUM_ROWS_EXAMINED > 10 * SUM_ROWS_SENT;
– Missing indexes?
– Requiring tuning?
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 20
Performance Tips 07
• Innodb IO Capacity
– The default value is 200, reflecting that the performance of typical modern I/O
devices is higher than in the early days of MySQL.
– Higher value depending of the storage – RAID, SSD
• The innodb_flush_sync configuration option, introduced in MySQL 5.7.8,
causes the innodb_io_capacity setting to be ignored during bursts of I/O
activity that occur at checkpoints. innodb_flush_sync is enabled by default.
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 21
http://dev.mysql.com/doc/refman/5.6/en/innodb-performance-thread_io_rate.html
Performance Tips 08
• Innodb Read Only Transaction Performance
– Start Transaction READ ONLY or AUTOCOMMIT is ON
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 22
https://dev.mysql.com/doc/refman/5.6/en/innodb-
performance-ro-txn.html
Performance Tips 09
• Open & Close Files – table_open_cache & table_open_cache_instance
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 23
http://dimitrik.free.fr/blog/archives/2012/09/mysql-
performance-table-open-cache-in-56.html
Configuration
February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 24
Watch out for your machine - # of
cores to match the concurrency and
thread
Still a role for the RDBMS?
NoSQL
Simple access patterns
Compromise on consistency
for performance
Ad-hoc data format
Simple operation
RDBMS
Complex queries with joins
ACID transactions
Well defined schemas
Rich set of tools
• No best single solution fits all
• Mix and match
Scalability
Performance
HA
Ease of use
SQL/Joins
ACID Transactions
MySQL 5.6 Memcached with InnoDB
0
10000
20000
30000
40000
50000
60000
70000
80000
8 32 128 512
TPS
Client Connections
MySQL 5.6: NoSQL Benchmarking
Memcached
API
SQL
Clients and Applications
MySQL Server
Memcached Plug-in
innodb_
memcached
local cache
(optional)
Handler API InnoDB API
InnoDB Storage Engine
mysqld process
SQL Memcached Protocol
Up to 9x Higher “SET / INSERT” Throughput
NoSQL Access to MySQL Cluster data
ClusterJ
MySQL
JDBC
Apps
JPA
JNI
Python Ruby
ClusterJPA
Apps Apps Apps Apps Apps
Node.js
JS
Apps
mod-ndb
Apache
Apps
ndb-eng
Memcached
Apps Apps
NDB API (C++)
MySQL Cluster Data Nodes
Apps
PHP PERL
Apps
• Memcached is a distributed memory based hash-
key/value store with no persistence to disk
• NoSQL, simple API, popular with developers
• MySQL Cluster already provides scalable, in-memory
performance with NoSQL (hashed) access as well as
persistence
• Provide the Memcached API but map to NDB API
calls
• Writes-in-place, so no need to invalidate cache
• Simplifies architecture as caching & database integrated
into 1 tier
• Access data from existing relational tables
MySQL Cluster : Memcached
NoSQL with Memcached
• Flexible:
– Deployment options
– Multiple Clusters
– Simultaneous SQL Access
– Can still cache in Memcached server
– Flat key-value store or map to multiple tables/columns
set maidenhead 0 0 3
SL6
STORED
get maidenhead
VALUE maidenhead 0 3
SL6
END
• Domain Object Model Persistence API (ClusterJ):
• Java API
• High performance, low latency
• 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
MySQL Cluster : ClusterJ/JPA
Join Hong Kong MySQL
User Group
Summary
Resource
http://www.mysql.com/why-mysql/
Download
http://www.mysql.com/downloads/
Lab Release
http://labs.mysql.com/
Forum
http://forums.mysql.com/
https://www.facebook.com/groups/hkmysqlusergroup/
Demystifying MySQL for Oracle DBAs
and Developers
https://www.facebook.com/groups/hkmysqlusergroup/
Ivan Ma
ivanxma@yahoo.com
2015-06-26
February 2015

Weitere ähnliche Inhalte

Was ist angesagt?

MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)Ryusuke Kajiyama
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech UpdatesRyusuke Kajiyama
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility SolutionsMark Swarbrick
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsMario Beck
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...GeneXus
 
TWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RCTWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RCRyusuke Kajiyama
 
TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"Ryusuke Kajiyama
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7MySQL Brasil
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em StartupsMySQL Brasil
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)Mario Beck
 
MySQL HA Alternatives 2010
MySQL  HA  Alternatives 2010MySQL  HA  Alternatives 2010
MySQL HA Alternatives 2010Kris Buytaert
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMark Swarbrick
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMark Swarbrick
 
MySQL Enterprise Edition Overview
MySQL Enterprise Edition OverviewMySQL Enterprise Edition Overview
MySQL Enterprise Edition OverviewMario Beck
 
MySQL Manchester TT - Replication Features
MySQL Manchester TT  - Replication FeaturesMySQL Manchester TT  - Replication Features
MySQL Manchester TT - Replication FeaturesMark Swarbrick
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterOlivier DASINI
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMark Swarbrick
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document StoreMario Beck
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0Ståle Deraas
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL ScalabilityRonald Bradford
 

Was ist angesagt? (20)

MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)
 
20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates20140722 Taiwan MySQL User Group Meeting Tech Updates
20140722 Taiwan MySQL User Group Meeting Tech Updates
 
MySQL High Availibility Solutions
MySQL High Availibility SolutionsMySQL High Availibility Solutions
MySQL High Availibility Solutions
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
TWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RCTWJUG August, What's new in MySQL 5.7 RC
TWJUG August, What's new in MySQL 5.7 RC
 
TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)MySQL for Software-as-a-Service (SaaS)
MySQL for Software-as-a-Service (SaaS)
 
MySQL HA Alternatives 2010
MySQL  HA  Alternatives 2010MySQL  HA  Alternatives 2010
MySQL HA Alternatives 2010
 
MySQL Intro JSON NoSQL
MySQL Intro JSON NoSQLMySQL Intro JSON NoSQL
MySQL Intro JSON NoSQL
 
MySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt IntroMySQL Tech Tour 2015 - Alt Intro
MySQL Tech Tour 2015 - Alt Intro
 
MySQL Enterprise Edition Overview
MySQL Enterprise Edition OverviewMySQL Enterprise Edition Overview
MySQL Enterprise Edition Overview
 
MySQL Manchester TT - Replication Features
MySQL Manchester TT  - Replication FeaturesMySQL Manchester TT  - Replication Features
MySQL Manchester TT - Replication Features
 
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB ClusterMySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
 
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/NetMySQL Tech Tour 2015 - 5.7 Connector/J/Net
MySQL Tech Tour 2015 - 5.7 Connector/J/Net
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
Upgrading to my sql 8.0
Upgrading to my sql 8.0Upgrading to my sql 8.0
Upgrading to my sql 8.0
 
Successful MySQL Scalability
Successful MySQL ScalabilitySuccessful MySQL Scalability
Successful MySQL Scalability
 

Andere mochten auch

New Sales Navigator Onboarding
New Sales Navigator OnboardingNew Sales Navigator Onboarding
New Sales Navigator OnboardingAnnie Stankevich
 
Таргетированная реклама для мероприятий с ограниченным бюджетом
Таргетированная реклама для мероприятий с ограниченным бюджетомТаргетированная реклама для мероприятий с ограниченным бюджетом
Таргетированная реклама для мероприятий с ограниченным бюджетомДарья Борисенко
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschemaIvan Ma
 
Capturing and documenting business processes and rules for agility
Capturing and documenting business processes and rules for agilityCapturing and documenting business processes and rules for agility
Capturing and documenting business processes and rules for agilityMichael Moyal - BPM Consultant
 

Andere mochten auch (11)

Apresentação
ApresentaçãoApresentação
Apresentação
 
CREP-AT
CREP-ATCREP-AT
CREP-AT
 
My magazine
My magazineMy magazine
My magazine
 
My song
My songMy song
My song
 
New Sales Navigator Onboarding
New Sales Navigator OnboardingNew Sales Navigator Onboarding
New Sales Navigator Onboarding
 
MelnikK
MelnikKMelnikK
MelnikK
 
My magazine
My magazine My magazine
My magazine
 
Таргетированная реклама для мероприятий с ограниченным бюджетом
Таргетированная реклама для мероприятий с ограниченным бюджетомТаргетированная реклама для мероприятий с ограниченным бюджетом
Таргетированная реклама для мероприятий с ограниченным бюджетом
 
Khursaniyah Project Brochure
Khursaniyah Project BrochureKhursaniyah Project Brochure
Khursaniyah Project Brochure
 
20150110 my sql-performanceschema
20150110 my sql-performanceschema20150110 my sql-performanceschema
20150110 my sql-performanceschema
 
Capturing and documenting business processes and rules for agility
Capturing and documenting business processes and rules for agilityCapturing and documenting business processes and rules for agility
Capturing and documenting business processes and rules for agility
 

Ähnlich wie 01 demystifying mysq-lfororacledbaanddeveloperv1

My sql cluster case study apr16
My sql cluster case study apr16My sql cluster case study apr16
My sql cluster case study apr16Sumi Ryu
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL Brasil
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLMario Beck
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance TuningMark Swarbrick
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsBen Krug
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 Geir Høydalsvik
 
MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksDave Stokes
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4Frazer Clement
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015Sanjay Manwani
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Ivan Ma
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMario Beck
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL Brasil
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7Olivier DASINI
 
MySQL Tech Tour 2015 - 5.7 InnoDB
MySQL Tech Tour 2015 - 5.7 InnoDBMySQL Tech Tour 2015 - 5.7 InnoDB
MySQL Tech Tour 2015 - 5.7 InnoDBMark Swarbrick
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarAndrew Morgan
 
Oracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterOracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterBenedita Paúl Vasconcelos
 
6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance TuningOracleMySQL
 

Ähnlich wie 01 demystifying mysq-lfororacledbaanddeveloperv1 (20)

My sql cluster case study apr16
My sql cluster case study apr16My sql cluster case study apr16
My sql cluster case study apr16
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
 
MySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disksMySql's NoSQL -- best of both worlds on the same disks
MySql's NoSQL -- best of both worlds on the same disks
 
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
200 million qps on commodity hardware : Getting started with MySQL Cluster 7.4
 
My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015My sql5.7 whatsnew_presentedatgids2015
My sql5.7 whatsnew_presentedatgids2015
 
Exploring mysql cluster 7.4
Exploring mysql cluster 7.4Exploring mysql cluster 7.4
Exploring mysql cluster 7.4
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
 
What's New in MySQL 5.7
What's New in MySQL 5.7What's New in MySQL 5.7
What's New in MySQL 5.7
 
MySQL Tech Tour 2015 - 5.7 InnoDB
MySQL Tech Tour 2015 - 5.7 InnoDBMySQL Tech Tour 2015 - 5.7 InnoDB
MySQL Tech Tour 2015 - 5.7 InnoDB
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
Oracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL ClusterOracle OpenWorld - Getting started with MySQL Cluster
Oracle OpenWorld - Getting started with MySQL Cluster
 
6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning6 Tips to MySQL Performance Tuning
6 Tips to MySQL Performance Tuning
 

Mehr von Ivan Ma

Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonIvan Ma
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shellIvan Ma
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deploymentIvan Ma
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1Ivan Ma
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharingIvan Ma
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2Ivan Ma
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8Ivan Ma
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1Ivan Ma
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017Ivan Ma
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017Ivan Ma
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3Ivan Ma
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01Ivan Ma
 
Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Ivan Ma
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2aIvan Ma
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptxIvan Ma
 

Mehr von Ivan Ma (15)

Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
20200613 my sql-ha-deployment
20200613 my sql-ha-deployment20200613 my sql-ha-deployment
20200613 my sql-ha-deployment
 
20191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv120191001 bkk-secret-of inno-db_clusterv1
20191001 bkk-secret-of inno-db_clusterv1
 
20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing20190817 coscup-oracle my sql innodb cluster sharing
20190817 coscup-oracle my sql innodb cluster sharing
 
20190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev220190615 hkos-mysql-troubleshootingandperformancev2
20190615 hkos-mysql-troubleshootingandperformancev2
 
20180420 hk-the powerofmysql8
20180420 hk-the powerofmysql820180420 hk-the powerofmysql8
20180420 hk-the powerofmysql8
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
MySQL InnoDB Cluster and MySQL Group Replication @HKOSC 2017
 
What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017What's New in MySQL 8.0 @ HKOSC 2017
What's New in MySQL 8.0 @ HKOSC 2017
 
20161029 py con-mysq-lv3
20161029 py con-mysq-lv320161029 py con-mysq-lv3
20161029 py con-mysq-lv3
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
 
Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07Hkosc group replication-lecture_lab07
Hkosc group replication-lecture_lab07
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
 

Kürzlich hochgeladen

NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...Amil Baba Dawood bangali
 
Zoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a trainingZoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a trainingRafik ABDI
 
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...Amil Baba Dawood bangali
 
Princess Jahan's Tuition Classes, a story for entertainment
Princess Jahan's Tuition Classes, a story for entertainmentPrincess Jahan's Tuition Classes, a story for entertainment
Princess Jahan's Tuition Classes, a story for entertainmentazuremorn
 
Taken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch DocumentTaken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch Documentf4ssvxpz62
 
ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024
ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024
ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024Durkin Entertainment LLC
 
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand FinaleBiswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand FinaleQui9 (Ultimate Quizzing)
 
Statement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfileStatement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfilef4ssvxpz62
 
Aesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptxAesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptxsayemalkadripial4
 
THE MEDIC, A STORY for entertainment.docx
THE MEDIC, A STORY for entertainment.docxTHE MEDIC, A STORY for entertainment.docx
THE MEDIC, A STORY for entertainment.docxazuremorn
 
Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...
Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...
Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...TeslaStakeHolder
 
A Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' Mother
A Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' MotherA Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' Mother
A Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' Motherget joys
 
Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...
Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...
Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...Amil baba
 
What Life Would Be Like From A Different Perspective (saltyvixenstories.com)
What Life Would Be Like From A Different Perspective (saltyvixenstories.com)What Life Would Be Like From A Different Perspective (saltyvixenstories.com)
What Life Would Be Like From A Different Perspective (saltyvixenstories.com)Salty Vixen Stories & More
 
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书zdzoqco
 
Fight Scene Storyboard (Action/Adventure Animation)
Fight Scene Storyboard (Action/Adventure Animation)Fight Scene Storyboard (Action/Adventure Animation)
Fight Scene Storyboard (Action/Adventure Animation)finlaygoodall2
 

Kürzlich hochgeladen (20)

NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
NO1 Certified Black magic specialist,Expert in Pakistan Amil Baba kala ilam E...
 
Zoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a trainingZoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a training
 
Moveable Feast_Travel-Lifestyle-Culture Quiz.pptx
Moveable Feast_Travel-Lifestyle-Culture Quiz.pptxMoveable Feast_Travel-Lifestyle-Culture Quiz.pptx
Moveable Feast_Travel-Lifestyle-Culture Quiz.pptx
 
S10_E02_How to Pimp Social Media 101.pptx
S10_E02_How to Pimp Social Media 101.pptxS10_E02_How to Pimp Social Media 101.pptx
S10_E02_How to Pimp Social Media 101.pptx
 
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
NO1 Certified kala ilam Expert In Peshwar Kala Jadu Specialist In Peshwar Kal...
 
Princess Jahan's Tuition Classes, a story for entertainment
Princess Jahan's Tuition Classes, a story for entertainmentPrincess Jahan's Tuition Classes, a story for entertainment
Princess Jahan's Tuition Classes, a story for entertainment
 
Taken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch DocumentTaken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch Document
 
ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024
ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024
ECOLUXE pre-ESPYS Ultimate Sports Lounge 2024
 
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand FinaleBiswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
Biswanath Byam Samiti Open Quiz 2022 by Qui9 Grand Finale
 
Statement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfileStatement Of Intent - - Copy.documentfile
Statement Of Intent - - Copy.documentfile
 
Aesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptxAesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptx
 
THE MEDIC, A STORY for entertainment.docx
THE MEDIC, A STORY for entertainment.docxTHE MEDIC, A STORY for entertainment.docx
THE MEDIC, A STORY for entertainment.docx
 
Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...
Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...
Flying Avocado Cat Cryptocurrency Created, Coded, Generated and Named by Grok...
 
A Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' Mother
A Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' MotherA Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' Mother
A Spotlight on Darla Leigh Pittman Rodgers: Aaron Rodgers' Mother
 
Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...
Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...
Uk-NO1 Amil In Karachi Best Amil In Karachi Bangali Baba In Karachi Aamil In ...
 
What Life Would Be Like From A Different Perspective (saltyvixenstories.com)
What Life Would Be Like From A Different Perspective (saltyvixenstories.com)What Life Would Be Like From A Different Perspective (saltyvixenstories.com)
What Life Would Be Like From A Different Perspective (saltyvixenstories.com)
 
S10_E06-Sincerely,The Friday Club- Prelims Farewell Quiz.pptx
S10_E06-Sincerely,The Friday Club- Prelims Farewell Quiz.pptxS10_E06-Sincerely,The Friday Club- Prelims Farewell Quiz.pptx
S10_E06-Sincerely,The Friday Club- Prelims Farewell Quiz.pptx
 
Sincerely, The Friday Club - Farewell Quiz-Finals.pptx
Sincerely, The Friday Club - Farewell Quiz-Finals.pptxSincerely, The Friday Club - Farewell Quiz-Finals.pptx
Sincerely, The Friday Club - Farewell Quiz-Finals.pptx
 
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
 
Fight Scene Storyboard (Action/Adventure Animation)
Fight Scene Storyboard (Action/Adventure Animation)Fight Scene Storyboard (Action/Adventure Animation)
Fight Scene Storyboard (Action/Adventure Animation)
 

01 demystifying mysq-lfororacledbaanddeveloperv1

  • 1. Demystifying MySQL for Oracle DBAs and Developers https://www.facebook.com/groups/hkmysqlusergroup/ Ivan Ma ivanxma@yahoo.com 2015-06-26 February 2015
  • 2. 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. February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 2
  • 3. Who am I [ Ivan Ma ] • MySQL User Group Lead in Hong Kong • 20+ years of experience in enterprise system infrastructure and software technologies. • Certified on MySQL – MySQL DBA 5.6, MySQL DBA 5.1, – MySQL Developer 5.1 and MySQL Cluster 5.1 DBA. • MySQL HK blogging – http://mysqlhk.blogspot.hk/ https://www.facebook.com/groups/hkmysqlusergroup/
  • 4. Overview February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 4 Mystery of MySQL •Installation & Configuration •Performance, Performance, Performance •MySQL and NoSQL
  • 5. • Linux / Unix (rpm & tar/zip/gz) Securing the Initial MySQL DB Running the command - > mysql_secure_installation • Assign root passwod • Remove root user from remote access • Remove guest account • Remove test database February 2015 5 Installation & Configuration Copyright 2015, oracle and/or its affiliates. All rights reserved
  • 6. MySQL Performance Tips February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 6 It is the balance, trade-off and priority Resource Cost Performance Complexity CPU IO Performance Memory
  • 7. Performance Tips 01 • Knowing your system behavior and simulate the workload • Benchmarking and monitoring – To measure and define the baseline – System Performance + DB Performance + App Performance • What tools are available – To Measure & monitor • MySQL Enterprise Monitor • Performance Schema – Your testing tools / Your applications (Benchmarking) February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 7
  • 8. MySQL Enterprise Monitor • A fantastic tool!!! – Have you seen this… Try it…. Running Live…. February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 8
  • 9. MySQL Workbench February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 9
  • 10. Performance Schema February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 10
  • 11. Performance Schema – A gold mine with performance data February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 11
  • 12. MySQL Workbench and Performance Schema February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 12
  • 13. MySQL Workbench and Performance Schema February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 13
  • 14. MySQL Workbench and Performance Schema February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 14
  • 15. Performance Tips 02 • Do it RIGHT at the beginning – There is no definite answer otherwise, the system running out-of-the-box should fit everything. – No ONE size fit all scenario • But at least try to get the best/optimal config as good as possible – More physical resources (CPU, RAM, FAST DISK, NETWORK) • Question : What is the Optimal : You do not want to provision more than enough (COST) • In General TODAY – CPU <Start with small, enough, and RAM is cheap, FAST DISK/SSD– possibly, network should be okay). February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 15
  • 16. Think ‘Database Performance’ at the beginning! February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 16
  • 17. Performance Tips 03 Operating System – – Solaris, Linux, Windows, – ulimit, – cpu affinity like using taskset command on linux • taskset –c 1-4 `pidof mysqld` – Solaris (Containers, project, task…) File System – ZFS, UFS – XFS, EXT4, EXT3 – NFS.. February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 17 Warning It is not a good idea to configure InnoDB to use data files or log files on NFS volumes. Otherwise, the files might be locked by other processes and become unavailable for use by MySQL. https://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html
  • 18. Performance Tips 04 • 90% people may be using single disk • What-if having several disks, – One disk is not good enough – Separate disk for different uses • Random IO/SSD/Fast IO – datadir – innodb_data_home_dir – innodb_undo_directory • Sequential, spinning – innodb_log_group_home_dir – log-bin • tmpdir (Memory, Random, tmpfs, SSD) February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 18
  • 19. Performance Tips 05 • Use Thread Pool (if you have the Enterprise Edition) • Stable TPS for high concurrency • Useful if high concurrency > hardware threads • Decreases Context Switching February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 19
  • 20. Performance Tips 06 • Compare the rows examined and rows sent. • Using Performance Schema to identify the query with the pattern – SELECT abs(SUM_ROWS_EXAMINED - SUM_ROWS_SENT ), digest_text FROM performance_schema.events_statements_summary_by_digest order by 1 desc; – SELECT * FROM performance_schema.events_statements_summary_by_digest where SUM_ROWS_EXAMINED > 10 * SUM_ROWS_SENT; – Missing indexes? – Requiring tuning? February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 20
  • 21. Performance Tips 07 • Innodb IO Capacity – The default value is 200, reflecting that the performance of typical modern I/O devices is higher than in the early days of MySQL. – Higher value depending of the storage – RAID, SSD • The innodb_flush_sync configuration option, introduced in MySQL 5.7.8, causes the innodb_io_capacity setting to be ignored during bursts of I/O activity that occur at checkpoints. innodb_flush_sync is enabled by default. February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 21 http://dev.mysql.com/doc/refman/5.6/en/innodb-performance-thread_io_rate.html
  • 22. Performance Tips 08 • Innodb Read Only Transaction Performance – Start Transaction READ ONLY or AUTOCOMMIT is ON February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 22 https://dev.mysql.com/doc/refman/5.6/en/innodb- performance-ro-txn.html
  • 23. Performance Tips 09 • Open & Close Files – table_open_cache & table_open_cache_instance February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 23 http://dimitrik.free.fr/blog/archives/2012/09/mysql- performance-table-open-cache-in-56.html
  • 24. Configuration February 2015 Copyright 2015, oracle and/or its affiliates. All rights reserved 24 Watch out for your machine - # of cores to match the concurrency and thread
  • 25.
  • 26. Still a role for the RDBMS? NoSQL Simple access patterns Compromise on consistency for performance Ad-hoc data format Simple operation RDBMS Complex queries with joins ACID transactions Well defined schemas Rich set of tools • No best single solution fits all • Mix and match Scalability Performance HA Ease of use SQL/Joins ACID Transactions
  • 27. MySQL 5.6 Memcached with InnoDB 0 10000 20000 30000 40000 50000 60000 70000 80000 8 32 128 512 TPS Client Connections MySQL 5.6: NoSQL Benchmarking Memcached API SQL Clients and Applications MySQL Server Memcached Plug-in innodb_ memcached local cache (optional) Handler API InnoDB API InnoDB Storage Engine mysqld process SQL Memcached Protocol Up to 9x Higher “SET / INSERT” Throughput
  • 28. NoSQL Access to MySQL Cluster data ClusterJ MySQL JDBC Apps JPA JNI Python Ruby ClusterJPA Apps Apps Apps Apps Apps Node.js JS Apps mod-ndb Apache Apps ndb-eng Memcached Apps Apps NDB API (C++) MySQL Cluster Data Nodes Apps PHP PERL Apps
  • 29. • Memcached is a distributed memory based hash- key/value store with no persistence to disk • NoSQL, simple API, popular with developers • MySQL Cluster already provides scalable, in-memory performance with NoSQL (hashed) access as well as persistence • Provide the Memcached API but map to NDB API calls • Writes-in-place, so no need to invalidate cache • Simplifies architecture as caching & database integrated into 1 tier • Access data from existing relational tables MySQL Cluster : Memcached
  • 30. NoSQL with Memcached • Flexible: – Deployment options – Multiple Clusters – Simultaneous SQL Access – Can still cache in Memcached server – Flat key-value store or map to multiple tables/columns set maidenhead 0 0 3 SL6 STORED get maidenhead VALUE maidenhead 0 3 SL6 END
  • 31. • Domain Object Model Persistence API (ClusterJ): • Java API • High performance, low latency • 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 MySQL Cluster : ClusterJ/JPA
  • 32. Join Hong Kong MySQL User Group Summary Resource http://www.mysql.com/why-mysql/ Download http://www.mysql.com/downloads/ Lab Release http://labs.mysql.com/ Forum http://forums.mysql.com/ https://www.facebook.com/groups/hkmysqlusergroup/
  • 33. Demystifying MySQL for Oracle DBAs and Developers https://www.facebook.com/groups/hkmysqlusergroup/ Ivan Ma ivanxma@yahoo.com 2015-06-26 February 2015