Re: crosstab - Mailing list pgsql-sql

From Josh Berkus
Subject Re: crosstab
Date
Msg-id 200503012047.08799.josh@agliodbs.com
Whole thread Raw
In response to crosstab  (Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>)
List pgsql-sql
THeo,

> I have tried using unions or subselects however the table is quite large
> and it takes far too long to run. The most efficient way would be to create
> a stored proc that uses a cursor to loop through the table transforming the
> data into the new table structure. However I would appreciate your feeback
> before writing this procedure?

A proc won't run any faster ... much slower, in fact.    Unless you mean that 
you want to use it to correct the actual table structure, which is what you 
should be doing?

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-sql by date:

Previous
From: Theo Galanakis
Date:
Subject: crosstab
Next
From: Steffen Boehme
Date:
Subject: Performance of Views