Re: Grouping by date range

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Grouping by date range
Date: 2003-08-20 20:44:50
Message-ID: 1061412290.29044.28.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2003-08-20 at 14:51, Tom Lane wrote:
> Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> > On Wed, Aug 20, 2003 at 13:44:59 -0500,
> > Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> wrote:
> >> The GROUP BY does implicit sorting, so an ORDER BY on the exact same
> >> column(s) as the GROUP BY is redundant.
>
> > That is an implementation detail, not a promise. With hashed aggregates
> > in 7.4, you might find this isn't true.
>
> s/might/will/

From 7.3.3, where the records were randomly inserted; note how
GROUP BY acts like I described:

test1=# select f, count(*)
test1-# from t
test1-# group by f;
f | count
---+-------
1 | 3
2 | 5
4 | 4
(3 rows)

The new 7.4 attitude is *really* good to know, because, otherwise,
all our reports would break!

--
-----------------------------------------------------------------
Ron Johnson, Jr. ron(dot)l(dot)johnson(at)cox(dot)net
Jefferson, LA USA

"Fair is where you take your cows to be judged."
Unknown

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-08-20 20:48:09 Re: Mail server load
Previous Message Tom Lane 2003-08-20 20:26:29 Re: 7.4b1 vs 7.3.4 performance