Re: [GENERAL] GROUP BY problem with 6.5 - Mailing list pgsql-general

From Ross J. Reedstrom
Subject Re: [GENERAL] GROUP BY problem with 6.5
Date
Msg-id 19990705101602.A7939@wallace.ece.rice.edu
Whole thread Raw
In response to Re: [GENERAL] GROUP BY problem with 6.5  (Tamas Nyitrai <defiant@telnet.hu>)
List pgsql-general
On Mon, Jul 05, 1999 at 02:01:11PM +0200, Tamas Nyitrai wrote:

<snipped a gentle rebuff to my earlier slightly high-handed post>

Tamas -
Sorry didn't mean to come across sounding short. Bruce's answer was just a
little ... succinct, since you had mentioned you had queries that used to
work, I thought I should mention _why_ the behavior changed. Then I got
carried away, imaging how people might repond to that.

As to lack of SQL knowledge in this regard, let me suggest you analyze
the queries that you are doing group by on, and only return the fields
you actually need grouped on (and the aggregates, of course.) in particular,
look out for constructs like 'SELECT foo.* ...' that wildcard is almost
never appropriate for a GROUP BY query.

HTH,
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005

pgsql-general by date:

Previous
From: David Warnock
Date:
Subject: Re: [GENERAL] Joins and links
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Joins and links