# PostGIS queries

> Writes PostGIS and DuckDB spatial SQL with the right indexes, so your map queries are correct and quick.

- Page: https://youraiskill.com/skill/muend-postgis-spatial-sql
- What it does: Invoke whenever spatial SQL or its execution backend is the decision: PostGIS, DuckDB Spatial, SpatiaLite, ST_* functions, recurring spatial joins, concurrent/growing workloads, or large GeoParquet queries. Covers backend selection, schemas, GiST/BRIN indexes, KNN, geometry versus geography, correctness benchmarks, and EXPLAIN optimization. Use PostGIS for managed concurrent services and embedded engines for bounded local analytics when evidence supports that choice. Use geo-data-engineering for acquisition, conversion, and file-based ETL without spatial SQL.
- Niches: backend, data
- Licence: MIT
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions and reference files only (3 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
