-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Op 24-08-10 18:37, nimix schreef: > Your right if you want to do a ... WHERE St_IsValid(geom) query, the planner > don't uses the index because 99% of geometries are valid, so an index scan > seems to be useless. In that case I made postgres use the index by double > negation, but that only works fast if there are few invalid geometries:
Then the planner is stupid, because it is actually checking stuff that is already indexed. It should rewrite the query to use the index, that is the index for. If PostgreSQL pretends that it accepts manual indices then it should use them. Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREKAAYFAkxz9mYACgkQYH1+F2Rqwn3uaQCaA5DT6IgmtmCmTs6Z79rWO7M7 i7QAnRl0rpe0nyk/nZEi1AvsEQbcFSnb =VsHA -----END PGP SIGNATURE----- _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

