-- Count script create temp table tmp as select st_makepoint(random(), random()) as the_geom from generate_series(1, 10000); create index tmp_geom_idx on tmp using gist (the_geom); analyze tmp; select count(*) from tmp; cluster tmp using tmp_geom_idx; analyze tmp; select count(*) from tmp;