March 2018
Beginner to intermediate
584 pages
14h 31m
English
The best way to see how a query can be affected by an index is by running the query before and after the addition of an index. In this recipe, in order to avoid the need to define the schema, all the tables are assumed to be on the public schema. The following steps will guide you through the process of optimizing a query with an index:
SELECT schoolid FROM caschools sc JOIN sfpoly sf ON ST_Intersects(sf.geom, ST_Transform(sc.geom, 3310));