Your SlideShare is downloading. ×
0
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Fudcon talk.ppt
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Fudcon talk.ppt

821

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
821
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Views (including updatable views) are implemented in the 5.0 version of MySQL Server. Views are available in binary releases from 5.0.1 and up. See Section 13.2.7, “CREATE VIEW Syntax” . Views are useful for allowing users to access a set of relations (tables) as if it were a single table, and limiting their access to just that. Views can also be used to restrict access to rows (a subset of a particular table). For access control to columns, you can also use the sophisticated privilege system in MySQL Server. See Section 5.5, “The MySQL Access Privilege System” . In designing an implementation of views, our ambitious goal, as much as is possible within the confines of SQL, has been full compliance with ``Codd's Rule #6'' for relational database systems: ``All views that are theoretically updatable, should in practice also be updatable.''
  • The main purpose of this slide is to demonstrate: 1) That MySQL supports two-phase commit and XA for distributed transaction processing 2) That MySQL can either be a transaction manager or a resource manager. Any application can enlist MySQL into a transaction (MySQL is RM). But, MySQL can also execute a distributed transaction across two resource managers (say two InnoDB tables in different databases).
  • Talk about % of folks surveyed who have gone to 5.0
  • Talk about % of folks surveyed who have gone to 5.0
  • Transcript

    • 1. MySQL and Fedora: A Developer's Overview Brian Aker Director of Architecture Fudcon April 2006 MySQL AB
    • 2. Who am I? <ul><li>Brian Aker </li></ul><ul><ul><li>Director of Architecture, MySQL AB </li></ul></ul><ul><ul><li>Author of mod_layout, the apache streaming services mod_mp3, Slash (Slashdot’s CMS System), and lot of other things on Freshmeat.... </li></ul></ul><ul><ul><li>http://mysql.com/ </li></ul></ul><ul><ul><li>http://krow.net/ </li></ul></ul>
    • 3. MySQL <ul><li>Open Source Database Company </li></ul><ul><li>Swedish company started by Monty Widenius and David Axmark </li></ul><ul><li>Employs Developers World Wide </li></ul><ul><ul><li>200^H^H^H300 employees </li></ul></ul><ul><ul><li>26+ countries </li></ul></ul>
    • 4. Agenda <ul><li>What's in MySQL 5.0 </li></ul><ul><li>Fitting in with the Fedora Community </li></ul><ul><li>Differences in packaging </li></ul><ul><li>Contributing to the OSS movement </li></ul><ul><li>MySQL and India </li></ul><ul><li>Resources </li></ul><ul><li>What is coming in the Future? </li></ul><ul><li>Q&A? </li></ul>
    • 5. What is in 5.0? <ul><li>Views </li></ul><ul><li>Stored Procedures </li></ul><ul><li>Triggers </li></ul><ul><li>Precision Math </li></ul><ul><li>Instance Manager </li></ul><ul><li>XA </li></ul>• GUI Tools • Cluster • Information Schema • Cursors • Archive • More…..
    • 6. CREATE VIEW Syntax <ul><li>CREATE [ OR REPLACE ] </li></ul><ul><li>[ALGORITHM = </li></ul><ul><li>{MERGE | TEMPTABLE | UNDEFINED}] </li></ul><ul><li>VIEW view_name </li></ul><ul><li>[(column_list)] </li></ul><ul><li>AS select_statement </li></ul><ul><li>[WITH [CASCADED | LOCAL] CHECK OPTION] </li></ul><ul><li>CREATE OR REPLACE VIEW view1 ... </li></ul>
    • 7. Stored Procedure Syntax <ul><li>CREATE PROCEDURE procedure_name </li></ul><ul><li>([parameter [...]]) </li></ul><ul><li>[characteristic ...] </li></ul><ul><li>routine_body </li></ul><ul><li>CREATE FUNCTION function_name </li></ul><ul><li>([parameter [,...]]) </li></ul><ul><li>RETURNS data_type </li></ul><ul><li>[characteristic ...] </li></ul><ul><li>routine_body </li></ul><ul><li>ALTER and DROP also fully supported </li></ul>
    • 8. CREATE TRIGGER Syntax <ul><li>CREATE TRIGGER trigger_name </li></ul><ul><li>{BEFORE | AFTER} </li></ul><ul><li>{INSERT | UPDATE | DELETE} ON table_name </li></ul><ul><li>FOR EACH ROW trigger_action </li></ul><ul><li>CREATE TRIGGER tg1 </li></ul><ul><li>AFTER INSERT ON t1 </li></ul><ul><li>FOR EACH ROW <compound SQL statement> ; </li></ul>
    • 9. MySQL 5.0: Precision Math <ul><li>Exact calculations with well defined rounding </li></ul><ul><li>At least 56 digits precision </li></ul><ul><li>Very fast with static memory allocation </li></ul>Sample: create table d2 (n decimal(64,3)); insert into d2 values (233221213212312312321321321321), (34543543324325435435435), (32432432432454374435234543456); Query OK, 3 rows affected (0.00 sec) select sum(n) from d2; +------------------------------------+ | sum(n) | +------------------------------------+ | 531307360376620022163982600424.000 | +------------------------------------+ 1 row in set (0.01 sec)
    • 10. XA Support <ul><li>MySQL supports distributed transaction processing: </li></ul><ul><ul><li>Two-phase commit with XA protocol available in InnoDB as of 5.0 </li></ul></ul><ul><ul><li>Commit grouping to improve performance </li></ul></ul><ul><ul><li>XA JDBC driver </li></ul></ul><ul><li>In MySQL: </li></ul><ul><ul><li>the server acts as a transaction manager or resource manager </li></ul></ul><ul><ul><li>storage engines can be implemented as a resource manager </li></ul></ul>Application MySQL  MySQL acts as RM  Queries on ACID TX tables included Other XA RM  Included in app TX TX Scope MySQL XA Engine1  MySQL acts as TM  Storage engines act as RM XA Engine 2 TX Scope  Different XA engine can be in same TX OR InnoDB is the first XA-Compliant Storage Engine 5.1 5.0
    • 11. MySQL Cluster <ul><li>Query Cache support </li></ul><ul><li>Multi Read Ranges </li></ul><ul><ul><li>batched reads for IN clause conditions) </li></ul></ul>• Objects in Clusters can now reach 20,000 without a recompile (before it was 1600)
    • 12. Information Schema <ul><li>mysql> SELECT table_name, table_type, engine </li></ul><ul><li>-> FROM INFORMATION_SCHEMA.tables </li></ul><ul><li>-> WHERE table_schema = 'tp' </li></ul><ul><li>-> ORDER BY table_type, table_name DESC; </li></ul><ul><li>+------------+------------+--------+ </li></ul><ul><li>| table_name | table_type | engine | </li></ul><ul><li>+------------+------------+--------+ </li></ul><ul><li>| t2 | BASE TABLE | MyISAM | </li></ul><ul><li>| t1 | BASE TABLE | InnoDB | </li></ul><ul><li>| v1 | VIEW | NULL | </li></ul><ul><li>+------------+------------+--------+ </li></ul>• INFORMATION_SCHEMA is a new, virtual database. • INFORMATION_SCHEMA can be queried via a SELECT statement, so there is no need to learn a new set of commands to be able to access the metadata you need. • MySQL creates and populates the tables automatically.
    • 13. Archive <ul><li>New Storage Engine </li></ul><ul><li>Substantially reduces storage requirements >50% </li></ul><ul><li>Information is stored packed via gzip, unzipped on the fly </li></ul><ul><li>Insert and Select only </li></ul><ul><li>Great for historical data you need to keep online but not for blazing response times </li></ul>
    • 14. Where we fit in with the Fedora Community <ul><li>Just a package out of 1,500 </li></ul><ul><ul><li>(okay, really 13/1795) </li></ul></ul><ul><li>Want to forge better relationships </li></ul><ul><ul><li>If you're a LAMP user, on Fedora, it should all “just work” </li></ul></ul><ul><li>Ship more Extras packages that rely on MySQL in FC </li></ul><ul><ul><li>These could be our tools (Query Browser, Adminstrator) </li></ul></ul><ul><ul><li>Could be other apps (mytop, Gforge, SequioaERP) </li></ul></ul><ul><ul><li>Working out “Alternatives”, like the NDB cluster, is the hard part </li></ul></ul><ul><li>Fix bugs with the package maintainer </li></ul>
    • 15. How Red Hat and MySQL package differently <ul><li>RPMs are both provided at dev.mysql.com or within Fedora </li></ul><ul><li>For the longest time, Fedora only shipped MySQL 3.23 </li></ul><ul><ul><li>There were licensing misconceptions with MySQL's FLOSS exception </li></ul></ul><ul><ul><li>A lot of applications built against 3.23 client libraries </li></ul></ul><ul><li>#include <asm/atomic.h> </li></ul><ul><ul><li>Depends on kernel headers to build </li></ul></ul><ul><ul><ul><li>sparc/sparc64/ppc64 don't enable atomic_* functions as inlines </li></ul></ul></ul><ul><ul><ul><li>i386: kernel not compiled for SMP -> compiled code will not be SMP-safe (omits lock prefix before instruction) </li></ul></ul></ul>
    • 16. How Red Hat and MySQL package differently II <ul><li>No access to the extra storage engines: </li></ul><ul><ul><li>NDB Cluster </li></ul></ul><ul><ul><li>ARCHIVE (large data store, no indexes, small footprint) </li></ul></ul><ul><ul><li>CSV </li></ul></ul><ul><ul><li>BLACKHOLE </li></ul></ul><ul><ul><li>FEDERATED (stores data in remote databases; MySQL specific) </li></ul></ul><ul><li>Get the -max package to satisfy these requirements </li></ul><ul><li>mysql-shared-standard required for upgrades </li></ul>
    • 17. Some Core/MySQL statistics <ul><li>MySQL versions in various Cores: </li></ul><ul><ul><li>Core 1&2: 3.23.58 (rebuilt in Core 3) </li></ul></ul><ul><ul><li>Core 4: 4.1.11 </li></ul></ul><ul><ul><li>Core 5: 5.0.18 </li></ul></ul><ul><li>In FC-4, packages that depend on the 3.23 client libraries: </li></ul><ul><ul><li>mysqlclient10-devel, MyODBC, libdbi-dbd-mysql </li></ul></ul><ul><li>FC-5 ships the 3.23 client libraries, but nothing else depends on it (besides its -devel package) </li></ul><ul><ul><li>mysqlclient14 (4.1.14) is provided </li></ul></ul>
    • 18. How you can contribute to the OSS movement <ul><li>With Fedora, you have Extras </li></ul><ul><ul><li>package maintenance, documentation, translation </li></ul></ul><ul><ul><li>...or contribute to a package within Fedora, with upstream </li></ul></ul><ul><li>MySQL has many entry points </li></ul><ul><li>Translation of documentation/applications </li></ul><ul><ul><li>Get access to translation repository </li></ul></ul><ul><ul><li>In locale directory, find how_to_translate.txt </li></ul></ul><ul><ul><li>Sign Translation Agreement, granting MySQL AB all exclusive rights to translation </li></ul></ul><ul><ul><li>Requires: Love for your language/dialect, and proficient English </li></ul></ul>
    • 19. How you can contribute to the OSS movement II <ul><li>Conversion of applications </li></ul><ul><ul><li>Plenty of applications out there use another database </li></ul></ul><ul><ul><li>Make them run on MySQL </li></ul></ul><ul><ul><li>Requires: knowledge of SQL, working knowledge of application's language DB query methods </li></ul></ul><ul><li>MySQL code-base </li></ul><ul><ul><li>BitKeeper is still used for code </li></ul></ul><ul><ul><ul><li>Sane build scripts exist </li></ul></ul></ul><ul><ul><ul><li>http://dev.mysql.com/doc/refman/5.1/en/installing-source-tree.html </li></ul></ul></ul><ul><ul><li>Requires: knowledge of various bits used in MySQL </li></ul></ul><ul><li>Work on the GUI tools </li></ul><ul><li>Work on the embedded version of MySQL </li></ul>
    • 20. Resources <ul><li>We have mailing lists </li></ul><ul><ul><li>http://lists.mysql.com/ </li></ul></ul><ul><ul><li>mysql-list is very high traffic, but is a great place to learn/contribute </li></ul></ul><ul><ul><li>Internals list if you’re into the codebase </li></ul></ul><ul><li>We have forums </li></ul><ul><ul><li>http://forums.mysql.com/ </li></ul></ul><ul><ul><li>These come with RSS feeds! </li></ul></ul><ul><li>http://dev.mysql.com/ is a great resource </li></ul><ul><li>The manual is excellent! </li></ul>
    • 21. Business Intelligence/Data Warehousing • Table/Index Partitioning • Full Text Search Enhancements • Better XML Handling – XPath • Archive engine enhancements High Availability • Disk-based Cluster • Row-based Replication • Cluster replication Easier Manageability • Task Scheduler • Transaction support for Federated Engine Higher Performance • Faster alter table • Faster add/drop index for MySQL Cluster • Faster data import operations • Better problem user and SQL identification • New Performance/Load Testing Utility • New MyISAM memory option
    • 22. Business Intelligence/Data Warehousing Table/Index Partitioning • Perfect for data warehouses or other VLDB situations • Increases performance – only needed partitions are accessed • Eases space/data management burden on DBA • Supports range, hash, key, list, and composite methods • Supported by all storage engines in MySQL • More options than Microsoft, DB2, or Sybase partitioning • Partition key must be integer (or convertible to integer) • Local indexes only – no global primary or unique keys • Parallelism not supported in this version
    • 23. • Address parts in XML document • Allows manipulation of • Strings • Booleans • Numbers • Models XML document as tree of nodes Business Intelligence/Data Warehousing XML Xpath Support XML
    • 24. • Faster I/O operations • Lower Memory requirements • Autoincrement column support • Unique key support • Non-unique key support Business Intelligence/Data Warehousing Archive Engine Enhancements
    • 25. • Tables now can be designated to be disk-based • Tablespaces used to store table disk data • Tables can be either disk or main memory • Indexes still main memory only High Availability MySQL Cluster Disk-Based Data
    • 26. High Availability Row-Based Replication • New replication option – statement-based replication retained • Handles all replication scenarios (deterministic, etc.) • Safest form of replication • Common to most other RDBMS’s • Statement-based approach still available • Mixed mode available that does statement and row-based replication
    • 27. High Availability MySQL Cluster Replication • Replicate data from one MySQL Cluster to another • Limitation – no cross-server logging of add/drop/alter tables
    • 28. Higher Performance Better Problem User/SQL Identification • SHOW PROCESSLIST command now system table • General and Slow Query Log now system tables • Can easily query tables to find all or just inefficient SQL • General/Slow Query Log use CSV engine and can be read by MS Excel SQL
    • 29. Higher Performance New Performance/Load Testing Utility • Named “mysqlslap” • Simulates many concurrent connections to MySQL server • Repetitively runs designated SQL load • Can test multiple engines • Performs creation of test schema and population of data
    • 30. MySQL 5.1 Rollout Schedule • Beta begins March 1, 2006 • Release Candidate expected in the Fall • GA Fall/End of 2006
    • 31. Thanks! Colin Charles Community Engineer colin@{mysql.com,fedoraproject.org}

    ×