Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql vs Oracle XE vs Postgresql . Scalability and performance, which to chose? [closed]

I understand that this is very broad so let me give you the setting and be specific about my focus points.

Setting:

I am working with an existing PHP application using MYSQL. Tables almost all use the MYISAM engine and contain millions of rows for the most part. One of the largest tables uses an EAV design which is necessary but impacts on performance. The application was written to best leverage MYSQL cache. It requests a fair amount of requests per page load (partialy because of this) and is complex enough to have to go through most tables of the whole DB on each page load.

Pros:

  • it's free
  • MYISAM tables support full text indexes which are important to the application

Cons:

  • With the way things are set up, MYSQL is limited to one CPU for the whole of the application. If one very demanding query is run (or server is under a lot of load) it will queue all others making the site unresponsive
  • MYSQL caching and lack of "WITH" or "INTERSECT" means we have to break our queries down to better use cache. Thus multiplying the number of queries made. For instance, using subqueries over multiple tables with millions of rows (even with decent indexing) turns out to be a big issue with the current/upcomming load and the constraint layed out in the point above (CPU usage)

Feeling the need to scale up in the upcomming year, but not necessarily ready to pay for licensing right away, I've been thinking about rewriting the application and switching DBs.

The three options being considered are to either continue using mysql but with the INNODB engine, this way we can leverage more CPU power. Adapt to Oracle XE and get a license when we need to scale upwards of 4Gb database, 1Gb RAM or the 1 CPU limit (all of which we haven't hit yet). Or adapt to PostgreSQL

So the questions are :

  • How would losing full text indexing impact performance in the three cases (does oracle or postgreSQL have an equivalent?)
  • How do oracle and postgreSQL leverage cache on subqueries, WITH, and UNION/INTERSECT statements
  • How do Oracle and PostgreSQL leverage multicore/cpu power (if/when we get an oracle license)

I think that's already a lot to answer so I'll stop here. I don't mind simple/incomplete answers if there are links to compliment.

If you need any more information just let me know

Thanks in advance guys, the help is appreciated.

like image 201
Pomme.Verte Avatar asked Dec 19 '12 12:12

Pomme.Verte


People also ask

Is PostgreSQL faster than Oracle?

Functionality – Oracle wins It not only provides more transactions per second than PostgreSQL, but also arguably provides higher levels of security. However, it should be noted that many of Oracle's security features come at an added cost.

What is the difference between MySQL and PostgreSQL and Oracle?

MySQL, PostgreSQL, and Oracle are relational database management systems. The major difference between these three databases is that MySQL is open source whereas PostgreSQL is an open-source database management system and Oracle database is developed by Oracle corporation.

Why is MySQL more popular than Postgres?

MySQL is a simpler database that's fast, reliable, well understood, and easy to set up and manage. PostgreSQL is an object-relational database (ORDBMS) with features like table inheritance and function overloading, whereas MySQL is a pure relational database (RDBMS).

What are the advantages of MySQL as compared with Oracle DB?

MySQL advantages:The price of MySQL commercial licenses is less expensive than same configuration of Oracle. Also, MySQL has less demands to the hardware platform compared to Oracle. Each table can have a different storage engine. Each storage engine has particular behavior, features, and properties.


1 Answers

PostgreSQL supports full text search and indexes. Details here.

And it can use any number of CPU cores. It creates separate process for every session + some additional support processes. Details here.

PostgreSQL doesn't have built in query caching, but there are lots of open source utilities for this purpose.

like image 119
Ihor Romanchenko Avatar answered Nov 05 '22 04:11

Ihor Romanchenko