Thread: Info about concurrent sequential scans

Info about concurrent sequential scans

From
Daniele Varrazzo
Date:
Hello,

at Prato PgDay in 2007 I remember hearing in a speech about a (then
yet to come) "seqscan piggyback" feature, allowing concurrent
sequential scans to use the same disk reads. I've now googled for info
about this feature, but I found nothing conclusive (e.g. [1], [2] -
which I don't know where is linked).

So I'd like to know:

is this feature currently implemented (I'm specifically interested in PG 8.3)?
Is there any prerequisite needed to benefit from it (config setting,
query characteristic, etc.)?
Is there any feedback showing the feature kicking in (e.g. an explain
analyze output, log, etc.)?

Thank you very much.

-- Daniele

[1] http://wordpress.metro.cx/2008/02/24/postgresql-83/
[2] http://www.postgresql.org/about/featuredetail/feature.26

Re: Info about concurrent sequential scans

From
Bruce Momjian
Date:
Daniele Varrazzo wrote:
> Hello,
>
> at Prato PgDay in 2007 I remember hearing in a speech about a (then
> yet to come) "seqscan piggyback" feature, allowing concurrent
> sequential scans to use the same disk reads. I've now googled for info
> about this feature, but I found nothing conclusive (e.g. [1], [2] -
> which I don't know where is linked).
>
> So I'd like to know:
>
> is this feature currently implemented (I'm specifically interested in PG 8.3)?
> Is there any prerequisite needed to benefit from it (config setting,
> query characteristic, etc.)?
> Is there any feedback showing the feature kicking in (e.g. an explain
> analyze output, log, etc.)?

The feature is called 'synchronize_seqscans' and was implemented in
Postgres 8.3.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com
  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do
  + If your life is a hard drive, Christ can be your backup. +

Re: Info about concurrent sequential scans

From
Andreas Kretschmer
Date:
Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:

> Hello,
>
> at Prato PgDay in 2007 I remember hearing in a speech about a (then
> yet to come) "seqscan piggyback" feature, allowing concurrent
> sequential scans to use the same disk reads. I've now googled for info
> about this feature, but I found nothing conclusive (e.g. [1], [2] -
> which I don't know where is linked).
>
> So I'd like to know:
>
> is this feature currently implemented (I'm specifically interested in PG 8.3)?

I think, you means this:

 Concurrent large sequential scans can now share disk reads (Jeff Davis)

This is accomplished by starting the new sequential scan in the middle
of the table (where another sequential scan is already in-progress) and
wrapping around to the beginning to finish. This can affect the order of
returned rows in a query that does not specify ORDER BY. The
synchronize_seqscans configuration parameter can be used to disable this
if necessary

Source:
http://www.postgresql.org/docs/current/interactive/release-8-3.html


> Is there any prerequisite needed to benefit from it (config setting,
> query characteristic, etc.)?

No.



Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

Re: Info about concurrent sequential scans

From
Daniele Varrazzo
Date:
On Mon, Feb 22, 2010 at 7:59 PM, Andreas Kretschmer
<akretschmer@spamfence.net> wrote:
> Daniele Varrazzo <daniele.varrazzo@gmail.com> wrote:
>
>> Hello,
>>
>> at Prato PgDay in 2007 I remember hearing in a speech about a (then
>> yet to come) "seqscan piggyback" feature, allowing concurrent
>> sequential scans to use the same disk reads. I've now googled for info
>> about this feature, but I found nothing conclusive (e.g. [1], [2] -
>> which I don't know where is linked).

> I think, you means this:
>
>  Concurrent large sequential scans can now share disk reads (Jeff Davis)
>
> This is accomplished by starting the new sequential scan in the middle
> of the table (where another sequential scan is already in-progress) and
> wrapping around to the beginning to finish. This can affect the order of
> returned rows in a query that does not specify ORDER BY. The
> synchronize_seqscans configuration parameter can be used to disable this
> if necessary
>
> Source:
> http://www.postgresql.org/docs/current/interactive/release-8-3.html

Thank you very much (and thanks to Bruce too). This is the feature and
I'm checking it works "out of the box" on PG 8.3

-- Daniele