8000多记录一二百毫秒就能出结果:
select *,st_distance(ST_GeomFromText('POINT(119.383341323 36.8461558610001)',4326),t.geom,true) closestdistance,st_asgeojson(t.geom) geo from line t where ST_DWithin(ST_GeomFromText('POINT(119.383341323 36.8461558610001)',4326)::geography,t.geom::geography,100)
主要是ST_DWithin快,比创建缓冲区再判断叠加关系快得多