Edoardo Panfili <edoardo@aspix.it> writes:
> [ poor plan for a Postgis query with ]
> Postgres 8.4.8 with postgis 1.5.3
I think that most of the issue here is poor selectivity estimation for
the Postgis operations, particularly &&. I suggest that you should ask
about this on the postgis mailing lists. They might well tell you to
try a newer release --- they may have improved things since 1.5.3.
> NOTICE: LWGEOM_gist_joinsel called with incorrect join type
You should *definitely* report that to the Postgis guys, because it's a
bug.
regards, tom lane