From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dave Blasby <dblasby(at)refractions(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Forcing GiST index to be used |
Date: | 2001-08-14 20:01:00 |
Message-ID: | 19963.997819260@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dave Blasby <dblasby(at)refractions(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Howe | 2001-08-14 20:25:43 | Retriving users from group ?... |
Previous Message | Tom Lane | 2001-08-14 19:54:42 | Re: int8 sequences --- small implementation problem |