Re: Screwy Statistics...

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Screwy Statistics...
Дата
Msg-id 20020906152810.T83345-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Screwy Statistics...  ("Glen Parker" <glenebob@nwlink.com>)
Список pgsql-general
On Fri, 6 Sep 2002, Glen Parker wrote:

> Second, if the planner believes it will find 6700 rows in a
> 35000 row table, shouldn't it choose an index?  I have a
> unique index on "branch".  What percentage of expected
> rows/possible rows is the usual cutoff, anyone know?
> Whatever it is, it seems too low to me.

Do an explain analyze and set enable_seqscan=off
and see which runs faster which is pretty much the only
way to be sure, but if there's no clustering,
6700 rows of 35000 rows with an expected width of 520
probably touches close to every page in the heap file any
way (figure that there's about 2-3k pages barring
dead tuples or such).


В списке pgsql-general по дате отправления:

Предыдущее
От: "Glen Parker"
Дата:
Сообщение: Slow query when joining to un-analyzed temp table...
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: Surprise :-(