Re: seqscan instead of index scan

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: seqscan instead of index scan
Дата
Msg-id 20040830130016.T98089@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: seqscan instead of index scan  (Martin Sarsale <martin@emepe3.net>)
Список pgsql-performance
On Mon, 30 Aug 2004, Martin Sarsale wrote:

> On Mon, 2004-08-30 at 15:06, Merlin Moncure wrote:
> > create function is_somethingable (ctype, dtype) returns boolean as
>
> Thanks, but I would prefer a simpler solution.
>
> I would like to know why this uses a seqscan instead of an index scan:
>
> create index t_idx on t((c+d));
> select * from t where c+d > 0;

As a geuss, since 7.4 and earlier have no statistics on the distribution
of c+d it has to guess about how likely that is to be true and is probably
overestimating. 8.0beta might handle this better.

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

Предыдущее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: seqscan instead of index scan
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Why does a simple query not use an obvious index?