From: Tom Lane <tgl@sss.pgh.pa.us>
To: Itai Zukerman <zukerman@math-hat.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: GiST, Not Using Index
Date: Thu, 27 Feb 2003 15:51:42 -0500
Message-ID: <27896.1046379102@sss.pgh.pa.us> (raw)
In-Reply-To: <87adghtt0h.fsf_-_@pip.dynamiclogic.com>
References: <87bs0z1zzs.fsf@matt.w80.math-hat.com>
<87lm03ghpo.fsf@matt.w80.math-hat.com>
<87adghtt0h.fsf_-_@pip.dynamiclogic.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, zukerman@math-hat.com
Subject: Re: GiST, Not Using Index
In-Reply-To: <27896.1046379102@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox