Re: Synchronized scans - Mailing list pgsql-patches

From Jeff Davis
Subject Re: Synchronized scans
Date
Msg-id 1180984669.7489.4.camel@dogma.v10.wvs
Whole thread Raw
In response to Synchronized scans  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: Synchronized scans
List pgsql-patches
On Mon, 2007-06-04 at 10:53 +0100, Heikki Linnakangas wrote:
> I'm now done with this patch and testing it.
>

Great!

> For the record, this patch has a small negative impact on scans like
> "SELECT * FROM foo LIMIT 1000". If such a scan is run repeatedly, in CVS
> HEAD the first 1000 rows will stay in buffer cache, but with the patch
> each scan will start from roughly where previous one stopped, requiring
> more pages to be read from disk each time. I don't think it's something
> to worry about in practice, but I thought I'd mention it.
>

No surprise here, as you and Bruce have already pointed out.

If we wanted to reduce the occurrence of this phenomena, we could
perhaps "time out" the hints so that it's impossible to pick up a hint
from a scan that finished 5 minutes ago.

It doesn't seem helpful to further obscure the non-determinism of the
results, however.

Regards,
    Jeff Davis


pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Synchronized scans
Next
From: Alvaro Herrera
Date:
Subject: Re: Synchronized scans