Re: GiST, Not Using Index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Itai Zukerman <zukerman(at)math-hat(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: GiST, Not Using Index
Date: 2003-02-27 20:51:42
Message-ID: 27896.1046379102@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Itai Zukerman <zukerman(at)math-hat(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message dhoubrechts 2003-02-27 21:07:53 use of geometric types in select ?
Previous Message Grignon Etienne 2003-02-27 20:33:04 Re: pgsql problem