2.提高空间数据分析效率的几种方法
1 gist索引创建
create index osm_buildings_idx on osm_buildings using gist(geom);
2 修改列存储不压缩
alter table osm_buildings alter column geom set storage external;
//分析测试
select a.* from dltb a, jbntbhpk b where ST_Intersects(a.geom,b.geom) order by bsm;
select st_area(ag) dltbarea,st_area(ss) cliparea from (
select a.*,a.geom as ag ,ST_Intersection(a.geom,b.geom) as ss from dltb a, jbntbhpk b where ST_Intersects(a.geom,b.geom)
) t
select ST_Intersection(dltb.geom, jbntbhpk.geom)
网友评论