Re: SV: MySQL and PostgreSQL speed compare

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jarmo Paavilainen <netletter(at)comder(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: SV: MySQL and PostgreSQL speed compare
Date: 2000-12-29 19:08:02
Message-ID: Pine.BSF.4.21.0012291102570.18941-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mikheev, Vadim 2000-12-29 19:23:48 RE: MySQL and PostgreSQL speed compare
Previous Message Robert D. Nelson 2000-12-29 19:08:00 RE: MySQL and PostgreSQL speed compare