Re: Bitmap index scan preread using posix_fadvise
От | Gregory Stark |
---|---|
Тема | Re: Bitmap index scan preread using posix_fadvise |
Дата | |
Msg-id | 87lk64afm4.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Bitmap index scan preread using posix_fadvise (Was: There's random access and then there's random access) (Gregory Stark <stark@enterprisedb.com>) |
Список | 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!
Вложения
В списке pgsql-patches по дате отправления: