Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgresql for OLAP

Does anyone have experience of using PostgreSQL for an OLAP setup, using cubes against the database etc. Having come across a number of idiosyncracies when using MySQL for OLAP, are there reasons in favour of using PostgreSQL instead (assuming that I want to go the open source route)?

like image 633
davek Avatar asked Nov 22 '09 13:11

davek


People also ask

Is PostgreSQL good for OLAP?

PostgreSQL is a powerful database, and for OLAP workloads, it can certainly meet expectations. With a good deal of planning and tuning, the database engine will be able to deliver analytics at scale.

Is PostgreSQL OLTP or OLAP?

PostgreSQL is a popular open-source OLTP database for systems of record. It's the fourth most-widely used database in the world, and its popularity has grown more than any other database for three of the last four years in a row, according to the recent DB-Engines database rankings.

Is Postgres good for OLTP?

PostgreSQL is fully ACID compliant and therefore ideal for OLTP (Online Transaction Processing) workloads. However, PostgreSQL is not only a good choice for its superior OLTP capabilities – it is also a highly capable analytical database and can be integrated nicely with mathematical software such as Matlab and R.


2 Answers

There are a number of data warehousing software vendors that are based on Postgresql (and contribute OLAP related changes back to core fairly regularly). Check out https://greenplum.org/. You'll find that PG works a lot better (for nearly any workload, OLAP especially) than MySQL. Greenplum and other similar solutions should work a bit better than PG depending on your data sets and use cases.

like image 181
Trey Avatar answered Sep 21 '22 22:09

Trey


PGSQL is much better suited for Data Warehousing compared to MySQL. We had thought initially to go with MySQL, but it performs poorly in aggregations if data grows to a few million rows. PGSQL performs almost 20 times faster in caparison with MySQL for 20 million records for a single fact table on same hardware setup. If for some reason you choose to go with MySQL, then you should use MyISAM storage engine for fact tables rather then InnoDB; you will see slightly better performance.

like image 39
Red Boy Avatar answered Sep 18 '22 22:09

Red Boy