django-materialized-views
Installation
SKILL.md
Django Materialized Views
Use this skill when an expensive read query is reused often and can tolerate controlled staleness. Try query-plan, index, and ORM expression improvements first; materialized views add operational state.
Workflow
-
Confirm fit.
- The source query is expensive and stable.
- Consumers can accept stale data.
- Refresh cadence, ownership, and failure behavior are clear.
- PostgreSQL is the target database.
-
Design the materialized view.
- Define the SQL query and output columns.
- Add a unique column or unique column set if concurrent refresh is required.
- Add indexes for consumer queries against the view.