[postgis-users] Postgresql not using Spatial Index

strk at refractions.net strk at refractions.net
Tue Aug 16 14:20:55 PDT 2005


On Tue, Aug 16, 2005 at 04:19:55PM -0400, dblasby at openplans.org wrote:
> >Have you tried setting the effective_cache_size parameter for your
> laptop as
> >well? This is used to calculate how many tuples are cached outside of
> shared
> >buffers (i.e. incur very little disk I/O). I generally find setting
> >effective_cache_size correctly and reducing random_page_cost to 2
> solves
> >nearly all index problems.
> 
> Maybe this is more of a postgresql issue than a postgis issue - I
> certainly shouldnt have to modify my configuation so it doesnt make
> asinine (15:1) query plans! I know that I dont want to have to modify
> my underlying configuration; new-to-intermediate users almost certainly
> dont want to do that!

This *is* a postgresql issue. 

> The PostGIS install should be (1) install PostGIS (2) update your
> configuration.
> 
> I think it would be far better to have the PostGIS estimator return a
> better cost estimate - that way everyone wins.

Current PostGIS estimator doesn't return cost estimate.
It returns an estimate of restriction selectivity, and does a good job.
We might inspect ways to override the default cost estimator, might
be a GiST issue.

--strk;

> >I also seem to remember reading somewhere on -hackers recently that 5%
> was
> >the fixed threshold between index and sequential scans (determined by
> >PostgreSQL), but I can't find a reference to it in the archives at the
> >moment.
> 
> I thought postgresql would look at the estimates and choose the
> lowest-cost one.
> 
> dave
> 
> 
> 
> ----------------------------------------------------------
> This mail sent through IMP: https://webmail.limegroup.com/
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list