Why You Should NOT Move Away From Oracle - PostgreSQL

31
Why You Should NOT Move Away From Oracle Presented by Gurjeet Singh (C) EnterpriseDB Corporation 2011. All Rights Reserved. Company Confidential

Transcript of Why You Should NOT Move Away From Oracle - PostgreSQL

Page 1: Why You Should NOT Move Away From Oracle - PostgreSQL

1EnterpriseDB, Postgres Plus and Dynatune are trademarks of EnterpriseDB Corporation. Other names may be trademarks of their respective owners. © 2010. All rights reserved.

Why You Should NOT Move Away From

Oracle

� Or, why you SHOULD

Presented by Gurjeet Singh

Sep 15, 2011

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 2: Why You Should NOT Move Away From Oracle - PostgreSQL

Agenda

2

� Compare Oracle and Postgres� Business Perspective� Technical Perspective

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 3: Why You Should NOT Move Away From Oracle - PostgreSQL

Personal Preferences: Oracle

3

� You just Looooove Larry Ellison� You want him to buy another yacht� � or, another private jet team,� � or, spend more on Sailboat racing

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 4: Why You Should NOT Move Away From Oracle - PostgreSQL

Personal Preferences: Postgres

4

� You love Open Source Software� You hate Oracle� You loathe Larry Ellison� You want to own a yacht someday� � or a Sailboat racing team� � or a private jet.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 5: Why You Should NOT Move Away From Oracle - PostgreSQL

Cost: Oracle

5

� Oracle costs money� - big money� You get a lot of features in return� 80% of users use only 20% of the features� Customers are sold features they might never use� � eg, RAC

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 6: Why You Should NOT Move Away From Oracle - PostgreSQL

Cost: Postgres

6

� Free� Freer than GPL (MySQL), because it's BSD licensed� Comparable features to Oracle, and growing� Very active developer community

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 7: Why You Should NOT Move Away From Oracle - PostgreSQL

Cost: Postgres Plus [Advanced Server]

7

� Postgres Plus: Free� Advanced Server: Cheap alternative to Oracle� Help Ed Boyajian buy a yacht :)

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 8: Why You Should NOT Move Away From Oracle - PostgreSQL

Support: Oracle

8

� Costs big money� Service Level Agreements in place� Have to be a big customer to get fixes quick.� Smaller/less impacting issues delayed to next releases

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 9: Why You Should NOT Move Away From Oracle - PostgreSQL

Support: Postgres

9

� Mailing lists: Free� Quick turnaround times on bug reports, or other issue.� No SLA� Many commercial companies providing support:

� EnterpriseDB� 2nd Quadrant� OmniTI� �

� Provide Service Level Agreements� Quick turnaround times� Much cheaper than Oracle

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 10: Why You Should NOT Move Away From Oracle - PostgreSQL

Ecosystem: Oracle

10

� Vast knowledge pool� Forums

� In-house (Ask Tom, ...)� Independent

� Certification� Market full of Developers and DBAs.� Peace of mind for managers, as resource-pool is big.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 11: Why You Should NOT Move Away From Oracle - PostgreSQL
Page 12: Why You Should NOT Move Away From Oracle - PostgreSQL

Application Ecosystem: Oracle

12

� Almost every DB driven application supports Oracle� Every major language has Oracle connectors

� PHP, Perl, Java, C/C++� Myriad of types of applications

� Reporting� Data Warehousing� Web apps,� Tools

� Even many OSS apps start with Oracle as backend

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 13: Why You Should NOT Move Away From Oracle - PostgreSQL

Application Ecosystem: Postgres

13

� Every DB driven application worth its salt supports/attempting to support Postgres

� Eg. RedHat Spacewalk/Satellite

� Connectors for every major language� ODBC, JDBC, .Net, Perl, PHP, �

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 14: Why You Should NOT Move Away From Oracle - PostgreSQL

Source Code: Oracle

14

� Closed Source� No public visibility

� Hires white-hat hackers� Single owner� No public contribution

� except as bug reports/feature requests� Huge Humongous code base

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 15: Why You Should NOT Move Away From Oracle - PostgreSQL

Source Code: Postgres

15

� Open Source: BSD style License� No one can buy the Postgres project

� Open for public scrutiny� Contributions welcome from public� Very open and welcoming community� Users benefit from vast community and its contributions

� Eg. SSI: Serializable Snapshot Isolation: First research paper by Michael Cahill in 2009, then Kevin Grittner, along with Dan Ports, a student at MIT, implemented it in Postgres. First ever production level integration of this feature.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 16: Why You Should NOT Move Away From Oracle - PostgreSQL

ACID: Oracle and Postgres

16

� Both are strictly ACID compliant� Atomic transactions� Consistent state - always� Isolation of transactions� Durable transactions even after crash� PS: concurrency is not required by ACID

� Stable, rock solid databases� REDO logs/Write Ahead Logs (WAL)

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 17: Why You Should NOT Move Away From Oracle - PostgreSQL

RDBMS: Oracle and Postgres

17

� Both products use Relations and Relational Algebra as basis

� They both deviate slightly from Relational Algebra, in same ways.

� They both provide Tables(Relations), Views, Triggers.� Both support core constraints: Primary Key, Foreign Key,

NOT NULL, CHECK.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 18: Why You Should NOT Move Away From Oracle - PostgreSQL

Query Optimizer: Oracle and Postgres

18

� Both have great Query Optimizers� Oracle started with RBO, moved on to CBO� Oracle and Postgres both use cost-based optimization

and dynamic-programming developed in System-R� Oracle supports Hints, Postgres doesn't (EnterpriseDB

does)

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 19: Why You Should NOT Move Away From Oracle - PostgreSQL

Multi-Master: Oracle

19

� RAC : Write scalable multi-master solution� Holy grail for database vendors� Follow-up of Oracle Parallel Server� Uses Cache-fusion

� Current TPC-C Benchmark leader� Requires that application scales well on single node

database with increasing CPU counts.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 20: Why You Should NOT Move Away From Oracle - PostgreSQL

Multi-Master: Postgres

20

� Postgres-XC� Write-scalable, shared-nothing implementation� Open Source� Collaboration of NTT, Japan and EnterpriseDB � ETA: 2013

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 21: Why You Should NOT Move Away From Oracle - PostgreSQL

High Availability: Oracle

21

� Data Guard� Redo Apply, or� SQL Apply

� Redo Apply in 10g has a limitation that the node can be either in recovery mode, or in Read-only, but not both.

� 11g feature Active Data Guard allows read-only connections while recovery is in progress.

� Active Data Guard requires additional license ($$$).� Still not usable by some reporting apps (E-Business Suite)

� Data Guard Broker: Utilities to manage Data Guard� SQL Apply does not work with many database objects.

� SYS objects, BFILE, ROWID, UROWID, Oracle Spatial.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 22: Why You Should NOT Move Away From Oracle - PostgreSQL

High Availability: Postgres

22

� Streaming Replication� Equivalent of Oracle's Redo apply

� Hot Standby feature allows read-only queries on standby node while in recovery.

� No equivalent of SQL Apply� Use trigger based replication solutions, like Slony,

Bucardo, Londiste.� Slony, Works for data objects, except Large Objects.

� No Equivalent of Data Guard Broker for management of standby nodes

� Postgres Enterprise Manager might support this some day.

� PG 9.1 brings Synchronous Replication

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 23: Why You Should NOT Move Away From Oracle - PostgreSQL

Data Partitioning: Oracle

23

� Requires Enterprise Edition� Provides List, Hash, Range partitioning� Integrated with the Query Optimizer� Parallel queries can finish quickly when working with

partitions.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 24: Why You Should NOT Move Away From Oracle - PostgreSQL

Data Partitioning: Postgres

24

� No syntactical sugar� Supported by a combination of 3 features:

� Table Inheritance� CHECK constraints� constraint_exclusion

� The query optimizer performs an optimization only if all three of the above being used correctly, and the query uses the right WHERE clause.

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 25: Why You Should NOT Move Away From Oracle - PostgreSQL

Geospatial: Oracle

25

� Oracle Spatial Extensions� Special Storage types� Special Index Types� Costs extra; additional license� Does not work with certain other features, like Data

Guard's SQL Apply

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 26: Why You Should NOT Move Away From Oracle - PostgreSQL

Geospatial: Postgres

26

� PostGIS� Add-on; external module� GPL Licensed

� Standards Compliant� Uses special indexes provided by Postgres� Bundled with Postgres Plus Standard Server � free

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 27: Why You Should NOT Move Away From Oracle - PostgreSQL

Full Text Search: Oracle

27

� Oracle Text, Ultra Search, InterMedia� Comes with Enterprise Edition� Search documents even outside database

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 28: Why You Should NOT Move Away From Oracle - PostgreSQL

Full text Search: Postgres

28

� Extensive feature-set� Can divide a document in 4 sections by relevance� Sort results by relevance� Can create FTS indexes on concatenated columns� Can be integrated with external tables to search

documents outside the database� Feature integrated into core Postgres

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 29: Why You Should NOT Move Away From Oracle - PostgreSQL

Others

29

� Postgres: Transactional DDL� Postgres: Create functions and triggers in many

languages� PL/pgSQL, PL/Perl, PL/PHP, PL/R, PL/Java, PL/TCL, �

� Both: Updatable views (PG 9.1 brings triggers on views)� Oracle: On-disk bitmap indexes (PG: in-memory only)� Postgres: Exclusion Constraints

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 30: Why You Should NOT Move Away From Oracle - PostgreSQL

Migration Tools

30

� EnterpriseDB� EnterpriseDB Migration Toolkit� Ora2PG� OraFce� TOra� Custom migrations

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential

Page 31: Why You Should NOT Move Away From Oracle - PostgreSQL

EOT

31

Q & A

(C) EnterpriseDB Corporation 2011.  All Rights Reserved. Company Confidential