Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Model, migrate, refresh, and verify PostgreSQL materialized views in Django for expensive report or dashboard queries that can tolerate stale data. Use when ORM/index/query rewrites are not enough, the result is read often, freshness can be bounded, and a Django app needs unmanaged models, RunSQL migrations, refresh commands, or concurrent refresh.
.claude/skills/hashgraph-online-django-materialized-views/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-19 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-01 | ✓→✓ | = Same ✓ | -16% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -27% | 0% |
| case-03 | ✓→✓ | = Same ✓ | -24% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -23% | 0% |
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.
RunSQL.managed = False.REFRESH MATERIALIZED VIEW for simple refreshes.REFRESH MATERIALIZED VIEW CONCURRENTLY only when the view is already populated and has a qualifying unique index.See materialized-view-patterns.md for migration, model, and refresh templates.
Validate the SQL against source tables, test the unmanaged model reads, prove refresh behavior, and measure read latency before/after.
Other measured skills in the registry, with their headline benchmark lift.