From: Josh Berkus <josh@agliodbs.com>
To: Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: crosstab
Date: Tue, 1 Mar 2005 20:47:08 -0800
Message-ID: <200503012047.08799.josh@agliodbs.com> (raw)
In-Reply-To: <D1444817B78AB546BF2896C2B70E7F04371F22@ganesh.au.lpint.net>
References: <D1444817B78AB546BF2896C2B70E7F04371F22@ganesh.au.lpint.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, Theo.Galanakis@lonelyplanet.com.au
Subject: Re: crosstab
In-Reply-To: <200503012047.08799.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox