Re: "GROUP BY" really slowing down query.

From: Jan-Peter Meyer <jan-peter.meyer_at_csg.de>
Date: 8 Dec 1994 08:59:27 GMT
Message-ID: <3c6htf$c1d_at_horus.mch.sni.de>


dhiltz_at_whsun1.whoi.edu (David Hiltz) wrote:
> And whenever I add the "group by" clause, that you see
> below, it slows the query down to nothing. Without the

> "group by" clause the answer comes back in a few seconds.
 

> select TAB_A.year, TAB_A.lat, TAB_A.lon,
> TO_CHAR (sysdate,'fmdd-Mon-yy') Today
> from TAB_B,TAB_A
> where TAB_A.area = 513 or TAB_A.area = 514
> and TAB_B.month = TAB_A.month
> and TAB_B.docn = TAB_A.docn
> group by TAB_A.year, TAB_A.lat, TAB_A.lon;

It seems to me that you are just trying to get the output unique, as you are not doing a "sum" or such operation on the group. Have you tried a SELECT DISTINCT instead of the GROUP BY apporoach?

Good luck!

jan-peter.meyer_at_scg.de Received on Thu Dec 08 1994 - 09:59:27 CET

Original text of this message