mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-26 10:02:50 +00:00
3cda119445
git-svn-id: http://svn.osgeo.org/postgis/trunk@2 b70326c6-7e19-0410-871a-916f4a2858ee
28 lines
757 B
PL/PgSQL
28 lines
757 B
PL/PgSQL
--- build a larger database
|
|
\set ECHO none
|
|
\i regress_lots_of_points.sql
|
|
\set ECHO all
|
|
|
|
--- test some of the searching capabilities
|
|
|
|
-- GiST index
|
|
|
|
CREATE INDEX quick_gist on test using gist (the_geom gist_geometry_ops) with (islossy);
|
|
|
|
select * from test where the_geom && 'BOX3D(125 125,135 135)'::box3d order by num;
|
|
|
|
set enable_seqscan = off;
|
|
|
|
select * from test where the_geom && 'BOX3D(125 125,135 135)'::box3d order by num;
|
|
|
|
|
|
--- RTree (not recommended)
|
|
|
|
CREATE INDEX quick_rt on test using rtree (the_geom rt_geometry_ops);
|
|
set enable_seqscan = on;
|
|
select * from test where the_geom && 'BOX3D(125 125,135 135)'::box3d order by num;
|
|
set enable_seqscan = off;
|
|
select * from test where the_geom && 'BOX3D(125 125,135 135)'::box3d order by num;
|
|
|
|
|