Last active
December 13, 2015 18:58
-
-
Save hampelm/4958637 to your computer and use it in GitHub Desktop.
Sample nodetiles queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Make sure indexes are set up | |
CREATE INDEX responses_the_geom_gist ON responses USING GIST (the_geom); | |
vacuum analyze responses; | |
-- Set on or off to test if the sequential scan is faster | |
SET ENABLE_SEQSCAN=OFF; | |
-- Wider query | |
EXPLAIN ANALYZE SELECT ST_AsGeoJson(the_geom) as geometry,* FROM responses WHERE the_geom && ST_MakeEnvelope(-83.18847656250001,42.39100860920504, -82.92480468750001,42.585444257384886); | |
-- Closer query | |
EXPLAIN ANALYZE SELECT ST_AsGeoJson(the_geom) as geometry,* FROM responses WHERE the_geom && ST_MakeEnvelope(-83.02436828613283,42.4351133853526, -83.02024841308594,42.438153950765916); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment