Presentation is loading. Please wait.

Presentation is loading. Please wait.

Postgres MySQL Bakeoff

Similar presentations


Presentation on theme: "Postgres MySQL Bakeoff"— Presentation transcript:

1 Postgres MySQL Bakeoff
right tool for the right job when you have a hammer in your hand, everything looks like a nail

2 The contenders

3 SQL standard COMPLIANCE
Postgres SQL92/99 (most of it) subqueries, views, multi-user support, transactions, query optimization, inheritance, and arrays. Mysql SQL92 (some of it) subqueries views (mysql5)

4 SQL NON-compliance Postgres Cannot query across multiple databases
Mysql transactions inheritance arrays multiuser support query optimization

5 Table

6 Keys primary m & p foreign p m needs innodb multi primary keys

7 Data types Both: integer char, varchar, text Mysql only
tinytext, mediumtext tinyint longtext, long blog Postgres only boolean timestamp

8 Sequences Postgresql yup Mysql what gives?
cause of ire when writing code to run on both

9 Platforms Postgres Won't run on Windows9x/Me, NextStep, Ultrix. Mysql
supposedly better on windows than pg.

10 Speed Postgres forks on every connection slower Optimization options
Mysql choose the right table type connection time 10x faster than postgres

11 Stability Postgres once apon a time.. memory leaks and ick
Now rock solid (7.4) Mysql unhappy with high connections per seconds (hundreds) Random disconnects and core dumps are exceptionally rare. proven in more high demand production environments than postgres

12 Data & Referential Integrity
Postgres LOVES DATA INTEGRITY! transactions, rollbacks ON DELETE/UPATE, cascade Mysql basic CHECK clause allowed, but does nothing. InnoDB has foreign keys MySAM allows foreign keys, but they do nothing

13 Security Mysql GRANT + REVOKE username tablename hostname Postgres
no grant/revoke for CREATE TABLE db access by host, ident, network segment

14 Locking and Concurrency
Postgres MultiVersion Concurrency Control (MVCC) row level locks reader not blocked by writer Mysql Table locking for ISAM/MyISAM and HEAP tables InnoDB has row locking

15 Large Object Postgres needs lo_create then store by OID
lo_read/lo_write Mysql just like other fields INSERT, UPDATE, SELECT and DELETE

16 Schema alterations Mysql Alter table (transaction gotcha)
ADD, DROP, RENAME column CHANGE type Postgres ALTER TABLE, can be rolledback

17 Language support Neither handle multi char set databases Postgres
compile with –enable-locale Mysql not many tasks use locale

18 Future Mysql adding views competing transaction support Postgres
Improving performance speeds

19 Summary Data integrity important? use Postgres
Speed, replication important, use well tuned mysql cheap hosting? mysql


Download ppt "Postgres MySQL Bakeoff"

Similar presentations


Ads by Google