From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Mike Charnoky" <noky(at)nextbus(dot)com> |
Cc: | "Alban Hertroys" <a(dot)hertroys(at)magproductions(dot)nl>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: more problems with count(*) on large table |
Date: | 2007-10-01 15:16:12 |
Message-ID: | 87ir5qkgqr.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Mike Charnoky" <noky(at)nextbus(dot)com> writes:
> I altered the table in question, with "set statistics 100" on the
> timestamp column, then ran analyze. This seemed to help somewhat. Now,
> queries don't seem to hang, but it still takes a long time to do the count:
> * "where evtime between '2007-09-26' and '2007-09-27'"
> took 37 minutes to run (result was ~12 million)
> * "where evtime between '2007-09-25' and '2007-09-26'"
> took 40 minutes to run (result was ~14 million)
>
> Still stymied about the seemingly random performance, especially since I
> have seen this query execute in 2 minutes.
And the "explain analyze" for these?
Are you still sure it's certain date ranges which are consistently problems
and others are consistently fast? Or could it be something unrelated.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2007-10-01 15:16:52 | Re: usage of indexes for inner joins |
Previous Message | Stefan Schwarzer | 2007-10-01 15:06:51 | Re: Normalized Tables & SELECT [was: Find "smallest common year"] |