| From: | Dennis Gearon <gearond(at)fireserve(dot)net> |
|---|---|
| To: | Kathy Zhu <Kathy(dot)Zhu(at)sun(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: group by |
| Date: | 2003-10-03 22:53:02 |
| Message-ID: | 3F7DFDCE.5070509@fireserve.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
>
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kris Jurka | 2003-10-03 23:11:35 | Re: group by |
| Previous Message | Nigel J. Andrews | 2003-10-03 22:52:31 | Re: group by |