Re: SELECT FOR SHARE

From: "Ilja Golshtein" <ilejn(at)yandex(dot)ru>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT FOR SHARE
Date: 2005-10-07 17:53:43
Message-ID: 4346B627.000005.05653@ariel.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>"Ilja Golshtein" <ilejn(at)yandex(dot)ru> writes:
>> I'm interested in SELECT ... FOR SHARE 8.1 feature. I'd tried to
>> measure performance degradation and got something about 30-60% for
>> queries retrieve a lot of rows.
>
>Degradation relative to what?

Thanks for response and sorry for bad formulating.

I've compared queries (SELECTs) with and without FOR SHARE
clause. I think it was CREATE TABLE AS (SELECT ... FOR SHARE)
versus CREATE TABLE AS (SELECT ...).
The same box, same PG, same data.

As far I remember (protocol in office),
if retrive all 10000 records from a table
with some small CHARs and INTs, SELECT FOR SHARE is about 60%
slower then the same SELECT.

If query is complex and it retrieves (and locks) few rows,
difference is not so significant.
No surprise at all.

I'm asking because not sure my tests are exhaustive
and the worst case is covered.

--
Best regards
Ilja Golshtein

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard_D_Levine 2005-10-07 18:11:57 Re: PostgreSQL 8.1 vs. MySQL 5.0?
Previous Message Simon Riggs 2005-10-07 17:45:39 Re: PostgreSQL 8.1 vs. MySQL 5.0?