[support] Drupal: MySQL vs. PostgreSQL

larry at garfieldtech.com larry at garfieldtech.com
Wed Jul 21 20:15:04 UTC 2010


On 7/21/10 2:55 PM, Ivan Sergio Borgonovo wrote:
> On Wed, 21 Jul 2010 10:35:48 -0500
> "larry at garfieldtech.com"<larry at garfieldtech.com>  wrote:
>
>> The decision between MySQL and Postgres should be made primarily
>> based on the existing skillset of your DB admin.  Drupal's queries
>
> That's like saying all problems can be solved with a hammer because
> you're a hammer master.
> Drupal seems to be so successful because it is a development tool
> with a really good CMS as an example application ;)

If we want to get into wacky analogies, then that's the wrong one. :-) 
Hammer vs. screwdriver is using an SQL DB vs. MongoDB.  Different tools 
for different types of problems.

MySQL vs. Postgres is, in most cases, more akin to whether your 
high-performance car should be a Mercedes or BMW.  If you can get parts 
from your mechanic more easily for the Mercedes, then that's what you 
want.  They're both still nice cars.

> It can be wrapped around many other applications... and different
> applications may have different requirements.
> Different DB are more suited to different tasks.
> Maybe you already have an application running on one DB and Drupal
> is just the web UI.
>
> The fact that the core CMS application doesn't need specific
> characteristics of any DB doesn't mean it's not legit to develop
> modules that actually make use of some characteristics that are
> available to just some of them.

If there's specific edge case functionality you need, sure.  But that's 
a very small edge case, usually site-specific.  For general use, either 
one will work fine if properly configured and tuned (where is where the 
"what your DB admin knows" comes in).

> MySQL doesn't have full text search on InnoDB nor a mature GIS
> data/index (if any??). I don't know how easy it is to develop C
> extensions for MySQL (if possible???)...
> So postgresql for example has dblink, hstore (a sort of EAV),
> support for trigrams... and you can program your own if you need it
> (I wrote a simple text similarity extension based on tsearch2
> exactly for one of my Drupal projects and I hadn't used C for more
> than 10 lines in years).

MySQL does have a GIS plugin, although I've never worked with it.  I'm 
pretty sure you can build extensions for it as well, but I have never 
needed to do that, either.

But now you are talking about extended features of Postgres vs. extended 
features of MySQL, which is a completely different question than which 
one performs better at running Drupal.

--Larry Garfield


More information about the support mailing list