Postgresql vs Oracle [closed] Postgresql vs Oracle [closed] oracle oracle

Postgresql vs Oracle [closed]


My opinion is that PostgreSQL is very close to Oracle, especially with the upcoming 9.1 which offers an alternative to Oracle's DataGuard.

On the SQL Level there are really head-to-head, not much difference (with Postgres having actually more "little helpers" and features that make life a lot easier).

Things where Oracle offers still more features:

  • Materialized views (available since Postgres 9.3, but Postgres still has no incremental refresh or query rewrite)
  • Flashback queries and flashback archives (they are really cool)
  • Index only scans (available since Postgres 9.2, but not as efficient as Oracle's implementation in my experience)
  • transaction control in stored procedures (there will be support for that in the upcoming Postgres 11, but not as complete as in Oracle)
  • Index organized tables (aka "clustered indexes")
  • ASH and AWR reports (Postgres 9.6 added the infrastructure to have something like that in the future)
  • parallel queries
    Postgres 9.6 added some basic ability to run queries in parallel, Postgres 10 improved that even more and Postgres 11 will even be able to use it for things like create table as
  • parallel DML
  • Changing tables that are used in views (e.g. drop a column)

As much as I like PostgreSQL one thing that can be really annoying is configuring (auto)vacuum to cope with high write traffic.


Oracle is more popular than PostgreSQL for the same reason that Microsoft is more popular than Linux in larger companies: no head of IT with a budget has ever lost his job for choosing them over an open source alternative.


Ask yourself these questions:

Who is going to support your website (and database)? There are enterprise db companies out there which can provide world wide support, documentation, consultants etc. It is not just Oracle, but it is very likely that it's easier to find Oracle or MSSQL specialist in every country.

Now, if you are willing to have more challenge to find PostgreSQL specialists or you are willing to train your team for PostgreSQL, go for it! Today (2016) PostgreSQL is the most advanced open-source RDBM and is on-par for most deployments with commercial competition.

Are there required features that only one database system offers? You cannot use advanced features of both database platforms, so check what it is that your application really needs. For example, if you require specific replication, backups and other scenarios, you should read documentation for both platforms to make an educated choice. They both offer similar features, but its better to be prepared.

Big companies usually stick with one database platform. When they buy an Oracle license once (and employ DBAs and other specialists), they continue using that vendor. That's the usual scenario, but I assume you're free from such baggage.

Also in the modern IT era, another question is to consider. Do I really need RDBMS? Every insert/update/delete costs very much. When you define foreign keys and other constraints it costs even more. It's like 1 to 10 operations when comparing MongoDB vs Oracle. On the other hand, RDBMS gives you more safety and data integrity. If you don't need it (i.e. lost comment is not an issue for you) you could go for MongoDB and others. Beware that usually you want RDBM in 9 out of 10 cases tho!