Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MariaDB for the Enterprise
Max Mether
@maxmether
max@skysql.com
09.04.2014 © SkySQL Ab. Commercial in Confidence 1
Who is Max ?
A brief history
• 1983 - First version of what would become MySQL created by Monty W.
• 1995 – MySQL AB founded
• 2001 Jan...
A new beginning?
• 2010 Feb – MariaDB 5.1 alpha released
• 2010 Dec – MySQL 5.5 GA released
• 2011 Sep – Oracle: closed so...
MariaDB Versions
09.04.2014 © SkySQL Ab. Commercial in Confidence 5
• MariaDB 5.1 based on MySQL CE 5.1
– MariaDB 5.2 base...
MariaDB Features – Replication
• Multi-source replication (10.0)
– Each slave can have multiple masters
• Global Transacti...
Replication before 10.0
09.04.2014 © SkySQL Ab. Commercial in Confidence 7
Replication with 10.0
09.04.2014 © SkySQL Ab. Commercial in Confidence 8
MariaDB Galera Cluster (5.5)
• Combines MariaDB with Galera
Cluster
• Provides
synchronous replication
• Active – Active n...
MariaDB Features - Optimizer
• Sub-query optimizations (5.3)
– Subqueries up to several thousand times faster
• Join addit...
MariaDB Features – Group Commit (5.3)
09.04.2014 © SkySQL Ab. Commercial in Confidence 11
COMMIT
Binary
log
XtraDB / InnoD...
09.04.2014 © SkySQL Ab. Commercial in Confidence 12
MariaDB Features – Group Commit (5.3)
MariaDB Features – Atomic Writes (5.5)
• Traditionally writes to disk cannot be guaranteed to
be completed
– InnoDB uses a...
MariaDB Features – Performance
• Threadpool (5.1) / (5.5)
– Pools of threads instead of one thread /
connection
– Less con...
MariaDB Features – Storage Engines
• Cassandra (10.0)
– An integration of the NoSQL database Cassandra
– Write and read da...
MariaDB Features – Statistics
• Improved user statistics (5.2)
– CLIENT_STATISTICS
– USER_STATISTICS
• Improved table stat...
MariaDB Features – Security
• Pluggable authentication (5.2)
– PAM Plugin
– Allow other authentication methods
• Audit Plu...
MariaDB Features – Admin
• ALTER TABLE progress report (5.3)
• Online ALTER TABLE (10.0)
• SHOW EXPLAIN for <thread_id> (1...
MariaDB Features – “NoSQL”
• Virtual Columns (5.3)
– PERSISTENT or VIRTUAL
• Handler socket (5.3)
– Direct access to stora...
MariaDB Features – Dynamic Columns
09.04.2014 © SkySQL Ab. Commercial in Confidence 20
MariaDB [test]> create table t1 (id...
MariaDB Features – Dynamic Columns
09.04.2014 © SkySQL Ab. Commercial in Confidence 21
MariaDB [test]> select name from t1...
Questions?
Max Mether
@maxmether
max@skysql.com
09.04.2014 © SkySQL Ab. Commercial in Confidence 22
Upcoming SlideShare
Loading in …5
×

MariaDB for the Enterprise

407 views

Published on

Great Wide Open 2014 - Day 1
Max Mether - SkySQL
3:30 PM - Operations 1 (Databases)

Published in: Technology
  • Be the first to comment

  • Be the first to like this

MariaDB for the Enterprise

  1. 1. MariaDB for the Enterprise Max Mether @maxmether max@skysql.com 09.04.2014 © SkySQL Ab. Commercial in Confidence 1
  2. 2. Who is Max ?
  3. 3. A brief history • 1983 - First version of what would become MySQL created by Monty W. • 1995 – MySQL AB founded • 2001 Jan – Mårten Mickos joins MySQL as the CEO • 2005 Oct – Oracle acquires InnoDB (Innobase) • 2008 Jan – MySQL AB acquired by Sun for $1bn • 2008 Nov – MySQL 5.1 GA • 2009 Jan – Monty Program is founded • 2009 Apr – Oracle acquire Sun for $7.4bn • 2009 Dec – Oracle makes MySQL promises to EU 09.04.2014 3
  4. 4. A new beginning? • 2010 Feb – MariaDB 5.1 alpha released • 2010 Dec – MySQL 5.5 GA released • 2011 Sep – Oracle: closed source modules for MySQL • 2012 Apr – MariaDB 5.5 GA is released • 2012 Aug – Oracle: closes bugs db and test cases • 2012 Dec – MariaDB Foundation is announced • 2013 Feb – Fedora and OpenSuSE replace MySQL with MariaDB in their distributions • 2013 Mar – Slackware, Archware follow • 2013 April - SkySQL merges with Monty Program • 2013 June – RHEL announces MariaDB as default • 2014 Mar – MariaDB 10.0 GA 09.04.2014 SkySQL Ab 2011 Confidential 4
  5. 5. MariaDB Versions 09.04.2014 © SkySQL Ab. Commercial in Confidence 5 • MariaDB 5.1 based on MySQL CE 5.1 – MariaDB 5.2 based on MariaDB 5.1 – MariaDB 5.3 based on MariaDB 5.2 • MariaDB 5.5 based on MySQL CE 5.5 • MariaDB 10.0 based on MariaDB 5.5 – Plus features from MySQL 5.6 • MariaDB 10.1 based on MariaDB 10.0 – Plus features from MySQL 5.7
  6. 6. MariaDB Features – Replication • Multi-source replication (10.0) – Each slave can have multiple masters • Global Transaction ID (10.0) – Follows the transaction through its life – Based on ”domain” as opposed to UUID • Parallell slave threads (10.0) – Based on Group Commit instead of schemas • Original statement logged with RBR events (5.3) • Checksum for binlog events (5.3) 09.04.2014 © SkySQL Ab. Commercial in Confidence 6
  7. 7. Replication before 10.0 09.04.2014 © SkySQL Ab. Commercial in Confidence 7
  8. 8. Replication with 10.0 09.04.2014 © SkySQL Ab. Commercial in Confidence 8
  9. 9. MariaDB Galera Cluster (5.5) • Combines MariaDB with Galera Cluster • Provides synchronous replication • Active – Active nodes • Works with InnoDB • No slave lag • Multi-threaded slave • Transactions are validated upon commit • Multi-master possible 09.04.2014 © SkySQL Ab. Commercial in Confidence 9
  10. 10. MariaDB Features - Optimizer • Sub-query optimizations (5.3) – Subqueries up to several thousand times faster • Join additions (5.3) – Block nested loop joins for outer joins, Block hash joins, Batch Key Access • Optimizations for derived tables and views (5.3) • Disk access optimization (5.3) – Index Condition Pushdown, Multi-Range Read optimization • Table Elimination (5.1) • Histogram statistics for non-indexed columns (10.0) • Engine independent statistics (10.0) – Optimizer no longer reliant on Storage Engine 09.04.2014 © SkySQL Ab. Commercial in Confidence 10
  11. 11. MariaDB Features – Group Commit (5.3) 09.04.2014 © SkySQL Ab. Commercial in Confidence 11 COMMIT Binary log XtraDB / InnoDB 3 fsyncs / transaction 2
  12. 12. 09.04.2014 © SkySQL Ab. Commercial in Confidence 12 MariaDB Features – Group Commit (5.3)
  13. 13. MariaDB Features – Atomic Writes (5.5) • Traditionally writes to disk cannot be guaranteed to be completed – InnoDB uses a doublewrite buffer for safety • FusionIOs DirectFS supports Atomic Writes – A write is guaranteed in an all or nothing fashion • By writing only once – The flash life time is increased – The overall throughput is increased 09.04.2014 © SkySQL Ab. Commercial in Confidence 13
  14. 14. MariaDB Features – Performance • Threadpool (5.1) / (5.5) – Pools of threads instead of one thread / connection – Less context switching => increased performance in some usage scenarios • Segmented Key Cache (5.2) – Increased concurrency for MyISAM usage 09.04.2014 © SkySQL Ab. Commercial in Confidence 14
  15. 15. MariaDB Features – Storage Engines • Cassandra (10.0) – An integration of the NoSQL database Cassandra – Write and read data to and from a Cassandra Cluster • Connect (10.0) – Access data from various formats such as DBase, CSV, DOS, FMT and XML • TokuDB (5.5) – High performance on write-intensive workloads • Spider (10.0) – Transparently split data in same table into several MariaDB servers 09.04.2014 © SkySQL Ab. Commercial in Confidence 15
  16. 16. MariaDB Features – Statistics • Improved user statistics (5.2) – CLIENT_STATISTICS – USER_STATISTICS • Improved table statistics (5.2) – INDEX_STATISTICS – TABLE_STATISTICS • Improved thread information (10.0) – MEMORY_USAGE – EXAMINED_ROWS 09.04.2014 © SkySQL Ab. Commercial in Confidence 16
  17. 17. MariaDB Features – Security • Pluggable authentication (5.2) – PAM Plugin – Allow other authentication methods • Audit Plugin (10.0) – Track user access to data in real time • Roles (10.0) – Assign users to roles 09.04.2014 © SkySQL Ab. Commercial in Confidence 17
  18. 18. MariaDB Features – Admin • ALTER TABLE progress report (5.3) • Online ALTER TABLE (10.0) • SHOW EXPLAIN for <thread_id> (10.0) • EXPLAIN for UPDATE/DELETE (10.0) • Table partitioning improvements (10.0) – Read directly from partition – EXCHANGE PARTITION • New PERFORMANCE SCHEMA (10.0) • SHUTDOWN Command (10.0) 09.04.2014 © SkySQL Ab. Commercial in Confidence 18
  19. 19. MariaDB Features – “NoSQL” • Virtual Columns (5.3) – PERSISTENT or VIRTUAL • Handler socket (5.3) – Direct access to storage layer • Simple CRUD operations • Dynamic Columns (5.3) – Columns with dynamic content – Implemented as a blob with handling functions 09.04.2014 © SkySQL Ab. Commercial in Confidence 19
  20. 20. MariaDB Features – Dynamic Columns 09.04.2014 © SkySQL Ab. Commercial in Confidence 20 MariaDB [test]> create table t1 (id int auto_increment primary key, -> name varchar(40), -> type enum ("shirt", "phone", "computer"), -> price decimal(10,2), -> dynstr mediumblob); Query OK, 0 rows affected (0.11 sec) MariaDB [test]> 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")); Query OK, 4 rows affected (0.04 sec) Records: 4 Duplicates: 0 Warnings: 0 MariaDB [test]> select id, name, type, price, length(dynstr) as len, column_list(dynstr) as list from t1; +----+-------------------------+----------+--------+------+------+ | id | name | type | price | len | list | +----+-------------------------+----------+--------+------+------+ | 1 | Funny shirt | shirt | 10.00 | 17 | 1,10 | | 2 | nokia | phone | 649.00 | 27 | 1,2 | | 3 | htc Desire hd | phone | 579.00 | 23 | 1,3 | | 4 | BM/Lenovo Thinkpad X60s | computer | 419.00 | 21 | 1,3 | +----+-------------------------+----------+--------+------+------+ 4 rows in set (0.03 sec)
  21. 21. MariaDB Features – Dynamic Columns 09.04.2014 © SkySQL Ab. Commercial in Confidence 21 MariaDB [test]> select name from t1 where COLUMN_GET(dynstr, 1 as char(10)) = "black"; +-------------------------+ | name | +-------------------------+ | nokia | | htc Desire hd | | BM/Lenovo Thinkpad X60s | +-------------------------+ 3 rows in set (0.01 sec) MariaDB [test]> MariaDB [test]> select name, COLUMN_GET(dynstr, 1 as char(10)) from t1 where COLUMN_EXISTS(dynstr, 1); +-------------------------+-----------------------------------+ | name | COLUMN_GET(dynstr, 1 as char(10)) | +-------------------------+-----------------------------------+ | Funny shirt | blue | | nokia | black | | htc Desire hd | black | | BM/Lenovo Thinkpad X60s | black | +-------------------------+-----------------------------------+ 4 rows in set (0.00 sec)
  22. 22. Questions? Max Mether @maxmether max@skysql.com 09.04.2014 © SkySQL Ab. Commercial in Confidence 22

×