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 Betts wrote: > On 2009-08-19, 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. > > plpgsql functions don't play well with temp tables IME. > there

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 wrote: > On 2009-08-19, 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. > > plpgsql functions don't play well with temp tables IME. W

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

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

2009-08-20 Thread Jasen Betts
On 2009-08-19, 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. plpgsql functions don't play well with temp tables IME. there are work-arounds and they are ugly. if you caus use a differ

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

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 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

[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 prett