postgis提高空间数据分析效率

2020-08-06  本文已影响0人  清远_03d9

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)
上一篇 下一篇

猜你喜欢

热点阅读