Re: Problem with the group statement...

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Mon, 29 Jul 2002 13:54:41 +0200
Message-ID: <ai3ae1$oap$1_at_dackel.pdb.sbs.de>


"Paul G. Brown" <paul_geoffrey_brown_at_yahoo.com> wrote in message news:57da7b56.0207181314.5d083ccc_at_posting.google.com...
> Sorting input records is only one way to implement group by. Hashing is
> another approach that is actually preferred because it is generally
> more efficient (except in a couple of cases that can generally be inferred
> from the query and the DBMS's statistics).
>
> If your DBMS uses a hash-based approach to GROUP BY then the results will be
> in no particular order.
>
> If you want ordering, you need to be explicit about it in your SQL.
This was what I meant (sorry).
But, since one normally has only one result row per group the order (if I specify ORDER BY) is applied to the result of "GROUP BY" if I understand correctly.

Greetings and thanks!
Volker Received on Mon Jul 29 2002 - 13:54:41 CEST

Original text of this message