Re: [GENERAL] Temp table or normal table for performance?

2009-08-21 Thread Ivan Sergio Borgonovo
On 20 Aug 2009 13:43:10 GMT Jasen Betts ja...@xnet.co.nz wrote: On 2009-08-19, Stephen Cook scli...@gmail.com wrote: Let's say I have a function that needs to collect some data from various tables and process and sort them to be returned to the user. plpgsql functions don't play well

Re: [GENERAL] Temp table or normal table for performance?

2009-08-21 Thread Grzegorz Jaƛkiewicz
On Thu, Aug 20, 2009 at 2:43 PM, Jasen Bettsja...@xnet.co.nz wrote: On 2009-08-19, Stephen Cook scli...@gmail.com wrote: Let's say I have a function that needs to collect some data from various tables and process and sort them to be returned to the user. plpgsql functions don't play well

Re: [GENERAL] Temp table or normal table for performance?

2009-08-20 Thread Sam Mason
On Wed, Aug 19, 2009 at 08:10:14PM -0400, Stephen Cook wrote: I've decided on some type of table storage because basically I'm combining information from several different tables (some of which need to recursively get other rows) and massaging it and sorting it in ways far too convoluted to

Re: [GENERAL] Temp table or normal table for performance?

2009-08-20 Thread Jasen Betts
On 2009-08-19, Stephen Cook scli...@gmail.com wrote: Let's say I have a function that needs to collect some data from various tables and process and sort them to be returned to the user. plpgsql functions don't play well with temp tables IME. there are work-arounds and they are ugly. if you

Re: [GENERAL] Temp table or normal table for performance?

2009-08-20 Thread Martijn van Oosterhout
On Wed, Aug 19, 2009 at 03:03:28AM -0400, Stephen Cook wrote: Let's say I have a function that needs to collect some data from various tables and process and sort them to be returned to the user. In general, would it be better to create a temporary table in that function, do the work and

[GENERAL] Temp table or normal table for performance?

2009-08-19 Thread Stephen Cook
Let's say I have a function that needs to collect some data from various tables and process and sort them to be returned to the user. In general, would it be better to create a temporary table in that function, do the work and sorting there, and return it... or keep a permanent table for

Re: [GENERAL] Temp table or normal table for performance?

2009-08-19 Thread Stephen Cook
Peter Hunsberger wrote: On Wed, Aug 19, 2009 at 2:03 AM, Stephen Cookscli...@gmail.com wrote: Let's say I have a function that needs to collect some data from various tables and process and sort them to be returned to the user. In general, would it be better to create a temporary table in that