Re: index skipped in favor of seq scan.

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: index skipped in favor of seq scan.
Дата
Msg-id Pine.LNX.4.30.0107092324550.677-100000@peter.localdomain
обсуждение исходный текст
Ответ на index skipped in favor of seq scan.  (ryan.a.roemmich@mail.sprint.com)
Список pgsql-general
ryan.a.roemmich@mail.sprint.com writes:

> I am working with putting syslog logs into a database, I'm parsing the
> logs and using the key information for my fields.  With my test data of
> ~200K rows the optimizer used my b-tree index that I created for an
> oft-used where clause.  When the table grew to over 800K rows the index
> was no longer used.  The field in question contains IP addresses, but
> uses varchar.  The values are _not_ unique.  One particular address has
> 150K entries.  How can I keep my where queries speedy?

For 150k out of 800k rows, a sequential scan is definitely the better
choice.  If you can prove otherwise, please post data.

For problems with the optimizer in general you should post the schema, the
queries, and the explain output.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: dump
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ODBC 3.0 functions (UCASE, LCASE, etc.)