X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 8A8B19FA293; Wed, 10 May 2006 16:24:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 60147-01; Wed, 10 May 2006 16:24:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 9B9C79FA2CB; Wed, 10 May 2006 16:24:04 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id EF78B56423; Wed, 10 May 2006 14:24:02 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 10 May 2006 14:24:01 -0500 Date: Wed, 10 May 2006 14:24:01 -0500 From: "Jim C. Nasby" To: PFC Cc: Greg Stark , Tom Lane , pgsql-performance@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Big IN() clauses etc : feature proposal Message-ID: <20060510192401.GQ99570@pervasive.com> References: <445F7FF8.6070707@comcast.net> <1147110142.32369.7.camel@archimedes> <20060508175013.GY99570@pervasive.com> <28288.1147111196@sss.pgh.pa.us> <8764kfz1iq.fsf@stark.xeocode.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060510:lists@peufeu.com::973DZgWGC1GJY6h5:02F3G X-Hashcash: 1:20:060510:gsstark@mit.edu::sqqc+KfnlFcS66cs:005RH6 X-Hashcash: 1:20:060510:tgl@sss.pgh.pa.us::a4PwbL9wVXzHgTj/:00000000000000000000 00000000000000000000000002zJ X-Hashcash: 1:20:060510:pgsql-performance@postgresql.org::/tClCKZlatJC2V5E:00000 0000000000000000000000007qoE X-Hashcash: 1:20:060510:pgsql-hackers@postgresql.org::H5ucAzvVJDx6euml:000000000 0000000000000000000000000ZtX X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/269 X-Sequence-Number: 19056 On Tue, May 09, 2006 at 06:29:31PM +0200, PFC wrote: > You mean the cursors'storage is in fact the same internal machinery > as a temporary table ? Use the source, Luke... See tuplestore_begin_heap in backend/utils/sort/tuplestore.c and heap_create_with_catalog in backend/catalog/heap.c. You'll find that creating a tuplestore is far easier than creating a temp table. Perhaps it would be worth creating a class of temporary tables that used a tuplestore, although that would greatly limit what could be done with that temp table. Something else worth considering is not using the normal catalog methods for storing information about temp tables, but hacking that together would probably be a rather large task. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461