Ora2postgres DF
Ora2postgres DF
Josh Berkus David Fetter PostgreSQL Experts Inc. for HP Tux Talks July 2009
"I was impressed thoroughly with the ease of implementation, as well as compatibility and installation of PostgreSQL, considering its open source nature," said Mark S., an Oracle Certified DBA. "Using it in enterprise applications [and] Web site situations was relatively painless [and] a simplified security structure made it very appealing." -TechTarget.com
migrating from Oracle or using it concurrently about 30% of active community Many Oracle DBAs regard other OSDBs as toys
Similar Communities
Database administrators Data architects Appreciation for standards & practices Respect for Oracle features, development Migration experience for peer help
Database Priorities
PostgreSQL
2.Security 3.Reliability 4.Standards 5.DB Features 6.Performance 7.Ease-of-use 8.Programmer Features 1.Data integrity
Oracle
1.Data integrity 2.Reliability 3.Performance 4.Security 5.Standards 6.DB Features 7.Programmer Features 8.Ease-of-use
Oracle10 PostgreSQL8.3
Cost
Throughput
12
16 Cores
32
* this chart is based on approximate data and not a benchmark, and is meant for illustrative purposes only.
PostgreSQL
Oracle
DW Platforms
Terabytes 4
10
* based on several informal surveys of users. intended for illustrative purposes only.
Cost
source: news.cnet.com
Cost Comparison
PostgreSQL $0.00 $0.00 $0.00 $24,000.00 $24,000.00 $120,000.00 Oracle $190,000.00 $70,000.00 $44,000.00 $67,000.00 $371,000.00 $639,000.00
16-Core Server License Spatial/GIS Server License Partitioning Annual Maintenance TCO (1 year) TCO (5 years)
Reasons to Migrate
Reasons to Migrate
Cost
Oracle per-CPU licensing costs are high PostgreSQL maintenance prices are low Only pay for production support, not development/trial
Administration Features
Reasons to Migrate
Cost Administration
PostgreSQL requires less oversight, system resources Automated installation and deployment is easier Adding new servers requires only technical resources, not paperwork
Features
Reasons to Migrate
Make use of special PostgreSQL features and/or add-ins Make use of open source tools which integrate well with PostgreSQL
Applications
3rd party vendors may not support Postgres Oracle Applications will not migrate Internal applications may require porting work
Applications Training
DBAs & Developers need to learn PostgreSQL Sysadmin staff need to support PostgreSQL
May not be able to take advantage of Postgres features Oracle has some features PostgreSQL does not
Performance Timeline
Applications designed for Oracle will perform better on Oracle Oracle scales to large hardware better
Timeline
Application/Tools are already in production No time to learn new tools, test, plan migration
Not tied to Oracle syntax, architecture No third-party vendors to negotiate with Staff not wedded to Oracle Not in production yet
Not performance-constrained
100's of transactions per second, not 1000's Not already straining Oracle's performance limits
Migration Roadblocks
PL/pgSQL is compatible but not 100% Oracle +outer joins ROWNUM, CONNECT BY, others
Proprietary syntax
Migration Roadblocks
OLAP Oracle Toolkits (BI, Audit, Security, etc.) Others infrastructure tools management & monitoring tools
Migration Roadblocks
Evaluating Migration
training porting
Alternative: Side-by-Side
this is actually easier than you'd think where migration cost is lowest and benefits are highest
Integration Tools
DBI-Link
ETL
GUI
GUI
ERD
ORM
Hibernate Spring EJB 3.0 Spring Etc., etc., etc.
Reporting: BIRT
Reporting: JasperSoft
Reporting: Microstrategy
Migration Tools
SQL*Loader
Hot Standby
PostgreSQL Features
PostGIS and OSGeo tools psql client MVCC / Rollbacks Transactional DDL Stored Procedure Languages Used-Defined Data Types Specialty Index Types
Instead of Oracle's Undo Log Enables transactional DDL Eliminates a major Oracle headache Simplifies I/O optimization
Log is write-only
Transactional DDL
including all create/drop/alter statements except create/drop database All-or-nothing Aids deployment of application changes Enables agile development of the database
with own storage operators index methods ISNs/ISBNs Networks Proteins Crypto
Specialty Indexes
Partial Indexes
including Partial Unique index on a function or calculation without materializing inclusion in networks, shapes arrays user-defined data types
Expression Indexes
SQL Gotchas
Oracle non-standard NULLs SEQUENCE syntax Oracle (+)Outer Join syntax Forget about optimizer hints Different timestamp arithmetic No ROWID Postgres triggers are not inlined
Other Gotchas
Encodings all have different names Need to quote procedure bodies Cursor syntax is different No autonomous transactions in procedures Error messages are different
Conclusion
Several tools exist to help you migrate Other tools are available for integration Oracle has several features which PostgreSQL doesn't
Conclusion
PostgreSQL has some features Oracle doesn't And you need to look out for common migration issues.
More Information
PostgreSQL
Upcoming Events
www.postgresql.org
www.pgexperts.com josh@pgexperts.com davidf@pgexperts.com
PG West: Oct. 16 pgCon Paris: Nov. 5 pgCon Japan: Nov 19 User Groups monthly, worldwide
This presentation copyright 2009 PostgreSQL Experts Inc., licensed for distribution under the Creative Commons Attribution License, except for the Oracle Trademark, which belongs to Oracle, Inc. and is used here under fair use.