Re: Values list-of-targetlists patch for comments (was Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-patches(at)postgreSQL(dot)org
Subject: Re: Values list-of-targetlists patch for comments (was Re:
Date: 2006-08-02 19:18:26
Message-ID: 19646.1154546306@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-patches

Joe Conway <mail(at)joeconway(dot)com> 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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Joe Conway 2006-08-03 00:18:39 VALUES clause memory optimization (was: Values list-of-targetlists patch...)
Previous Message Alvaro Herrera 2006-08-02 18:59:52 Re: Values list-of-targetlists patch for comments (was Re:

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2006-08-02 20:05:36 Re: Standby Mode
Previous Message Andrew Dunstan 2006-08-02 19:04:20 Re: Buildfarm failure - asp

Browse pgsql-patches by date

  From Date Subject
Next Message Sergey E. Koposov 2006-08-02 20:18:04 SQL conformance, optional feature T621
Previous Message Alvaro Herrera 2006-08-02 18:59:52 Re: Values list-of-targetlists patch for comments (was Re: