Re: PostgreSQL vs MySQL : strange results on insertion - Mailing list pgsql-general

From scott.marlowe
Subject Re: PostgreSQL vs MySQL : strange results on insertion
Date
Msg-id Pine.LNX.4.33.0209051102160.16283-100000@css120.ihs.com
Whole thread Raw
In response to PostgreSQL vs MySQL : strange results on insertion  (fpaul@netcourrier.com)
List pgsql-general
On Thu, 5 Sep 2002 fpaul@netcourrier.com wrote:

> I launch these programs on my computer : Linux Debian with MySQL 3.23.51 and PostgreSQL 7.2.1 (installation by
defaultwith 'apt-get install'). 
> Time to realize 10000 insertions with MySQL:
>     $ time ./test__mysql
>
>     real  0m1.500s
>     user 0m0.150s
>     sys   0m0.090s
> (between 1 and 2 seconds)
>
> Time to realize 10000 insertions with PostgreSQL:
>     $time ./test_postgresql
>
>     real  0m28.568s
>     user 0m0.390s
>     sys   0m0.270s
> (between 28 and 30 seconds !!!.... )
>
> Very strange, isn't it ? Is there something in PostgreSQL's C API that I didn't understand ? Subtleties during the
configuration? I do not want to believe that PostgreSQL is 15 times slower than MySQL ! 
> Thank you for any comment, remark and correction!

Not really all that strange.  Again, this is a side effect of using a
transactionally oriented database.  Try adding a begin; and end; pair
around your inserts in postgresql and see if it runs faster.



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: show ?
Next
From: frbn
Date:
Subject: Re: PostgreSQL vs MySQL : strange results on insertion