Postgres vs. MySQL

From: Evilio del Rio
Subject: Postgres vs. MySQL
Date: ,
(view: Whole thread, Raw)
Responses: Re: Postgres vs. MySQL  ("Steinar H. Gunderson")
Re: Postgres vs. MySQL  (Richard Huxton)
Re: Postgres vs. MySQL  (Christian Fowler)
Re: Postgres vs. MySQL  ("Joshua D. Drake")
Re: Postgres vs. MySQL  ("Steinar H. Gunderson")
Re: Postgres vs. DSpam  (Andrew McMillan)
Re: [dspam-users] Postgres vs. MySQL  (Clifton Royston)
List: pgsql-performance

Tree view

Postgres vs. MySQL  (Evilio del Rio, )
 Re: Postgres vs. MySQL  ("Steinar H. Gunderson", )
 Re: Postgres vs. MySQL  (Richard Huxton, )
 Re: Postgres vs. MySQL  (Christian Fowler, )
  Re: Postgres vs. MySQL  ("Steinar H. Gunderson", )
   Re: Postgres vs. MySQL  (Dave Cramer, )
 Re: Postgres vs. MySQL  ("Joshua D. Drake", )
 Re: Postgres vs. MySQL  ("Steinar H. Gunderson", )
 Re: Postgres vs. DSpam  (Andrew McMillan, )
  Re: Postgres vs. DSpam  (Neil Conway, )
  Re: Postgres vs. DSpam  ("Jim C. Nasby", )
 Re: [dspam-users] Postgres vs. MySQL  (Clifton Royston, )
  Re: [dspam-users] Postgres vs. MySQL  ("Casey Allen Shobe", )
   Re: [dspam-users] Postgres vs. MySQL  (Lionel Bouton, )
 Re: [dspam-users] Postgres vs. MySQL  (Christopher Browne, )


I have installed the dspam filter
( on our mail server
(RedHat 7.3 Linux with sendmail 8.13 and procmail). I have ~300 users
with a quite low traffic of 4000 messages/day. So it's a quite common
platform/environment, nothing spectacular.

First time(s) I tried the Postgres interface that was already installed
for other applications.  Whenever I begin to train and/or filter
messages throug dspam the performance is incredibly bad. First messages
are ok but soon the filter time begins to increase to about 30 seconds
or more! I looked for some optimization both for the linux  kernel and the
postgres server.  Nothing has work for me. I always have the same
behavior. For isolation purposes I started using another server just to
hold the dspam database and nothing else. No matter what I do: postgres
gets slower and slower with each new message fed or filtered.

Several strategies have failed: newest RPMs from,
pg_autovacuum, etc.

I finally tried the MySQL driver.

I have started using this tool right now for dspam, so I am a newcomer
in MySQL.

The result: after some preparation in configuring some parameters for
mysqld (with the "QuickStart" Guide from all works fine!

It's incredible! the same servers, the same messages, the same dspam
compilation (well each one with the corresponding
--with-storage-driver=*sql_drv). Postgres is getting worst than
30s/message and MySQL process the same in less than a second.

I can surrender the Postgres server by just corpus-feeding one single
short message to each user (it takes hours to process 300 users!).

On the other hand, MySQL only takes a few minutes to process the same

I do not want to make flame over Postgres (I have always prefered it for
its capabilities) but I am absolutely impressed by MySQL (I have seen
the light!)

Please, could anyone explain me this difference?
Is Postgres that bad?
Is MySQL that good?
Am I the only one to have observed this behavior?



Evilio Jose del Rio Silvan   Centre Mediterrani d'Investigacions
                Marines i Ambientals
"Microsoft sells you Windows, Linux gives you the whole house" - Anonymous

pgsql-performance by date:

From: "gnari"
Subject: Re: FW: Index usage
From: Mike Mascari
Subject: Re: Slow execution time when querying view with WHERE clause