From: Jim Nasby <jim@nasby.net>
To: Markus Schaber <schabi@logix-tt.com>
Cc: Pgsql-Performance ((E-mail)) <pgsql-performance@postgresql.org>
Subject: Re: Confusion and Questions about blocks read
Date: Tue, 26 Sep 2006 23:08:35 -0400
Message-ID: <FD014885-5492-4F44-8C2E-F77C85B4FDCF@nasby.net> (raw)
In-Reply-To: <4515265E.7080902@logix-tt.com>
References: <33c6269f0609220834x6c10db9xa40d6121825dfd14@mail.gmail.com>
<780.1158942275@sss.pgh.pa.us>
<4515265E.7080902@logix-tt.com>
On Sep 23, 2006, at 8:19 AM, Markus Schaber wrote:
> Btw, would it be feasible to enhance normal index scans by looking at
> all rows in the current table block whether they meet the query
> criteria, fetch them all, and blacklist the block for further
> revisiting
> during the same index scan?
>
> I think that, for non-sorted cases, this could improve index scans a
> little, but I don't know whether it's worth the effort, given that
> bitmap indidex scans exist.
The trade-off is you'd burn a lot more CPU on those pages. What might
be interesting would be collapsing bitmap scan data down to a page
level when certain conditions were met, such as if you're getting a
significant number of hits for a given page. There's probably other
criteria that could be used as well. One issue would be considering
the effects of other bitmap index operations; if you're ANDing a
bunch of scans together, you're likely to have far fewer tuples per
page coming out the backside, which means you probably wouldn't want
to burn the extra CPU to do full page scans.
BTW, I remember discussion at some point about ordering the results
of a bitmap scan by page/tuple ID, which would essentially do what
you're talking about. I don't know if it actually happened or not,
though.
If this is something that interests you, I recommend taking a look at
the code; it's generally not too hard to read through thanks to all
the comments.
--
Jim Nasby jimn@enterprisedb.com
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
--
Jim Nasby jimn@enterprisedb.com
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: jim@nasby.net, schabi@logix-tt.com
Subject: Re: Confusion and Questions about blocks read
In-Reply-To: <FD014885-5492-4F44-8C2E-F77C85B4FDCF@nasby.net>
References: <33c6269f0609220834x6c10db9xa40d6121825dfd14@mail.gmail.com> <780.1158942275@sss.pgh.pa.us> <4515265E.7080902@logix-tt.com> <FD014885-5492-4F44-8C2E-F77C85B4FDCF@nasby.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox