X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 40336D1B233 for ; Thu, 29 Jul 2004 15:41:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03689-06 for ; Thu, 29 Jul 2004 18:41:43 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 102F5D1B241 for ; Thu, 29 Jul 2004 15:41:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6TIfbT5016243; Thu, 29 Jul 2004 14:41:37 -0400 (EDT) To: "Merlin Moncure" Cc: gsstark@mit.edu, pgsql-performance@postgresql.org Subject: Re: best way to fetch next/prev record based on index In-reply-to: <6EE64EF3AB31D5448D0007DD34EEB34101AF11@Herge.rcsinc.local> References: <6EE64EF3AB31D5448D0007DD34EEB34101AF11@Herge.rcsinc.local> Comments: In-reply-to "Merlin Moncure" message dated "Thu, 29 Jul 2004 14:23:15 -0400" Date: Thu, 29 Jul 2004 14:41:37 -0400 Message-ID: <16242.1091126497@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/229 X-Sequence-Number: 7620 "Merlin Moncure" writes: > I would much rather see postgres 'get' (a,b,c) > (a1, > b1, c1)...if there is even a chance this is possible, I'll direct my > efforts there. For the ISAM context this whole discussion is kinda moot, because you really don't want to have to plan and execute a fairly expensive query for every record fetch. If we had all the improvements discussed, it would be a reasonably cheap operation by the standards of "execute an independent query", but by the standards of "fetch next record in my query" it'll still suck. (Using PREPARE might help, but only somewhat.) It strikes me that what you really want for ISAM is to improve the cursor mechanism so it will do the things you need. I'm not sure what's involved, but let's talk about that angle for a bit. regards, tom lane