Re: Problems with genetic optimizer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problems with genetic optimizer
Дата
Msg-id 26614.972430003@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problems with genetic optimizer  (Peter Keller <peter.keller@bvv.bayern.de>)
Список pgsql-general
Peter Keller <peter.keller@bvv.bayern.de> writes:
> I generated a table with a column type 'box', inserted some values and
> created an index (ops_box) on that column, run a vacuum and looked with
> the command EXPLAIN if the select will use the index.
> And the result was very astonishing:
> if I had inserted 120000 elements postgres will _NOT_ use the index, if
> I had inserted 100000 elements postgres will use the index!

Hmm.  The system's knowledge of selectivities for R-tree indexes is
essentially nil; perhaps someone will be motivated to improve that
someday.  In the meantime, the entirely bogus numbers returned by
src/backend/utils/adt/geo_selfuncs.c are supposed to be small enough
to ensure that R-trees are used if available.  What was your test
query exactly, and what do you get from EXPLAIN with and without
forcing enable_seqscan off?

            regards, tom lane

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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Re: PL/Perl compilation error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How do I find out the version number