SlideShare una empresa de Scribd logo
1 de 41
Descargar para leer sin conexión
<I n s e r t Pi c t u r e H e r e >

M y SQL 5 .6 & M y SQL Cl u s t e r 7 .3
Ov e r v i e w
Oleksii(Alexey) Porytskyi
Senior Principal Consultant
oleksii.porytskyi@oracle.com

1

Copyright © 2012, Oracle and/or its affiliates. All rights reserved.

Insert Information Protection Policy Classification from Slide 12
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
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Agenda – MySQL 5.6 New
Features
• InnoDB
• Performance
• Full-Text Search
• NoSQL
• Optimizer

• MySQL Improvements
• Replication
• Security
3
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.6 SysBench Benchmarks

MySQL 5.6

MySQL 5.5
Oracle Linux 6
Intel(R) Xeon(R) E7540 x86_64
MySQL leveraging:
- 48 of 96 available CPU threads
- 2 GHz, 512GB RAM

Up to 151% Performance Gain
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.6 SysBench Benchmarks

MySQL 5.6

MySQL 5.5

Up to 234% Performance Gain
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Oracle Linux 6
Intel(R) Xeon(R) E7540 x86_64
MySQL leveraging:
- 48 of 96 available
CPU threads
- 2 GHz, 512GB RAM
InnoDB

6
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Performance - Online DDL
• DDL - SQL statements for changing
database
• Automatically commit transactions
• Historically expensive
• 5.6 enhances optimized CREATE
DROP INDEX statements
• The ALTER

TABLE

INDEX

and

process is much faster
7

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Performance - Buffer Pool Pre-loading
• Load buffer pool at startup
• Load buffer pool on command (now)
• Dump buffer pool at shutdown
• Dump buffer pool now
buffer pool

1

(list of pages from pool)

2

3

shutdown - list of pages dumped
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

1,2,3...

1

2

buffer pool

start-up - list of pages reloaded

8
Performance - SSD
Improvements
• 4k and 8k page sizes
• InnoDB Compression
• Portable .ibd (InnoDB data) files
• Separate tablespaces for the InnoDB UNDO
log

9
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Performance – Redo / Undo Logs
• Redo Logs:
• Increased from 4GB to 512GB (1TB total)
• Improves performance of:
• write-heavy workloads
• long-running transactions

• Undo Logs:
• Moves InnoDB UNDO out of system tablespace
• Good candidate to move to SSD
• I/O and memory optimization
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

10
Fulltext Search
• Fulltext search now in InnoDB
• Used with CHAR, VARCHAR or TEXT
mysql> SELECT * FROM articles WHERE MATCH (title,body)
AGAINST ('+MySQL -YourSQL' IN BOOLEAN MODE);
+----+-----------------------+-------------------------------------+
| id | title

| body

|

+----+-----------------------+-------------------------------------+
|

1 | MySQL Tutorial

| DBMS stands for DataBase ...

|

|

3 | How To Use MySQL Well | After you went through a ...

|

|

5 | Optimizing MySQL

| In this tutorial we will show ...

|

|

8 | 1001 MySQL Tricks

| 1. Never run mysqld as root. 2. ... |

+----+-----------------------+-------------------------------------+

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

11
NoSQL
• memcached as a daemon plugin of mysqld
• InnoDB handles memory caching
• ADD, SET, INCR stored to disk

12
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Optimizer Improvements
• Subquery Optimizations
• Index Condition Pushdown
• File Sort Optimization
•

SELECT col1, ... FROM t1 ...

•

ORDER BY name LIMIT 10;

• Batched Key Access (BKA) and Multi-Range
Read (MRR)
• Persistent Optimizer Stats
13
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL Improvements

14
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Other MySQL Improvements
• Remote Binlog Backup
• Server UUID’s
• Fractional seconds for TIME, DATETIME, and
TIMESTAMP
mysql> SELECT MICROSECOND('2010-12-10 14:12:09.219473');
+-------------------------------------------+
| MICROSECOND('2010-12-10 14:12:09.019473') |
+-------------------------------------------+
|

219473 |

+-------------------------------------------+
15
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL Partition Import/Export
• Exchange table partition/sub-partition with nonpartitioned table
• Rows in non-partitioned table must be in the range
of partition/sub-partition
• Foreign keys not supported
• Triggers are not invoked

16
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Replication

17
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Replication I
• Global Transaction ID’s (GTID’s)
• GTID Utilities
• Self-Healing Replication Clusters
• Multi-Threaded Slaves
• Binary Log Group Commit
• Time-delayed replication slaves

18
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Replication II
• Informational Log Events
• Optimized Row-Based Replication
• Crash Safe Slaves and Binlog
• Data Integrity - Replication Event
Checksums
• New MySQL Replication Utilities
• mysqlfailover
• mysqlrpladmin
19
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Security

20
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL Enterprise Audit
• Policy-based auditing
• Logging of connections, logins, query activity
• User defined policies, filtering and log rotation
• Dynamically enabled/disabled: no server restart
• XML-based audit stream
• Version MySQL 5.5.28 and higher
• Adds regulatory compliance to MySQL
applications.
• HIPAA, Sarbanes-Oxley, PCI, etc.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

21
MySQL Enterprise Audit Flow
1. DBA Enables on Server1
3. Joe’s connection, login and query
logged

2. User Joe Connects and Queries Server1

22
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.6 Security Improvements I
•Storing authentication credentials in
.mylogin.cnf
# mysql_config_editor set --login-path=local 
--host=localhost --user=localuser --password

$ ls -la /var/root/.mylogin.cnf
-rw-------

1 root

wheel

136 Aug

8 15:15 .mylogin.cnf

$ file .*cnf
.mylogin.cnf: data
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

23
MySQL 5.6 Security Improvements II
•Stronger encryption for user account
passwords (SHA-256)
[mysqld]
default-authentication-plugin=sha256_password

24
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.6 Security Improvements III
•User password expired column (5.6.6)
mysql> select host, user, password_expired from user where user =
"WebUser" and host = ‘localhost’;
+-------------+---------+------------------+
| host

| user

| password_expired |

+-------------+---------+------------------+
| localhost

| test

| Y

|

+-------------+---------+------------------+
root@MacBook-Tony:~$ mysql --host=localhost -utest -p
Enter password:
mysql> select 1;
ERROR 1820 (HY000): You must SET PASSWORD before executing this
statement
25
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.6 Security Improvements IV
•Provision for establishing password security policy
validate_password.so plugin
[mysqld]
plugin-load=validate_password.so
validate-password=FORCE_PLUS_PERMANENT
validate_password_policy_number = 2
mysql> INSTALL PLUGIN validate_password SONAME 'validate_password.so';

mysql> SHOW VARIABLES LIKE 'validate_password%';
+--------------------------------------+---------------+
| Variable_name

| Value

|

+--------------------------------------+---------------+
| validate_password_dictionary_file

| pass_dict.txt |

| validate_password_length

| 8

|

| validate_password_mixed_case_count

| 1

|

| validate_password_number_count

| 1

|

| validate_password_policy_number

| STRONG

|

file is located in your data directory

| validate_password_special_char_count | 1

|

+--------------------------------------+---------------+
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

(validate_password_policy_number = 2
must be set to a value of 2)

26
MySQL 5.6 Security
Improvements V
•SQL function VALIDATE_PASSWORD_STRENGTH()
Return
Value

mysql> select VALIDATE_PASSWORD_STRENGTH ('test');

Password Test

+-------------------------------------+

Length < 4

| VALIDATE_PASSWORD_STRENGTH ('test') |

Length ≥ 4 and <
25
validate_password_length

+-------------------------------------+
|

0

Satisfies policy 1
(WEAK)

25 |

+-------------------------------------+
mysql> select VALIDATE_PASSWORD_STRENGTH ('Wh4tAr3Y0u!');
+--------------------------------------------+

50

Satisfies policy 2
(MEDIUM)

75

Satisfies policy 3
(STRONG)

100

| VALIDATE_PASSWORD_STRENGTH ('Wh4tar3Y0u!') |
+--------------------------------------------+
|

100 |

+--------------------------------------------+

27
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL 5.6 Security Improvements VI
•Non-usable passwords file
echo “ilovepizza2!” > pass_dict.txt

mysql> CREATE USER 'test3'@'192.168.1.2'
IDENTIFIED BY 'ilovepizza2!’;
ERROR 1819 (HY000): Your password does not
satisfy the current policy requirements

28
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
 Foreign Key Support
 Connection Thread Scalability
 NoSQL JavaScript for node.js

29

Copyright © 2013, Oracle and/or its affiliates. All rights reserved | Oracle reserves the right to change the content and timing of all future releases

 MySQL 5.6
 Auto-Installer
MySQL Cluster 7.3 Foreign Keys
Cluster 7.3: Foreign Keys
MySQL
•

Brings MySQL Cluster to a broader range of workloads
•

•

Adds powerful functionality while reducing complexity
•

•
•
•

30

Packaged apps, custom projects
App logic & data model

Enabled by default
Enforced for SQL & NoSQL APIs
On-line add and drop

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster 7.3 Foreign Keys
Cluster 7.3: Foreign Keys
MySQL
•

Implementation goal: compatibility with InnoDB
• Easy migration of solutions already working with InnoDB
• Natively implemented in the storage engine
• Created in SQL
• Enforced in SQL & NoSQL
• C++, ClusterJ, memcached, node.js
http://www.clusterdb.com/mysql-cluster/foreign-keys-in-mysql-cluster/

31

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Foreign Keys-Example
Foreign Keys - Example
mysql> CREATE TABLE towns (town VARCHAR(30) NOT NULL PRIMARY KEY,
county VARCHAR(30)
INDEX county_county_index (county),
CONSTRAINT county_town FOREIGN KEY (county) REFERENCES counties(county)
ON DELETE RESTRICT ON UPDATE RESTRICT)
ENGINE=ndb;
…
mysql> DELETE FROM counties WHERE county=’Berkshire';
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails
(Unknown error code)
mysql> SHOW WARNINGS;
+---------+-----+-------------------------------------------------------------------------------------------+
| Level

| Code | Message
|

+---------+-----+-------------------------------------------------------------------------------------------+
| Warning | 1296 | Got error 256 'Foreign key constraint violated: Referenced row exists' from
NDB
|
| Error
| 1451 | Cannot delete or update a parent row: a foreign key constraint fails
(Unknown error code) |
+---------+-----+-------------------------------------------------------------------------------------------+

32

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Storage Engine Compability
Storage Engine Compatibility
I n n o DB

M y I SA M

M y SQL Cl u s t e r

✔

✖

✔

CA SCA DE

✔

N/A

✔

U PDA T E

✔

N/A

No PK UPDATE

DEL ET E

✔

N/A

✔

REST RI CT

✔

N/A

✔

Same as RESTRICT

N/A

Deferred Check

✔

N/A

✔

Fo r e i g n K e y s

N O A CT I ON

SET N U L L

34

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MySQL Cluster 7.3: NoSQL
Access to data

M y SQL Cl u s t e r Da t a N o de s

35
MySQL Cluster 7.3 – Node.js
MySQL Cluster 7.3:
NoSQL API
•

Native JavaScript access to MySQL
Cluster

•

End-to-End JavaScript: browser to the
app & DB

•

Storing and retrieving JavaScript objects
directly in MySQL Cluster

•
•
•

36

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Eliminate SQL transformation
• Implemented as a module for node.js
Integrates Cluster API library within the
web app
Optionally routes through MySQL Server
InnoDB vs NDB Considerations
vs NDB Considerations
InnoDB
I n n o DB

N DB /Cl u s t e r

Fo r e i g n K e y s

✔

✔

M a x Ro w Si ze

64K

14K

Range, List, Key, Hash

Key only

A u t o -s h a r d i n g

X

✔

Min num of servers

1

3

memcache

NDBAPI (C/C++)
memcache
node.js (JavaScript)
ClusterJ (Java)
mod_ndb (Apache module)

T a b l e Pa r t i t i o n i n g

N o SQL A c c e s s

37

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
MSQL Cluster 7.3:MySQL 5.6 Support
MySQL 5.6 Support
MySQL Cluster 7.3 –
Select storage engine per

table
Local
InnoDB
Tables

Local
InnoDB
Tables

– InnoDB
 Large Rows, DSS Queries, FTS

– NDB/Cluster
 Auto-sharding, real-time, HA

Uses latest MySQL 5.6

Server
MySQL Cluster NDB Storage Engine

– Enhanced Optimizer
– Replication Checksums
– Time-Delayed Replication

38

Copyright © 2013, Oracle and/or its affiliates. All rights reserved | Oracle reserves the right to change the content and timing of all future releases
MySQL Cluster 7.3 – Connection Thread
Scalability
Increases throughput of

MySQL Cluster Data Nodes

each connection to the
data layer
Increases cluster
scalability
– Each connection

Wi t h Co n n e c t i o n
T h r e a d Sc a l a b i l i t y

consumes one of 256
node ids
Up to 8x higher

MySQL Cluster Data Nodes

39

Copyright © 2013, Oracle and/or its affiliates. All rights reserved | Oracle reserves the right to change the content and timing of all future releases

performance per
connection
– SQL & NoSQL interfaces
MySQL Cluster 7.3 Auto-Installer
•
•
•
•

Fast configuration
Auto-discovery
Workload optimized
Repeatable best
practices
• MySQL Cluster 7.2
& 7.3

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Auto-Discover

Deploy

40

Specify Workload

Define
Topology
Questions?

41
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2
Morgan Tocker
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big Data
Morgan Tocker
 
What's new in my sql smug
What's new in my sql smugWhat's new in my sql smug
What's new in my sql smug
Ted Wennmark
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
Geir Høydalsvik
 

La actualidad más candente (20)

MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
 
New awesome features in MySQL 5.7
New awesome features in MySQL 5.7New awesome features in MySQL 5.7
New awesome features in MySQL 5.7
 
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 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2
 
Southeast Linuxfest -- MySQL User Admin Tips & Tricks
Southeast Linuxfest -- MySQL User Admin Tips & TricksSoutheast Linuxfest -- MySQL User Admin Tips & Tricks
Southeast Linuxfest -- MySQL User Admin Tips & Tricks
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big Data
 
What's new in my sql smug
What's new in my sql smugWhat's new in my sql smug
What's new in my sql smug
 
MySQL Performance Best Practices
MySQL Performance Best PracticesMySQL Performance Best Practices
MySQL Performance Best Practices
 
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
What's new in MySQL 5.7, Oracle Virtual Technology Summit, 2016
 
Ohio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQLOhio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQL
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7Upcoming changes in MySQL 5.7
Upcoming changes in MySQL 5.7
 
MySQL Enterprise Portfolio
MySQL Enterprise PortfolioMySQL Enterprise Portfolio
MySQL Enterprise Portfolio
 
MySQL For Linux Sysadmins
MySQL For Linux SysadminsMySQL For Linux Sysadmins
MySQL For Linux Sysadmins
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 

Similar a My sql 5.6&MySQL Cluster 7.3

The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
Geir Høydalsvik
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
Mario Beck
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changes
Morgan Tocker
 

Similar a My sql 5.6&MySQL Cluster 7.3 (20)

The MySQL SYS Schema
The MySQL SYS SchemaThe MySQL SYS Schema
The MySQL SYS Schema
 
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
The State of the Dolphin, MySQL Keynote at Percona Live Europe 2019, Amsterda...
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
A MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole CrossoverA MySQL Odyssey - A Blackhole Crossover
A MySQL Odyssey - A Blackhole Crossover
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL제3회난공불락 오픈소스 인프라세미나 - MySQL
제3회난공불락 오픈소스 인프라세미나 - MySQL
 
Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQL
 
Curso de MySQL 5.7
Curso de MySQL 5.7Curso de MySQL 5.7
Curso de MySQL 5.7
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demo
 
Mysql 57-upcoming-changes
Mysql 57-upcoming-changesMysql 57-upcoming-changes
Mysql 57-upcoming-changes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Meetup my sql5.6_cluster
Meetup my sql5.6_clusterMeetup my sql5.6_cluster
Meetup my sql5.6_cluster
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
 
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisationMySQL Webinar 2/4 Performance tuning, hardware, optimisation
MySQL Webinar 2/4 Performance tuning, hardware, optimisation
 
MySQL 5.6 Replication Webinar
MySQL 5.6 Replication WebinarMySQL 5.6 Replication Webinar
MySQL 5.6 Replication Webinar
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
Oracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c PresentationOracle Enterprise Manager 12c - OEM12c Presentation
Oracle Enterprise Manager 12c - OEM12c Presentation
 
My sql 56_roadmap_april2012
My sql 56_roadmap_april2012My sql 56_roadmap_april2012
My sql 56_roadmap_april2012
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

My sql 5.6&MySQL Cluster 7.3

  • 1. <I n s e r t Pi c t u r e H e r e > M y SQL 5 .6 & M y SQL Cl u s t e r 7 .3 Ov e r v i e w Oleksii(Alexey) Porytskyi Senior Principal Consultant oleksii.porytskyi@oracle.com 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
  • 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. 2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 3. Agenda – MySQL 5.6 New Features • InnoDB • Performance • Full-Text Search • NoSQL • Optimizer • MySQL Improvements • Replication • Security 3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 4. MySQL 5.6 SysBench Benchmarks MySQL 5.6 MySQL 5.5 Oracle Linux 6 Intel(R) Xeon(R) E7540 x86_64 MySQL leveraging: - 48 of 96 available CPU threads - 2 GHz, 512GB RAM Up to 151% Performance Gain Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 5. MySQL 5.6 SysBench Benchmarks MySQL 5.6 MySQL 5.5 Up to 234% Performance Gain Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Oracle Linux 6 Intel(R) Xeon(R) E7540 x86_64 MySQL leveraging: - 48 of 96 available CPU threads - 2 GHz, 512GB RAM
  • 6. InnoDB 6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 7. Performance - Online DDL • DDL - SQL statements for changing database • Automatically commit transactions • Historically expensive • 5.6 enhances optimized CREATE DROP INDEX statements • The ALTER TABLE INDEX and process is much faster 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 8. Performance - Buffer Pool Pre-loading • Load buffer pool at startup • Load buffer pool on command (now) • Dump buffer pool at shutdown • Dump buffer pool now buffer pool 1 (list of pages from pool) 2 3 shutdown - list of pages dumped Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1,2,3... 1 2 buffer pool start-up - list of pages reloaded 8
  • 9. Performance - SSD Improvements • 4k and 8k page sizes • InnoDB Compression • Portable .ibd (InnoDB data) files • Separate tablespaces for the InnoDB UNDO log 9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 10. Performance – Redo / Undo Logs • Redo Logs: • Increased from 4GB to 512GB (1TB total) • Improves performance of: • write-heavy workloads • long-running transactions • Undo Logs: • Moves InnoDB UNDO out of system tablespace • Good candidate to move to SSD • I/O and memory optimization Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 10
  • 11. Fulltext Search • Fulltext search now in InnoDB • Used with CHAR, VARCHAR or TEXT mysql> SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('+MySQL -YourSQL' IN BOOLEAN MODE); +----+-----------------------+-------------------------------------+ | id | title | body | +----+-----------------------+-------------------------------------+ | 1 | MySQL Tutorial | DBMS stands for DataBase ... | | 3 | How To Use MySQL Well | After you went through a ... | | 5 | Optimizing MySQL | In this tutorial we will show ... | | 8 | 1001 MySQL Tricks | 1. Never run mysqld as root. 2. ... | +----+-----------------------+-------------------------------------+ Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 11
  • 12. NoSQL • memcached as a daemon plugin of mysqld • InnoDB handles memory caching • ADD, SET, INCR stored to disk 12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 13. Optimizer Improvements • Subquery Optimizations • Index Condition Pushdown • File Sort Optimization • SELECT col1, ... FROM t1 ... • ORDER BY name LIMIT 10; • Batched Key Access (BKA) and Multi-Range Read (MRR) • Persistent Optimizer Stats 13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 14. MySQL Improvements 14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 15. Other MySQL Improvements • Remote Binlog Backup • Server UUID’s • Fractional seconds for TIME, DATETIME, and TIMESTAMP mysql> SELECT MICROSECOND('2010-12-10 14:12:09.219473'); +-------------------------------------------+ | MICROSECOND('2010-12-10 14:12:09.019473') | +-------------------------------------------+ | 219473 | +-------------------------------------------+ 15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 16. MySQL Partition Import/Export • Exchange table partition/sub-partition with nonpartitioned table • Rows in non-partitioned table must be in the range of partition/sub-partition • Foreign keys not supported • Triggers are not invoked 16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 17. Replication 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 18. Replication I • Global Transaction ID’s (GTID’s) • GTID Utilities • Self-Healing Replication Clusters • Multi-Threaded Slaves • Binary Log Group Commit • Time-delayed replication slaves 18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 19. Replication II • Informational Log Events • Optimized Row-Based Replication • Crash Safe Slaves and Binlog • Data Integrity - Replication Event Checksums • New MySQL Replication Utilities • mysqlfailover • mysqlrpladmin 19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 20. Security 20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 21. MySQL Enterprise Audit • Policy-based auditing • Logging of connections, logins, query activity • User defined policies, filtering and log rotation • Dynamically enabled/disabled: no server restart • XML-based audit stream • Version MySQL 5.5.28 and higher • Adds regulatory compliance to MySQL applications. • HIPAA, Sarbanes-Oxley, PCI, etc. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21
  • 22. MySQL Enterprise Audit Flow 1. DBA Enables on Server1 3. Joe’s connection, login and query logged 2. User Joe Connects and Queries Server1 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 23. MySQL 5.6 Security Improvements I •Storing authentication credentials in .mylogin.cnf # mysql_config_editor set --login-path=local --host=localhost --user=localuser --password $ ls -la /var/root/.mylogin.cnf -rw------- 1 root wheel 136 Aug 8 15:15 .mylogin.cnf $ file .*cnf .mylogin.cnf: data Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 23
  • 24. MySQL 5.6 Security Improvements II •Stronger encryption for user account passwords (SHA-256) [mysqld] default-authentication-plugin=sha256_password 24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 25. MySQL 5.6 Security Improvements III •User password expired column (5.6.6) mysql> select host, user, password_expired from user where user = "WebUser" and host = ‘localhost’; +-------------+---------+------------------+ | host | user | password_expired | +-------------+---------+------------------+ | localhost | test | Y | +-------------+---------+------------------+ root@MacBook-Tony:~$ mysql --host=localhost -utest -p Enter password: mysql> select 1; ERROR 1820 (HY000): You must SET PASSWORD before executing this statement 25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 26. MySQL 5.6 Security Improvements IV •Provision for establishing password security policy validate_password.so plugin [mysqld] plugin-load=validate_password.so validate-password=FORCE_PLUS_PERMANENT validate_password_policy_number = 2 mysql> INSTALL PLUGIN validate_password SONAME 'validate_password.so'; mysql> SHOW VARIABLES LIKE 'validate_password%'; +--------------------------------------+---------------+ | Variable_name | Value | +--------------------------------------+---------------+ | validate_password_dictionary_file | pass_dict.txt | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy_number | STRONG | file is located in your data directory | validate_password_special_char_count | 1 | +--------------------------------------+---------------+ Copyright © 2013, Oracle and/or its affiliates. All rights reserved. (validate_password_policy_number = 2 must be set to a value of 2) 26
  • 27. MySQL 5.6 Security Improvements V •SQL function VALIDATE_PASSWORD_STRENGTH() Return Value mysql> select VALIDATE_PASSWORD_STRENGTH ('test'); Password Test +-------------------------------------+ Length < 4 | VALIDATE_PASSWORD_STRENGTH ('test') | Length ≥ 4 and < 25 validate_password_length +-------------------------------------+ | 0 Satisfies policy 1 (WEAK) 25 | +-------------------------------------+ mysql> select VALIDATE_PASSWORD_STRENGTH ('Wh4tAr3Y0u!'); +--------------------------------------------+ 50 Satisfies policy 2 (MEDIUM) 75 Satisfies policy 3 (STRONG) 100 | VALIDATE_PASSWORD_STRENGTH ('Wh4tar3Y0u!') | +--------------------------------------------+ | 100 | +--------------------------------------------+ 27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 28. MySQL 5.6 Security Improvements VI •Non-usable passwords file echo “ilovepizza2!” > pass_dict.txt mysql> CREATE USER 'test3'@'192.168.1.2' IDENTIFIED BY 'ilovepizza2!’; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 29.  Foreign Key Support  Connection Thread Scalability  NoSQL JavaScript for node.js 29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved | Oracle reserves the right to change the content and timing of all future releases  MySQL 5.6  Auto-Installer
  • 30. MySQL Cluster 7.3 Foreign Keys Cluster 7.3: Foreign Keys MySQL • Brings MySQL Cluster to a broader range of workloads • • Adds powerful functionality while reducing complexity • • • • 30 Packaged apps, custom projects App logic & data model Enabled by default Enforced for SQL & NoSQL APIs On-line add and drop Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 31. MySQL Cluster 7.3 Foreign Keys Cluster 7.3: Foreign Keys MySQL • Implementation goal: compatibility with InnoDB • Easy migration of solutions already working with InnoDB • Natively implemented in the storage engine • Created in SQL • Enforced in SQL & NoSQL • C++, ClusterJ, memcached, node.js http://www.clusterdb.com/mysql-cluster/foreign-keys-in-mysql-cluster/ 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 32. Foreign Keys-Example Foreign Keys - Example mysql> CREATE TABLE towns (town VARCHAR(30) NOT NULL PRIMARY KEY, county VARCHAR(30) INDEX county_county_index (county), CONSTRAINT county_town FOREIGN KEY (county) REFERENCES counties(county) ON DELETE RESTRICT ON UPDATE RESTRICT) ENGINE=ndb; … mysql> DELETE FROM counties WHERE county=’Berkshire'; ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (Unknown error code) mysql> SHOW WARNINGS; +---------+-----+-------------------------------------------------------------------------------------------+ | Level | Code | Message | +---------+-----+-------------------------------------------------------------------------------------------+ | Warning | 1296 | Got error 256 'Foreign key constraint violated: Referenced row exists' from NDB | | Error | 1451 | Cannot delete or update a parent row: a foreign key constraint fails (Unknown error code) | +---------+-----+-------------------------------------------------------------------------------------------+ 32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 33.
  • 34. Storage Engine Compability Storage Engine Compatibility I n n o DB M y I SA M M y SQL Cl u s t e r ✔ ✖ ✔ CA SCA DE ✔ N/A ✔ U PDA T E ✔ N/A No PK UPDATE DEL ET E ✔ N/A ✔ REST RI CT ✔ N/A ✔ Same as RESTRICT N/A Deferred Check ✔ N/A ✔ Fo r e i g n K e y s N O A CT I ON SET N U L L 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 35. MySQL Cluster 7.3: NoSQL Access to data M y SQL Cl u s t e r Da t a N o de s 35
  • 36. MySQL Cluster 7.3 – Node.js MySQL Cluster 7.3: NoSQL API • Native JavaScript access to MySQL Cluster • End-to-End JavaScript: browser to the app & DB • Storing and retrieving JavaScript objects directly in MySQL Cluster • • • 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Eliminate SQL transformation • Implemented as a module for node.js Integrates Cluster API library within the web app Optionally routes through MySQL Server
  • 37. InnoDB vs NDB Considerations vs NDB Considerations InnoDB I n n o DB N DB /Cl u s t e r Fo r e i g n K e y s ✔ ✔ M a x Ro w Si ze 64K 14K Range, List, Key, Hash Key only A u t o -s h a r d i n g X ✔ Min num of servers 1 3 memcache NDBAPI (C/C++) memcache node.js (JavaScript) ClusterJ (Java) mod_ndb (Apache module) T a b l e Pa r t i t i o n i n g N o SQL A c c e s s 37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
  • 38. MSQL Cluster 7.3:MySQL 5.6 Support MySQL 5.6 Support MySQL Cluster 7.3 – Select storage engine per table Local InnoDB Tables Local InnoDB Tables – InnoDB  Large Rows, DSS Queries, FTS – NDB/Cluster  Auto-sharding, real-time, HA Uses latest MySQL 5.6 Server MySQL Cluster NDB Storage Engine – Enhanced Optimizer – Replication Checksums – Time-Delayed Replication 38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved | Oracle reserves the right to change the content and timing of all future releases
  • 39. MySQL Cluster 7.3 – Connection Thread Scalability Increases throughput of MySQL Cluster Data Nodes each connection to the data layer Increases cluster scalability – Each connection Wi t h Co n n e c t i o n T h r e a d Sc a l a b i l i t y consumes one of 256 node ids Up to 8x higher MySQL Cluster Data Nodes 39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved | Oracle reserves the right to change the content and timing of all future releases performance per connection – SQL & NoSQL interfaces
  • 40. MySQL Cluster 7.3 Auto-Installer • • • • Fast configuration Auto-discovery Workload optimized Repeatable best practices • MySQL Cluster 7.2 & 7.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Auto-Discover Deploy 40 Specify Workload Define Topology
  • 41. Questions? 41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.