| От | Tom Lane |
|---|---|
| Тема | Re: Forcing GiST index to be used |
| Дата | |
| Msg-id | 19963.997819260@sss.pgh.pa.us обсуждение |
| Ответ на | Forcing GiST index to be used (Dave Blasby <dblasby@refractions.net>) |
| Список | pgsql-hackers |
Dave Blasby <dblasby@refractions.net> writes:
> I have a custom datatype (the PostGIS geometry type), which I have
> indexed using a GiST index.
> The problem is, its difficult to get PostgreSQL to actually use the GiST
> index. The only way I can get it to be used is by 'set enable_seqscan =
> off', which seems a bit cheezy. What am I missing? Do I have to make
> some sort of amcostestimate() function or something?
What sort of selectivity estimator (oprrest entry) do you have attached
to the indexable operator? If there's no estimator, the default
selectivity is something like 0.5 --- way too high to cause an index to
be used.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера