This presentation will demonstrate ways to take most advantage of spatial indexes, SQL constructs, and PostGIS specific functions. For these exercises we'll be using PostGIS 2.1+ and PostgreSQL 9.3+ . We'll demonstrate common cases people often do inefficiently. This presentation demonstrates the following
- Various SQL constructs including ANTI join, LEFT, RIGHT, EXISTS, LATERAL, CASE clauses, aggregates
- What common table expressions (CTEs) are and when to and when not to use them
- We'll demonstrate these concepts in use in a couple of common spatial query problems - e.g. proximity analysis (both geometry and geography), raster analysis and generation, aggregation of data based on various attributes, other correlation queries.




