Re: Bitmap index scan preread using posix_fadvise - Mailing list pgsql-patches

From Gregory Stark
Subject Re: Bitmap index scan preread using posix_fadvise
Date
Msg-id 87lk64afm4.fsf@oxford.xeocode.com
Whole thread Raw
In response to Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-patches
Attached is the correct patch, sorry for the confusion.

If anyone's interested in testing it you can do so without the randomarray.c
file by using Pavel Stehule's solution for generating arrays:

postgres=# create table h as (select (random()*1000000)::integer as r, repeat('x',512)::text as t from
generate_series(1,1000000));
SELECT

postgres=# create index hri on h(r);
CREATE INDEX

postgres=# analyze h;
ANALYZE

postgres=# \timing
Timing is on.

postgres=# set preread_pages = 0;   explain analyze select * from h where r = any (array(select
(1+random()*1000000)::integerfrom generate_series(1,100))); 
postgres=# set preread_pages = 100; explain analyze select * from h where r = any (array(select
(1+random()*1000000)::integerfrom generate_series(1,100))); 
postgres=# set preread_pages = 0;   explain analyze select * from h where r = any (array(select
(1+random()*1000000)::integerfrom generate_series(1,100))); 
postgres=# set preread_pages = 100; explain analyze select * from h where r = any (array(select
(1+random()*1000000)::integerfrom generate_series(1,100))); 
postgres=# set preread_pages = 0;   explain analyze select * from h where r = any (array(select
(1+random()*1000000)::integerfrom generate_series(1,100))); 



--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's 24x7 Postgres support!

Attachment

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Bitmap index scan preread using posix_fadvise
Next
From: Luke Lonergan
Date:
Subject: Re: Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access)