• Save
Technology Day 2011 MySQL & MariaDB
Upcoming SlideShare
Loading in...5
×
 

Technology Day 2011 MySQL & MariaDB

on

  • 812 views

 

Statistics

Views

Total Views
812
Views on SlideShare
810
Embed Views
2

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 2

http://www.linkedin.com 1
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Technology Day 2011 MySQL & MariaDB Technology Day 2011 MySQL & MariaDB Presentation Transcript

  • MySQL & diaspora Dan-Claudiu DRAGOŞ
  • MySQL & diaspora A little bit of history…• MySQL first came into existence back in 1995 – well, I doubt it was the first relational database ever developed from scratch ;)• People began to use MySQL and to appreciate it when the Web turned from “presentation only” to the “interactive” paradigm – Version 3.23 released early 2001 was probably the most important milestone• Incremental development continued, new features were added – Version 4.0 : March 2003 – Version 4.1: October 2004 – Version 5.0: October 2005 – Version x.x: ... 2006? not quite! 2
  • MySQL & diaspora A little bit of history… (2)• Sun Microsystems buys MySQL in 2008 – At that time the main development seemed like it had lost some momentum – Version 5.1 was released in November 2008, 3 years after the previous major release; unfortunately it was full of severe bugs – The performance that made MySQL a winner on the web did not prove to be good enough for the demanding enterprise corporate environment – Version 6.0-alpha announced in 2009; it was never officially released – The source files from the CVS were later used to build a plugin-based database called “Drizzle” ( http://www.drizzle.org/ ) 3
  • MySQL & diaspora A little bit of history… (3)• Oracle buys Sun Microsystems in 2010 – The MySQL development strategy gets redefined – Version 5.5 was released in December 2010 – “Enterprise” no longer means “support” but also new closed-source features – Version 5.6 was announced and is currently available for developers to test – Experimental features are available at http://labs.mysql.com 4
  • MySQL & diaspora A little bit of history… (4)• Not everybody is happy with the current state – The current Oracle strategy is to focus the main development effort on the closed source features, monetize them and then maybe provide them to the community – Oracle has promised not to change the current dual licensing strategy until at least 2015 – One of the original MySQL developers (Monty Widenius) has forked the MySQL GPL source code; the new project is called MariaDB ( http://mariadb.org/ ) 5
  • MySQL & diaspora What is new in MySQL 5.5 ?• This is the first Oracle release• It comes in 2 flavors, the “community” (open source) and the “enterprise” (with closed source content)• The new common features are: – InnoDB is now the default storage engine – The InnoDB subsystem was improved for scalability (from a fixed thread count to a variable thread count to accommodate for faster I/O) – SMP support is better (atomic CPU instructions replacing use of mutexes) 6
  • MySQL & diaspora What is new in MySQL 5.5 ? (2)• New common features (continued) – Semi-synchronous replication (transactions ran on master end only after at least one slave acknowledges it) – Diagnostic improvements (better SHOW ENGINE INNODB STATUS, etc) – Extended Unicode support (utf16, utf32…) – SIGNAL / RESIGNAL keywords (used to send errors based on conditions, useful in stored procedures) – Enhancements regarding table partitioning 7
  • MySQL & diaspora What is new in MySQL 5.5 ? (3)• “Enterprise” (closed source) features: – Thread pool (probably the most marketed new feature by Oracle): this improves database scalability by improving the performance under heavy load – The benchmark from http://www.mysql.com/products/enterprise/scalability.html shows a 20x scalability improvement, not bad! 8
  • MySQL & diaspora What is new in MySQL 5.5 ? (4)• “Enterprise” (closed source) features (continued) – “Thread Pool” works by changing the paradigm from the “1 connection = 1 thread” to defining a fixed set of threads that take care of all the connections – This scalability trick obviously works if each of the requests imply a quite small processing effort (e.g. simple selects) – A GPL implementation of such feature is already present in MariaDB! 9
  • MySQL & diaspora What is new in MySQL 5.5 ? (5)• “Enterprise” (closed source) features (continued) – “Pluggable Authentication”; for now 2 plugins are provided – PAM and Active Directory (Windows) – This architecture allows for more plugins to be written, maybe interfacing with LDAP, Kerberos… name it – A GPL implementation is also present in MariaDB! (well, plugins are still to be written) 10
  • MySQL & diaspora What comes with MySQL 5.6• Quick description – Oracle advertises this release as being an incremental, more like a better 5.5 – It is available for download and test but it is not recommended for production environments ( http://dev.mysql.com/downloads/mysql )• The short list of improvements? – Better query optimizer – “NoSQL” type of access with memcached API – Better performance statistics (not covered here) – Better InnoDB (not covered here) – Better replication (not covered here) 11
  • MySQL & diaspora New in MySQL 5.6 (1)• Query Optimizer – Faster sorting for ORDER BY clauses on non-indexed columns with small LIMIT values – Index condition pushdown (“ICP”): CREATE TABLE person ( id INTEGER PRIMARY KEY, name VARCHAR(100), postalcode INTEGER, age INTEGER, key (postalcode, age) ); SELECT name FROM person WHERE postalcode BETWEEN 5000 AND 5500 AND age BETWEEN 21 AND 22; With ICP on a million row table the run time goes from seconds to milliseconds. 12
  • MySQL & diaspora New in MySQL 5.6 (2)• Query optimizer (continued) – Later materialization of subqueries and views in FROM clauses (evaluate subqueries only when needed) – EXPLAIN for INSERT, UPDATE and DELETE – Precomputed statistics (e.g. for deciding which index to use in a query); the statistics now “survive” server restarts and can be updated with ANALYZE – Optimizer tracing (TRACE keyword; it shows more data than EXPLAIN – how the query resolving plan was generated, decision making steps of the optimizer) 13
  • MySQL & diaspora New in MySQL 5.6 (3)• “NoSQL” type of access – The API is branded as “Not only SQL” – The InnoDB engine is directly accessed by a Memcached plugin (http://memcached.org/ ) – Existing memcached clients can be used; this access type obviously bypasses the SQL parser and is a low latency method of accessing the database – It can be used for key-value operations only – This is currently available as a separate download from http://labs.mysql.com 14
  • MySQL & diaspora MariaDB ?• Key points about MariaDB – MariaDB advertises itself as a “drop in” replacement for MySQL – Current stable version is 5.3; this is a actually a replacement for MySQL 5.1 – For MySQL 5.5 there will sometime be a Maria DB 5.5 release – The fact is that MariaDB 5.3 already includes most of the features of MySQL 5.5, including GPL versions of the enterprise, closed source ones 15
  • MySQL & diaspora MariaDB? (2)• Key points about MariaDB (continued) – It was released as GPL only – It includes all the open source features and patches from MySQL; it can only be better than the MySQL community version – It also includes a GPL drop-in replacement for InnoDB – It is sometimes considered to be more like “MySQL on steroids” due to the extra scalability features that are not available in the community MySQL version – It already comes with “NoSQL” type of access (HandlerSocket plugin) 16
  • MySQL & diaspora MariaDB? (3)• New things available in MariaDB only – Dynamic columns (have a column defined for one row or a couple of rows only) – Virtual columns (defined by a query run on the fixed columns) – Table elimination (query optimization: ignore tables specified in query that are not required for resolving; useful mostly when working with views) – Extended statistics (on user, client...) – Microsecond precision at SHOW PROCESSLIST 17
  • MySQL & diaspora Out of time!• Questions? 18