Skip site navigation (1) Skip section navigation (2)

Re: WIP patch: convert SQL-language functions to return tuplestores

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: WIP patch: convert SQL-language functions to return tuplestores
Date: 2008-10-27 07:25:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sun, Oct 26, 2008 at 09:49:49PM -0400, Tom Lane wrote:
> So I'm concluding that we can easily afford to switch to tuplestore-always
> operation, especially if we are willing to put any effort into tuplestore
> optimization.  (I note that the current tuplestore code writes 24 bytes
> per row for this example, which is a shade on the high side for only 4 bytes
> payload.  It looks like it would be pretty easy to knock 10 bytes off that
> for a 40% savings in I/O volume.)

I thought that the bad case for a tuplestore was if the set returning
function was expensive and the user used it with a LIMIT clause. In the
tuplestore case you evaluate everything then throw it away.

Your test cases, if you append LIMIT 1 to all of them, how do the
timings compare then?

Have a nice day,
Martijn van Oosterhout   <kleptog(at)svana(dot)org>
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

In response to


pgsql-hackers by date

Next:From: Ron MayerDate: 2008-10-27 07:27:44
Subject: Re: new correlation metric
Previous:From: Tom LaneDate: 2008-10-27 03:02:59
Subject: Re: array_agg and array_accum (patch)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group