Re: group by - Mailing list pgsql-general

From Dennis Gearon
Subject Re: group by
Date
Msg-id 3F7DFDCE.5070509@fireserve.net
Whole thread Raw
In response to group by  (Kathy Zhu <Kathy.Zhu@Sun.COM>)
List pgsql-general
When was the last time you vacuumed full?

Kathy Zhu wrote:

>Hi,
>
>I notices a weird thing here.
>
>version 7.2.1
>on Solaris
>
>table "test", has a field "state".
>There are 4 "state" values, 1, 2, 3, 4.
>
>select count(*) from test group by state;
>took 11500 msec
>
>but
>
>select count(*) from test where state = 1;
>select count(*) from test where state = 2;
>select count(*) from test where state = 3;
>select count(*) from test where state = 4;
>total took 626 msec
>
>Why ??
>
>thanks,
>kathy
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html
>
>
>


pgsql-general by date:

Previous
From: Kathy Zhu
Date:
Subject: group by
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: group by