Re: SV: MySQL and PostgreSQL speed compare - Mailing list pgsql-general

From Stephan Szabo
Subject Re: SV: MySQL and PostgreSQL speed compare
Date
Msg-id Pine.BSF.4.21.0012291102570.18941-100000@megazone23.bigpanda.com
Whole thread Raw
In response to SV: MySQL and PostgreSQL speed compare  ("Jarmo Paavilainen" <netletter@comder.com>)
List pgsql-general
> >>> Sir, thanks for sharing this with us. However, unless you can explain
> >>> why queries inside of transactions run faster than queries outside of
> >>> transactions, I would be inclined to mistrust the test. I haven't
>
> I was suprised too. But the only difference is that I do a "BEGIN" before I
> start inserting/modifying/deleting and then when Im done I do a "COMMIT".
> Everything between those are exactly the same. Ive been told that MySQL does
> not support transactions (by default) so there the test is broken. And with
> PostgreSQL, well something inside PostgreSQL is broken (it cant be right
> that with transaction PostgreSQL is 10 times faster than without).

All PostgreSQL statements are in some transaction.  If you're not using
explicit transactions (ie, autocommit) then it's effectively wrapping the
statement in a transaction block of its own, so you're doing the
transaction start/end (including any necessary file access) <n> times
rather than once which is probably most of the difference you're seeing.


pgsql-general by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: MySQL and PostgreSQL speed compare
Next
From: "Robert D. Nelson"
Date:
Subject: RE: MySQL and PostgreSQL speed compare