From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jeffrey W(dot) Baker" <jwbaker(at)acm(dot)org> |
Cc: | Glen Parker <glenebob(at)nwlink(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: proposal: be smarter about i/o patterns in index scan |
Date: | 2004-05-19 20:31:20 |
Message-ID: | 20357.1084998680@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Jeffrey W. Baker" <jwbaker(at)acm(dot)org> writes:
> No doubt, you can't just naively create giant vectors of TIDs and expect
> to sort them. Is there any concept in Pg of an unrealized result?
Only for the case of a partially-read plan result. That is, we do this
for rowsets, but not for scalars or arrays. A lot of the point of the
LIMIT 1 example is that it is exploiting the fact that we won't ever
materialize the full output of the indexscan.
> If you scanned an index building up a result set that was totally
> unrealized, except for the TID and the index columns, you could
> cheaply join two such results without ever touching the heap. You
> could also use the existing Sort execution step to sort such a result.
> Then don't touch the heap something accesses a non-index column, or
> because you are returning the result somewhere and need to satisfy
> MVCC visibility limits.
This is basically what I was talking about with IndexOnlyScan/TidExpand.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2004-05-19 20:54:33 | Re: proposal: be smarter about i/o patterns in index scan |
Previous Message | Gary Doades | 2004-05-19 20:23:47 | Re: PostgreSQL performance in simple queries |