
Spatial Database Optimization for GIS Analysts
Optimize GIS databases for municipal spatial queries and indexing performance
What You Can Do
You can analyze GIS database execution plans to identify performance bottlenecks in spatial queries, implement optimal indexing strategies for geometry columns and topology analysis, and refactor queries to leverage spatial operators efficiently. Claude helps you benchmark improvements on municipal datasets (parcels, utilities, infrastructure), design partitioning schemes for tables with millions of features, and create documentation that justifies infrastructure investments to stakeholders.
Features
identify bottlenecks in spatial operations on 1M+ row tables
GIST, BRIN, and BTREE index recommendations for PostGIS and enterprise geodatabases
rewrite slow intersection, proximity, and network queries for subsecond performance
partitioning and clustering strategies for competing departmental workloads (planning, utilities, transportation)
optimize geocoding, topology validation, and overlap analysis workflows
configure databases for permit tracking and asset management systems requiring <1s responses
before/after metrics and reporting formats for stakeholder communication
transition strategies from file-based GIS (shapefiles, personal geodatabases) to enterprise PostGIS
Example Output
Query Optimization Example:
- Original query: 45 seconds on utility buffer analysis (1.2M line segments)
- Issue identified: Missing spatial index on geometry column, unnecessary table scan
- Optimized query: 2.3 seconds using GIST index + spatial operator precedence
- Recommendation: Add
CREATE INDEX idx_utility_geom ON utilities USING GIST(geom);
Schema Refactoring Example:
- Problem: 6 departments querying shared zoning/parcel tables causing lock contention
- Solution: Table partitioning by administrative district + read-only views per department
- Result: Query times reduced 60%, write operations no longer blocked reads
Batch Processing Example:
- Task: Intersect 500K new development permits with 2M zoning parcels
- Original method: ArcGIS analysis took 8 hours
- Optimized approach: PostGIS ST_Intersects with spatial join on indexed geometry, parallel processing
- Outcome: 12 minutes total runtime with detailed overlap reports
What's Included
- SKILL.md instruction file with systematic optimization methodology:
- Spatial index implementation checklist for PostGIS and enterprise geodatabases:
- Query refactoring template with before/after execution plans:
- Schema partitioning framework for multi-department municipal systems:
- Performance benchmarking worksheet and stakeholder reporting template:
Who It's For
- GIS Analysts managing municipal spatial databases for planning and utilities
- Database administrators supporting geospatial applications in government agencies
- Urban planners implementing enterprise GIS infrastructure
- IT teams migrating legacy file-based GIS to PostGIS systems
- Geospatial data engineers building real-time permit and asset management platforms
Best For
- Diagnosing slow spatial queries on municipal datasets (1M+ features)
- Implementing GIST/BRIN indexes on geometry columns
- Refactoring intersection, proximity, and topology analysis queries
- Designing databases for multi-department shared infrastructure access
- Planning PostGIS or geodatabase migrations from file-based systems
- Optimizing batch geocoding and overlay analysis workflows
- Creating performance improvement documentation for infrastructure budgets



