Re: GiST, Not Using Index
| От | Tom Lane |
|---|---|
| Тема | Re: GiST, Not Using Index |
| Дата | |
| Msg-id | 27896.1046379102@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | GiST, Not Using Index (Itai Zukerman <zukerman@math-hat.com>) |
| Ответы |
Re: GiST, Not Using Index
|
| Список | pgsql-sql |
Itai Zukerman <zukerman@math-hat.com> writes:
> [...some definitions...]
Never leave out the "unimportant" stuff --- that's usually where you
went wrong ;-)
My guess is that you didn't supply a restriction selectivity estimator
for the ~>= operator. I forget what the default assumptions are with
no estimator, but they're probably not optimistic enough to prompt use
of an indexscan.
> [...insert 20000 rows into x...]
> Seq Scan on x (cost=0.00..2826.01 rows=24334 width=8)
> Filter: (z ~>= sig_in('{1,2,3}'::integer[]))
*How* many rows did you insert? The planner thinks 24334 will be
selected here ... one hopes the default restrictivity estimate is
less than 1.0, at least ...
regards, tom lane
В списке pgsql-sql по дате отправления: