Re: big un stacking query - help save me from myself

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: big un stacking query - help save me from myself
Дата
Msg-id 1363274879.88608.YahooMailNeo@web162906.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на big un stacking query - help save me from myself  (Kirk Wythers <kirk.wythers@gmail.com>)
Ответы Re: big un stacking query - help save me from myself
Список pgsql-general
Kirk Wythers <kirk.wythers@gmail.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: Do not understand why this happens
Следующее
От: Vick Khera
Дата:
Сообщение: Re: Do not understand why this happens