Re: Synchronized scans

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Synchronized scans
Date: 2007-06-05 17:34:18
Message-ID: 1181064858.7660.111.camel@dogma.v10.wvs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Mon, 2007-06-04 at 21:39 -0400, Tom Lane wrote:
> idea of deleting the hint. But if we could change the hint behavior to
> say "start reading here", successive short LIMITed reads would all start
> reading from the same point, which fixes both my reproducibility concern
> and Heikki's original point about being able to re-use cached data.
> You'd only get into the irreproducible behavior if the LIMIT was larger
> than the amount of data scanned between hint updates.

That's how it works now. Small limit queries don't change the location
in the hint, so if you repeat them, the queries keep starting from the
same place, and fetching the same tuples.

Large LIMIT queries (larger than the number of pages between updates) do
change the location in the hint, and so that's really the case you're
worried about.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-06-05 17:43:40 Re: Synchronized scans
Previous Message NikhilS 2007-06-05 09:20:23 Re: CREATE TABLE LIKE INCLUDING INDEXES support