From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Kirk Wythers <kirk(dot)wythers(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: big un stacking query - help save me from myself |
Date: | 2013-03-14 15:27:59 |
Message-ID: | 1363274879.88608.YahooMailNeo@web162906.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Kirk Wythers <kirk(dot)wythers(at)gmail(dot)com> wrote:
> I hace a fairly large table with two columns that I need to
> "de-normalize" (235 million rows) There has got to be a better
> (i.e. faster) approach than what I am doing. I am using a MAX
> CASE on each of the 24 variables (column names variable and
> value) that I want to unstack. Any suggestions would be most
> appreciated.
I didn't understand your description of what you are trying to do,
and the example has so many columns and cases that it would take a
long time to understand it. Can you distill this down to just a
few columns and cases so that it is easier to understand what you
are trying to accomplish? Even better would be a self-contained
test case with just a few rows so people can see "before" and
"after" data. What you have already posted will help give context
on how it needs to scale, which is important, too; but if you make
the issue easier to understand, the odds improve that someone will
volunteer the time needed to make a suggestion.
-Kevin
--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Emre Hasegeli | 2013-03-14 17:07:28 | Re: PostgreSQL 9.2.3 performance problem caused Exclusive locks |
Previous Message | Bill Moran | 2013-03-14 11:42:51 | Re: Do not understand why this happens |