Re: more problems with count(*) on large table
От | Gregory Stark |
---|---|
Тема | Re: more problems with count(*) on large table |
Дата | |
Msg-id | 87ir5qkgqr.fsf@oxford.xeocode.com обсуждение исходный текст |
Ответ на | Re: more problems with count(*) on large table (Mike Charnoky <noky@nextbus.com>) |
Ответы |
Re: more problems with count(*) on large table
|
Список | pgsql-general |
"Mike Charnoky" <noky@nextbus.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
В списке pgsql-general по дате отправления: