X-Original-To: pgsql-patches-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id CAE3F9FA6B5 for ; Wed, 2 Aug 2006 16:18:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 19152-01 for ; Wed, 2 Aug 2006 19:18:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 12C5E9FA6A2 for ; Wed, 2 Aug 2006 16:18:29 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k72JIQlr019647; Wed, 2 Aug 2006 15:18:26 -0400 (EDT) To: Joe Conway cc: pgsql-patches@postgreSQL.org Subject: Re: Values list-of-targetlists patch for comments (was Re: In-reply-to: <44D0EA83.7050702@joeconway.com> References: <44B69778.5050104@dunslane.net> <50461.84.63.113.55.1152832991.squirrel@pezone.net> <44B7ADFC.90205@dunslane.net> <44D03D9F.80203@joeconway.com> <15263.1154526181@sss.pgh.pa.us> <44D0AF87.2030304@joeconway.com> <16892.1154528708@sss.pgh.pa.us> <44D0B9C1.2020608@joeconway.com> <17704.1154534183@sss.pgh.pa.us> <44D0EA83.7050702@joeconway.com> Comments: In-reply-to Joe Conway message dated "Wed, 02 Aug 2006 11:10:11 -0700" Date: Wed, 02 Aug 2006 15:18:26 -0400 Message-ID: <19646.1154546306@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.816 tagged_above=0 required=5 tests=SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/60 X-Sequence-Number: 20576 Joe Conway writes: > What if we built an array of A_Const nodes instead of a List? Maybe we > could use something akin to appendStringInfo()/enlargeStringInfo() to > build the array of nodes and enlarge it in chunks. For lists this short I'm not sure how much of a win it'd be. It's interesting though to think about doing something like that within the List abstraction itself. We did a "fastlist" hack once before and it was a crock ... don't want to do that again. But now that we've got a distinction between List and ListCell you could imagine that a List header has a small private array of ListCells ... tuning the size might be tricky though. Another thing we could consider is flattening the double-level list into a single list ... probably be a pain notationally, but it'd save one List header and one ListCell per VALUES sublist. And it would offer more traction for an array-inside-Lists optimization. regards, tom lane