Re: query optimization question - Mailing list pgsql-sql

From Christoph Haller
Subject Re: query optimization question
Date
Msg-id 3DC93C27.5927F7D6@rodos.fzk.de
Whole thread Raw
In response to query optimization question  (<terry@ashtonwoodshomes.com>)
List pgsql-sql
Now that I've given your problem more thoughts (and searched for similar
stuff),
I think what you need is generating a cross table resp. pivot table.
Related to this, I am thinking of a query using Conditional Expressions
likeCOUNT ( CASE WHEN ... THEN 1 ELSE NULL) in order to use GROUP BY.
Together with Richard's idea of using a function age_range(date) it
seems
realizable. I'm not yet ready to make a more detailed proposal, but you
might
want to think about it in the meantime, too.

Regards, Christoph



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: FW: query optimization question
Next
From: Stephan Szabo
Date:
Subject: Re: FW: query optimization question