Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk> writes: > postgis=# explain analyze select count(*) from geography a join > geography b on (b.the_geom && > b.centroid) where a.id = 69495; Is that query really meaningful? You seem to be forming the cartesian product of a subset of a with an unrelated subset of b. regards, tom lane