Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 85293476695 for ; Wed, 26 Jun 2002 19:40:11 -0400 (EDT) Mailbox-Line: From tgl@sss.pgh.pa.us Wed Jun 26 19:40:11 2002 Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 15251476C70 for ; Wed, 26 Jun 2002 18:59:18 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g5QMx4v16549; Wed, 26 Jun 2002 18:59:04 -0400 (EDT) To: Gunther Schadow Cc: pgsql-sql@postgresql.org Subject: Re: Possibility of Index-Only access in PostgreSQL? In-reply-to: <3D19FFCF.8030800@aurora.regenstrief.org> References: <3D19FFCF.8030800@aurora.regenstrief.org> Comments: In-reply-to Gunther Schadow message dated "Wed, 26 Jun 2002 12:54:23 -0500" Date: Wed, 26 Jun 2002 18:59:04 -0400 Message-ID: <16546.1025132344@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-5.4 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT,SUBJ_ENDS_IN_Q_MARK version=2.30 X-Spam-Level: X-Archive-Number: 200206/357 X-Sequence-Number: 8322 Gunther Schadow writes: > I would be very eager to have > index-only reads in PostgreSQL. It won't happen. See the many, many prior discussions of this point in the archives. Something we perhaps *could* do is to "batch" index reads: pull a bunch of TIDs from the index, sort these by page number, and then access the corresponding heap tuples in page number order. Unfortunately you'd probably need to batch some thousands of TIDs to really improve the locality of reference this way, and that would mean holding pins on quite a few index pages, which would complicate the bookkeeping and probably create a severe concurrency hit (if not actually introduce a risk of deadlock; I haven't thought hard enough about it to be sure). We could avoid these potential downsides by only sorting one index page's worth of TIDs at a time, but most likely that doesn't buy enough locality of reference to be worth the trouble. Still it seems like a useful avenue to investigate. If you want to pursue it further, this is not the list to be discussing it on; pgsql-hackers is the place for such discussions. regards, tom lane