Greatdebate Postgres vs Mysql

45
The Great Debate: PostgreSQL versus MySQL Jim Mlodgenski VP, Technical Services EnterpriseDB

description

 

Transcript of Greatdebate Postgres vs Mysql

Page 1: Greatdebate Postgres vs Mysql

The Great Debate:

PostgreSQL versus MySQL

Jim Mlodgenski

VP, Technical Services

EnterpriseDB

Page 2: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 3: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 4: Greatdebate Postgres vs Mysql

Open Source Database Trends

Page 5: Greatdebate Postgres vs Mysql

Open Source Database Trends (cont.)

Page 6: Greatdebate Postgres vs Mysql

Open Source Database Trends (cont.)

Page 7: Greatdebate Postgres vs Mysql

Open Source Database Trends (cont.)

Battle for Open Source Database Dominance

Page 8: Greatdebate Postgres vs Mysql

Open Source Database Trends (cont.)

Battle for Database Dominance

Page 9: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 10: Greatdebate Postgres vs Mysql

PostgreSQL Strengths

• Strong Advanced Feature Support

– Triggers, Stored Procedures, Rules

– Server side languages

• SQL, Java, Ruby, Perl, Python, TCL, etc

– Point in Time Recovery

– Table partitioning

– Transactional DDL

– Table Inheritance

Page 11: Greatdebate Postgres vs Mysql

PostgreSQL Strengths (cont.)

• Strong Security• Object Level Privileges assigned to “Roles & User”.

• Kerberos + SSL communication.

• Data Level Encryption (AES, 3DES, etc)

• Ability to utilise 3rd party Key Stores in a full PKI

infrastructure

• Foundation for full compliance with some of the strictest of

security standards (PCI Data Security Standard).

“By default PostgreSQL is probably the most security-aware database

available”

David Litchfield - The Database Hackers Handbook

Page 12: Greatdebate Postgres vs Mysql

PostgreSQL Strengths (cont.)

• Data Integrity

– Multi Version Concurrency Control

– Write Ahead Logging

– Online Backup

– Foreign Keys

– Constraints

Page 13: Greatdebate Postgres vs Mysql

PostgreSQL Strengths (cont.)

• Flexible BSD license

– Corporate IT developers can modify open source

code under the BSD license without having to

contribute back enhancements

– Independent Software Vendors are free to

redistribute without the fear of being “infected” by an

open source license

Page 14: Greatdebate Postgres vs Mysql

PostgreSQL Strengths (cont.)

• Strong Open Source Community– Independent & Thriving Development Community

• 10 committers and ~200 reviewers

• 1,500 contributors and 10,000+ members

• 2,000,000+ downloads

– 20 years of enterprise-class development

Page 15: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 16: Greatdebate Postgres vs Mysql

PostgreSQL Weaknesses

• Lack of an integrated replication solution

– External solutions are required

– There is no agreed solution in the

PostgreSQL community for the

majority of replication

requirements

– The current external solutions

have a high learning curve

Page 17: Greatdebate Postgres vs Mysql

PostgreSQL Weaknesses (cont.)

• No upgrade facility for major releases

– The data must be either exported or replicated to the

new version

• At least twice of the storage is needed during the upgrade process

• On large datasets, an upgrade is a very time consuming process

Page 18: Greatdebate Postgres vs Mysql

PostgreSQL Weaknesses (cont.)

• Performance issues

– Indexes can not be

used to directly return

the results of a query

– Query execution plans

are not cached

– Some update and delete operations leave expired

data in the data files causing more IO

– Bulk loading operations may become CPU bound

Page 19: Greatdebate Postgres vs Mysql

PostgreSQL Weaknesses (cont.)

• Lack of experienced production talent

– Many of the experienced

PostgreSQL administrators do not

have experience in large

corporate environments

Page 20: Greatdebate Postgres vs Mysql

PostgreSQL Weaknesses (cont.)

• Sparse Independent Software Vendor support

– There are few management and monitoring tools

capable of using PostgreSQL

– When tools are available, many times it is through a

generic ODBC or JDBC data source

– PostreSQL is Rarely the primarily database for an

application, including open source applications

Page 21: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 22: Greatdebate Postgres vs Mysql

MySQL Strengths

• Integrated Replication

– Master-Slave Replication

• Scale-Out Implementations

• Offload Reporting

• Geographic Data Distribution

– MySQL Cluster

• Horizontal Scalability

Page 23: Greatdebate Postgres vs Mysql

MySQL Strengths (cont.)

• Performance

– Low overhead MyISAM storage engine for read

mostly applications

– Memory storage engine for frequently accessed

tables

– Query Cache for frequently used statements

Page 24: Greatdebate Postgres vs Mysql

MySQL Strengths (cont.)

• Multiple Storage Engines

– Native Storage Engines

• MyISAM

• Merge

• Memory

• Federated

– Partner Developed Storage Engines

• InnoDB

• solidDB

• Infobright

Page 25: Greatdebate Postgres vs Mysql

MySQL Strengths (cont.)

• Strong Corporate Backing

• Corporate Platinum Partners

Page 26: Greatdebate Postgres vs Mysql

MySQL Strengths (cont.)

• Popularity

– Independent Software Vendor Support

– Availability of experienced resources

– Easily accessible information from various sources

such as whitepapers, blogs, and books

Page 27: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 28: Greatdebate Postgres vs Mysql

MySQL Weaknesses

• Metadata uses MyISAM

– Transactions involving the system

catalog are not ACID compliant

– A server crash can corrupt the

system catalog

Page 29: Greatdebate Postgres vs Mysql

MySQL Weaknesses (cont.)

• Immature security model

– No pluggable authentication

module preventing centrally

managed accounts

– No support for roles resulting in

difficulty in maintaining privileges

for many users

Page 30: Greatdebate Postgres vs Mysql

MySQL Weaknesses (cont.)

• Immature server side programming model

– Stored procedures are not cacheable

– All tables used in the procedure or trigger are

pre-locked

– All cursors are materialized

– Only supports SQL

Page 31: Greatdebate Postgres vs Mysql

MySQL Weaknesses (cont.)

• Scalability Problems

– Difficulty with increases

in concurrency

– Difficulty with an increase

in the number of cores in

the server

Page 32: Greatdebate Postgres vs Mysql

MySQL Weaknesses (cont.)

• “Closed” Open Source Community

– The community is not contributing to the MySQL

server code base

• It is currently very hard to contribute code and ideas

– There are not many MySQL developers that are also

using MySQL

– Developers outside of MySQL do not have commit

rights

– There are no new 'innovative' features in 5.1 from

real life applications

Page 33: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 34: Greatdebate Postgres vs Mysql

Application Types

• MySQL

– Web 1.0 Type Applications

• The MyISAM storage engine is ideal for online catalog

functionality

• Dynamic data is centered around an individual user such

as user profiles and shopping carts

Page 35: Greatdebate Postgres vs Mysql

Application Types

• MySQL

– Reporting and Data Warehousing

• The pluggable storage engine facility

allows for enhanced business

intelligence functionality

– Infobright

• The MyISAM storage engine has very

low overhead for read intensive

applications

Page 36: Greatdebate Postgres vs Mysql

Application Types

• MySQL

– Commercial and Open Source Applications

• MySQL is the primary database for many of the popular

open source projects

• Many commercial applications include MySQL in the

demonstration versions

Page 37: Greatdebate Postgres vs Mysql

Application Types (cont.)

• PostgreSQL

– Web 2.0 Type Applications

• The use of a distributed memory cache offloads many of

the queries from the database resulting in a heavy

transactional load

• The dynamic data such

as forum posts and wikis

are commonly being

viewed by users while

updates are occurring

Page 38: Greatdebate Postgres vs Mysql

Application Types (cont.)

• PostgreSQL

– Operational Data Stores

• The data is constantly changing

while reports executing

– Leverages the Multi Version

Concurrency Control feature

• Multiple users running reports

simultaneously requiring a scalable

database

Page 39: Greatdebate Postgres vs Mysql

Application Types (cont.)

• PostgreSQL

– New Application Development

• The numerous procedural languages allows developers

to leverage existing knowledge

• Transactional DDL is

almost a requirement in a

Ruby environment

• Debugging server side

code speeds the

development process

Page 40: Greatdebate Postgres vs Mysql

Agenda

• Open Source Database Trends

• PostgreSQL Strengths

• PostgreSQL Weaknesses

• MySQL Strengths

• MySQL Weaknesses

• Application Types

• About EnterpriseDB

Page 41: Greatdebate Postgres vs Mysql

EnterpriseDB Company Facts

• Award-winning enterprise open source database company

• World’s largest concentration of PostgreSQL expertise including several core team members

• Founded in March 2004

• Headquartered in Edison, NJ and offices in 6 countries.

• Over 250 customers including: Sony, FTD, TDAmeritrade, British Telecom

• 65 partners including: Red Hat, Sun, IBM, Cognos, Compiere

Best Database Award

2005, 2006 & 2007

Top 100 Technology

Companies

2006 “Ones to Watch”

Page 42: Greatdebate Postgres vs Mysql

Postgres Plus

Postgres Plus Advanced

Server offers additional

features including Oracle

compatibility

Postgres Plus is fully open

source and contains the

PostgreSQL project along

with additional components

Page 43: Greatdebate Postgres vs Mysql

Sample Customer Case Studies

Oracle-based Custom Applications

• Sony replaced Oracle for on-line games, user forums, back-office

Oracle-based ISV

• Tomax, retail industry ISV, replaced Oracle as default database

MySQL upgrade for Custom Applications

• Vonage scaled applications from MySQL to EnterpriseDB

SQL Server upgrade by 3rd party ISV

• Replaced SQL Server as embedded mammography database

Oracle-based Business Intelligence

• Running Oracle Reports on EnterpriseDB; saved 80%

Page 44: Greatdebate Postgres vs Mysql

Contact Information

Jim Mlodgenski

VP, Technical Services, EnterpriseDB

[email protected]

Page 45: Greatdebate Postgres vs Mysql

Thank you.

Questions?