SlideShare a Scribd company logo
Narayan Newton
Lead Sysadmin Drupal.org
Performance Engineer Tag1 Consulting
3 March 2012
MySQL Developments
Wednesday, August 22, 12
MySQL Fragmentation
• MySQL used to be just MySQL, there might have been a discussion
between 5.0 vs 5.1
• Now MySQL Means:
• MariaDB
• PerconaDB
• Percona Cluster
• Drizzle
• Oracle MySQL (5.0, 5.1, 5.5, 5.6-dev)
01
Wednesday, August 22, 12
Presentations Like This Are Terrible.
02
Wednesday, August 22, 12
Focusing On Solutions To Problems....
03
Wednesday, August 22, 12
Vertical Scaling, Locking And Reliability
04
Wednesday, August 22, 12
Oracle MySQL 5.5
• InnoDB Plugin Merged
• Vastly Improved Locking (Vertical Scalability)
• Introduction of a PERFORMANCE_SCHEMA for statistics gathering
• Countless performance and scalability fixes, optimizations and features
added
• Generally “better” than the release before, focusing on performance.
• This is currently the MySQL of choice for many people
05
Wednesday, August 22, 12
Percona Server (XtraDB)
• Focus on instrumentation, configurability and vertical scalability
• Many very specialized features targeting specific problems you will have
when scaling a MySQL instance massively. For example:
• InnoDB Data Dictionary Size, which in vanilla MySQL is not
configurable.
• Percona Server has the ability to dump and restore the buffer
pool, removing a very large pain point with cold starts when you
have a large MySQL instance
• An endless list of performance fixes and little features that are really
helpful when you are trying to run a vertically scaled MySQL instance or
set of instances
06
Wednesday, August 22, 12
New Features, Optimizer Improvements
And Replication
07
Wednesday, August 22, 12
Oracle MySQL 5.6-dev
• Large-scale improvements to the query optimizer and join algorithms
• Batched Key Access (and Multi-Range Read)
• Index Condition Pushdown
• Subquery Optimizations
• NoSQL Interface (Memcache)
• Multi-Threaded Slaves
• Replication Checksums Built-In
• Global Transactions IDs and Server UUIDs
08
Wednesday, August 22, 12
MariaDB
• Enhanced Testing
• Optimizer Enhancements
• BKA, Hash Joins,Table Elimination..etc
• Engine Changes - Percona XtraDB,Aria
• Lots of smaller changes
• Pluggable authentication, segmented key cache, microsecond
resolution, HandlerSocket support, binary log group
commit...and much more.
• Something rather unique:Virtual Columns and Dynamic Columns
09
Wednesday, August 22, 12
MariaDB - Virtual Columns
10
MariaDB [test]> describe table1;
+-------+-------------+------+-----+---------+------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+------------+
| a | int(11) | NO | | NULL | |
| b | varchar(32) | YES | | NULL | |
| c | int(11) | YES | | NULL | VIRTUAL |
| d | varchar(5) | YES | | NULL | PERSISTENT |
+-------+-------------+------+-----+---------+------------+
4 rows in set (0.00 sec)
MariaDB [test]> show create table table1;
| table1 | CREATE TABLE `table1` (
`a` int(11) NOT NULL,
`b` varchar(32) DEFAULT NULL,
`c` int(11) AS (a mod 10) VIRTUAL,
`d` varchar(5) AS (left(b,5)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
MariaDB [test]> select * from table1;
+-----+----------------+------+-------+
| a | b | c | d |
+-----+----------------+------+-------+
| 1 | some text | 1 | some |
| 2 | more text | 2 | more |
| 123 | even more text | 3 | even |
+-----+----------------+------+-------+
3 rows in set (0.00 sec)
Examples From: http://kb.askmonty.org/en/virtual-columns/
Wednesday, August 22, 12
MariaDB - Dynamic Columns
11
create table t1 (id int auto_increment primary key,
name varchar(40),
type enum ("shirt", "phone", "computer"),
price decimal(10,2),
dynstr mediumblob);
insert into t1 (name, type, price, dynstr) values
("Funny shirt", "shirt", 10.0, COLUMN_CREATE(1, "blue", 10, "XL")),
("nokia", "phone", 649, COLUMN_CREATE(1, "black", 2, "touchscreen")),
("htc Desire hd", "phone", 579, COLUMN_CREATE(1, "black", 3, "Android")),
("BM/Lenovo Thinkpad X60s", "computer", 419, COLUMN_CREATE(1, "black", 3,
"Linux"));
SELECT name FROM t1 WHERE COLUMN_GET(dynstr, 1 as char(10)) = "black";
+-------------------------+
| name |
+-------------------------+
| nokia |
| htc Desire hd |
| BM/Lenovo Thinkpad X60s |
+-------------------------+
Examples From: http://kb.askmonty.org/en/dynamic-columns/
Wednesday, August 22, 12
Optimizer Improvements
12
http://www.mysqlperformanceblog.com/2012/04/04/join-optimizations-in-mysql-5-6-and-mariadb-5-5/
Wednesday, August 22, 12
Optimizer Improvements
13
http://www.mysqlperformanceblog.com/2012/04/04/join-optimizations-in-mysql-5-6-and-mariadb-5-5/
Wednesday, August 22, 12
Clustering
14
Wednesday, August 22, 12
PerconaCluster/Galera
• “True” Master-Master Replication
• Transactional heuristics used to replicate a transaction and
“acknowledge” it before it actually runs
• Can write to any node
• Dependent on network throughput and slowest node
• COMMIT time transaction checking
• Not a write-scaling solution
15
Wednesday, August 22, 12
MySQL Cluster
16
Ref: http://anandafit.info/2011/03/29/introduction-to-mysql-clustering/
• The MySQL Server instances
are often called “SQL Nodes”
and have no data themselves
• The Storage NDB Cluster or
“Data Nodes” hold the actual
data.
• Data is sharded across the
NDB Cluster with a
configurable number of replicas
• Massive amount of network
traffic
Wednesday, August 22, 12
MySQL Cluster 7.2
• “Carrier Grade MySQL” is becoming more suitable for the generic case
• Lots of improvements
• Multi-threading improvements to data nodes
• Locking improvements on data nodes
• Query planning improvements
• Cross-DC replication improvements
• The big ticket items though are Adaptive Query Localization and Extended index Information
• Pushes what it can to the data nodes themselves, reducing the amount of data
needing to be pulled across the network to the SQL nodes.
• Data Nodes now send more index information to the SQL Nodes, reducing the
number of index hints required
17
Wednesday, August 22, 12
And Then There Was Drizzle
• Drizzle 7, the first GA release, was pushed last year
• Drizzle 7.2 is on the horizon
• Not exactly a drop-in replacement
• Pluggable
• UTF-8
• IPv6
• Multi-Master Replication based on Google Protobuffers
18
Wednesday, August 22, 12
19
• Percona Toolkit
• Every MySQL DBA should have this installed.Allows you to checksum slaves, produce
excellent slow log reports, kill problem queries automatically, sync tables and even
online schema changes.
• Percona Playback
• Allows you to replay the load represented in a slow query log or even a TCPdump of
the MySQL protocol exchange.
• XtraBackup
• Allows you to take a mostly non-blocking binary backup of InnoDB tables.An open
source/free version of InnoDB’s premium backup tool
• OpenArk Kit
• A really massively random set of MySQL utilities.Automatically kill slow queries, clear
master logs based on slave lag, repeat a query until a condition is true...etc.
MySQL Tools
Wednesday, August 22, 12
Questions...
20
Wednesday, August 22, 12
21
Session Evaluation
Please fill out the session evaluation available online:
http://munich2012.drupal.org/node/add/session-evaluation/1808
Wednesday, August 22, 12

More Related Content

What's hot (20)

PPT
MySQL Cluster Basics
Wagner Bianchi
 
PDF
Choosing a MySQL High Availability solution - Percona Live UK 2011
Henrik Ingo
 
PPT
MySQL Strategy&Roadmap
slidethanks
 
PPTX
The New MariaDB Offering: MariaDB 10, MaxScale and More
MariaDB Corporation
 
PDF
MySQL Performance - Best practices
Ted Wennmark
 
PDF
State of the art of MySQL replication and clustering
Giuseppe Maxia
 
PDF
Breakthrough performance with MySQL Cluster (2012)
Frazer Clement
 
PDF
Conference slides: MySQL Cluster Performance Tuning
Severalnines
 
PDF
MySQL InnoDB Cluster and NDB Cluster
Mario Beck
 
PDF
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Dave Stokes
 
PDF
MySQL HA
Ted Wennmark
 
PDF
MySQL Cluster Scaling to a Billion Queries
Bernd Ocklin
 
PPTX
MariaDB Galera Cluster
Abdul Manaf
 
PDF
Differences between MariaDB 10.3 & MySQL 8.0
Colin Charles
 
PDF
What is MariaDB Server 10.3?
Colin Charles
 
PDF
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Continuent
 
PDF
Databases in the hosted cloud
Colin Charles
 
PPTX
Maria db vs mysql
Nitin KR
 
PDF
01 upgrade to my sql8
Ted Wennmark
 
PDF
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
Aurimas Mikalauskas
 
MySQL Cluster Basics
Wagner Bianchi
 
Choosing a MySQL High Availability solution - Percona Live UK 2011
Henrik Ingo
 
MySQL Strategy&Roadmap
slidethanks
 
The New MariaDB Offering: MariaDB 10, MaxScale and More
MariaDB Corporation
 
MySQL Performance - Best practices
Ted Wennmark
 
State of the art of MySQL replication and clustering
Giuseppe Maxia
 
Breakthrough performance with MySQL Cluster (2012)
Frazer Clement
 
Conference slides: MySQL Cluster Performance Tuning
Severalnines
 
MySQL InnoDB Cluster and NDB Cluster
Mario Beck
 
MySQL for Oracle DBA -- Rocky Mountain Oracle User Group Training Days '15
Dave Stokes
 
MySQL HA
Ted Wennmark
 
MySQL Cluster Scaling to a Billion Queries
Bernd Ocklin
 
MariaDB Galera Cluster
Abdul Manaf
 
Differences between MariaDB 10.3 & MySQL 8.0
Colin Charles
 
What is MariaDB Server 10.3?
Colin Charles
 
MySQL High Availability and Disaster Recovery with Continuent, a VMware company
Continuent
 
Databases in the hosted cloud
Colin Charles
 
Maria db vs mysql
Nitin KR
 
01 upgrade to my sql8
Ted Wennmark
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
Aurimas Mikalauskas
 

Similar to MySQL 开发 (20)

PDF
My sql 56_roadmap_april2012
sqlhjalp
 
PPT
Fudcon talk.ppt
webhostingguy
 
PDF
My sql 56_roadmap_april2012_zht2
Ivan Tu
 
PDF
MySQL Ecosystem in 2020
Alkin Tezuysal
 
PDF
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
YUCHENG HU
 
PPTX
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
Data Con LA
 
PPTX
Confoo 2021 -- MySQL New Features
Dave Stokes
 
PDF
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
Ivan Zoratti
 
PDF
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
Mydbops
 
PPTX
Clustrix Database Percona Ruby on Rails benchmark
Clustrix
 
PPT
2010 12 mysql_clusteroverview
Dimas Prasetyo
 
PDF
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
Alkin Tezuysal
 
PDF
MySQL Cluster
Mario Beck
 
ODP
MySQL 5.7 - What's new and How to upgrade
Abel Flórez
 
PDF
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Ted Wennmark
 
PDF
MySQL 5.7 Tutorial Dutch PHP Conference 2015
Dave Stokes
 
PDF
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
Dave Stokes
 
PDF
MySQL 5.7 - What's new, How to upgrade and Document Store
Abel Flórez
 
PDF
[B14] A MySQL Replacement by Colin Charles
Insight Technology, Inc.
 
PDF
What’s New in MariaDB Server 10.2
MariaDB plc
 
My sql 56_roadmap_april2012
sqlhjalp
 
Fudcon talk.ppt
webhostingguy
 
My sql 56_roadmap_april2012_zht2
Ivan Tu
 
MySQL Ecosystem in 2020
Alkin Tezuysal
 
2012 09 MariaDB Boston Meetup - MariaDB 是 Mysql 的替代者吗
YUCHENG HU
 
NoSQL on MySQL - MySQL Document Store by Vadim Tkachenko
Data Con LA
 
Confoo 2021 -- MySQL New Features
Dave Stokes
 
MariaDB 10 Tutorial - 13.11.11 - Percona Live London
Ivan Zoratti
 
MySQL Transformation Case Study: 80% Cost Savings & Uninterrupted Availabilit...
Mydbops
 
Clustrix Database Percona Ruby on Rails benchmark
Clustrix
 
2010 12 mysql_clusteroverview
Dimas Prasetyo
 
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
Alkin Tezuysal
 
MySQL Cluster
Mario Beck
 
MySQL 5.7 - What's new and How to upgrade
Abel Flórez
 
Upgrade to MySQL 5.7 and latest news planned for MySQL 8
Ted Wennmark
 
MySQL 5.7 Tutorial Dutch PHP Conference 2015
Dave Stokes
 
MySQL 5.7. Tutorial - Dutch PHP Conference 2015
Dave Stokes
 
MySQL 5.7 - What's new, How to upgrade and Document Store
Abel Flórez
 
[B14] A MySQL Replacement by Colin Charles
Insight Technology, Inc.
 
What’s New in MariaDB Server 10.2
MariaDB plc
 
Ad

More from YUCHENG HU (20)

PDF
Confluencewiki 使用空间
YUCHENG HU
 
PDF
Git
YUCHENG HU
 
PDF
Presta shop 1.6 如何安装简体中文语言文件
YUCHENG HU
 
PDF
Logback 介绍
YUCHENG HU
 
PDF
Presta shop 1.6 详细安装指南
YUCHENG HU
 
PDF
Presta shop 1.6 的安装环境
YUCHENG HU
 
PDF
Presta shop 1.6 如何安装简体中文语言文件
YUCHENG HU
 
PDF
Presta shop 1.6 图文安装教程
YUCHENG HU
 
PDF
V tiger 5.4.0 图文安装教程
YUCHENG HU
 
PDF
Confluence 回顾(retrospectives) 蓝图 cwikiossez
YUCHENG HU
 
PDF
Confluence 会议记录(meeting notes)蓝图 cwikiossez
YUCHENG HU
 
PDF
VTIGER - 销售机会 - CWIKIOSSEZ
YUCHENG HU
 
PDF
Confluence 使用一个模板新建一个页面 cwikiossez
YUCHENG HU
 
PDF
Confluence 使用模板
YUCHENG HU
 
PDF
Cwikiossez confluence 订阅页面更新邮件通知
YUCHENG HU
 
PDF
Cwikiossez confluence 关注页面 博客页面和空间
YUCHENG HU
 
PDF
My sql università di enna a.a. 2005-06
YUCHENG HU
 
PDF
My sql would you like transactions
YUCHENG HU
 
PDF
MySQL 指南
YUCHENG HU
 
PDF
MySQL 简要介绍
YUCHENG HU
 
Confluencewiki 使用空间
YUCHENG HU
 
Presta shop 1.6 如何安装简体中文语言文件
YUCHENG HU
 
Logback 介绍
YUCHENG HU
 
Presta shop 1.6 详细安装指南
YUCHENG HU
 
Presta shop 1.6 的安装环境
YUCHENG HU
 
Presta shop 1.6 如何安装简体中文语言文件
YUCHENG HU
 
Presta shop 1.6 图文安装教程
YUCHENG HU
 
V tiger 5.4.0 图文安装教程
YUCHENG HU
 
Confluence 回顾(retrospectives) 蓝图 cwikiossez
YUCHENG HU
 
Confluence 会议记录(meeting notes)蓝图 cwikiossez
YUCHENG HU
 
VTIGER - 销售机会 - CWIKIOSSEZ
YUCHENG HU
 
Confluence 使用一个模板新建一个页面 cwikiossez
YUCHENG HU
 
Confluence 使用模板
YUCHENG HU
 
Cwikiossez confluence 订阅页面更新邮件通知
YUCHENG HU
 
Cwikiossez confluence 关注页面 博客页面和空间
YUCHENG HU
 
My sql università di enna a.a. 2005-06
YUCHENG HU
 
My sql would you like transactions
YUCHENG HU
 
MySQL 指南
YUCHENG HU
 
MySQL 简要介绍
YUCHENG HU
 
Ad

Recently uploaded (20)

PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 

MySQL 开发

  • 1. Narayan Newton Lead Sysadmin Drupal.org Performance Engineer Tag1 Consulting 3 March 2012 MySQL Developments Wednesday, August 22, 12
  • 2. MySQL Fragmentation • MySQL used to be just MySQL, there might have been a discussion between 5.0 vs 5.1 • Now MySQL Means: • MariaDB • PerconaDB • Percona Cluster • Drizzle • Oracle MySQL (5.0, 5.1, 5.5, 5.6-dev) 01 Wednesday, August 22, 12
  • 3. Presentations Like This Are Terrible. 02 Wednesday, August 22, 12
  • 4. Focusing On Solutions To Problems.... 03 Wednesday, August 22, 12
  • 5. Vertical Scaling, Locking And Reliability 04 Wednesday, August 22, 12
  • 6. Oracle MySQL 5.5 • InnoDB Plugin Merged • Vastly Improved Locking (Vertical Scalability) • Introduction of a PERFORMANCE_SCHEMA for statistics gathering • Countless performance and scalability fixes, optimizations and features added • Generally “better” than the release before, focusing on performance. • This is currently the MySQL of choice for many people 05 Wednesday, August 22, 12
  • 7. Percona Server (XtraDB) • Focus on instrumentation, configurability and vertical scalability • Many very specialized features targeting specific problems you will have when scaling a MySQL instance massively. For example: • InnoDB Data Dictionary Size, which in vanilla MySQL is not configurable. • Percona Server has the ability to dump and restore the buffer pool, removing a very large pain point with cold starts when you have a large MySQL instance • An endless list of performance fixes and little features that are really helpful when you are trying to run a vertically scaled MySQL instance or set of instances 06 Wednesday, August 22, 12
  • 8. New Features, Optimizer Improvements And Replication 07 Wednesday, August 22, 12
  • 9. Oracle MySQL 5.6-dev • Large-scale improvements to the query optimizer and join algorithms • Batched Key Access (and Multi-Range Read) • Index Condition Pushdown • Subquery Optimizations • NoSQL Interface (Memcache) • Multi-Threaded Slaves • Replication Checksums Built-In • Global Transactions IDs and Server UUIDs 08 Wednesday, August 22, 12
  • 10. MariaDB • Enhanced Testing • Optimizer Enhancements • BKA, Hash Joins,Table Elimination..etc • Engine Changes - Percona XtraDB,Aria • Lots of smaller changes • Pluggable authentication, segmented key cache, microsecond resolution, HandlerSocket support, binary log group commit...and much more. • Something rather unique:Virtual Columns and Dynamic Columns 09 Wednesday, August 22, 12
  • 11. MariaDB - Virtual Columns 10 MariaDB [test]> describe table1; +-------+-------------+------+-----+---------+------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+------------+ | a | int(11) | NO | | NULL | | | b | varchar(32) | YES | | NULL | | | c | int(11) | YES | | NULL | VIRTUAL | | d | varchar(5) | YES | | NULL | PERSISTENT | +-------+-------------+------+-----+---------+------------+ 4 rows in set (0.00 sec) MariaDB [test]> show create table table1; | table1 | CREATE TABLE `table1` ( `a` int(11) NOT NULL, `b` varchar(32) DEFAULT NULL, `c` int(11) AS (a mod 10) VIRTUAL, `d` varchar(5) AS (left(b,5)) PERSISTENT ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MariaDB [test]> select * from table1; +-----+----------------+------+-------+ | a | b | c | d | +-----+----------------+------+-------+ | 1 | some text | 1 | some | | 2 | more text | 2 | more | | 123 | even more text | 3 | even | +-----+----------------+------+-------+ 3 rows in set (0.00 sec) Examples From: http://kb.askmonty.org/en/virtual-columns/ Wednesday, August 22, 12
  • 12. MariaDB - Dynamic Columns 11 create table t1 (id int auto_increment primary key, name varchar(40), type enum ("shirt", "phone", "computer"), price decimal(10,2), dynstr mediumblob); insert into t1 (name, type, price, dynstr) values ("Funny shirt", "shirt", 10.0, COLUMN_CREATE(1, "blue", 10, "XL")), ("nokia", "phone", 649, COLUMN_CREATE(1, "black", 2, "touchscreen")), ("htc Desire hd", "phone", 579, COLUMN_CREATE(1, "black", 3, "Android")), ("BM/Lenovo Thinkpad X60s", "computer", 419, COLUMN_CREATE(1, "black", 3, "Linux")); SELECT name FROM t1 WHERE COLUMN_GET(dynstr, 1 as char(10)) = "black"; +-------------------------+ | name | +-------------------------+ | nokia | | htc Desire hd | | BM/Lenovo Thinkpad X60s | +-------------------------+ Examples From: http://kb.askmonty.org/en/dynamic-columns/ Wednesday, August 22, 12
  • 16. PerconaCluster/Galera • “True” Master-Master Replication • Transactional heuristics used to replicate a transaction and “acknowledge” it before it actually runs • Can write to any node • Dependent on network throughput and slowest node • COMMIT time transaction checking • Not a write-scaling solution 15 Wednesday, August 22, 12
  • 17. MySQL Cluster 16 Ref: http://anandafit.info/2011/03/29/introduction-to-mysql-clustering/ • The MySQL Server instances are often called “SQL Nodes” and have no data themselves • The Storage NDB Cluster or “Data Nodes” hold the actual data. • Data is sharded across the NDB Cluster with a configurable number of replicas • Massive amount of network traffic Wednesday, August 22, 12
  • 18. MySQL Cluster 7.2 • “Carrier Grade MySQL” is becoming more suitable for the generic case • Lots of improvements • Multi-threading improvements to data nodes • Locking improvements on data nodes • Query planning improvements • Cross-DC replication improvements • The big ticket items though are Adaptive Query Localization and Extended index Information • Pushes what it can to the data nodes themselves, reducing the amount of data needing to be pulled across the network to the SQL nodes. • Data Nodes now send more index information to the SQL Nodes, reducing the number of index hints required 17 Wednesday, August 22, 12
  • 19. And Then There Was Drizzle • Drizzle 7, the first GA release, was pushed last year • Drizzle 7.2 is on the horizon • Not exactly a drop-in replacement • Pluggable • UTF-8 • IPv6 • Multi-Master Replication based on Google Protobuffers 18 Wednesday, August 22, 12
  • 20. 19 • Percona Toolkit • Every MySQL DBA should have this installed.Allows you to checksum slaves, produce excellent slow log reports, kill problem queries automatically, sync tables and even online schema changes. • Percona Playback • Allows you to replay the load represented in a slow query log or even a TCPdump of the MySQL protocol exchange. • XtraBackup • Allows you to take a mostly non-blocking binary backup of InnoDB tables.An open source/free version of InnoDB’s premium backup tool • OpenArk Kit • A really massively random set of MySQL utilities.Automatically kill slow queries, clear master logs based on slave lag, repeat a query until a condition is true...etc. MySQL Tools Wednesday, August 22, 12
  • 22. 21 Session Evaluation Please fill out the session evaluation available online: http://munich2012.drupal.org/node/add/session-evaluation/1808 Wednesday, August 22, 12