Skip to content

History / Recipe: Per tier sparse GSI markers

Revisions

  • Recipe book: three sparse-index patterns for tier listing (F10 trio). First tranche of the pattern-first wiki content promised in the `project_wiki_recipe_book` memory — SQL-minded DynamoDB users land on the wiki wanting to answer "how do I list all records of type X", and the base-table Query can't do that. These three recipes cover the full design space for the question. - **Recipe: List records of a tier** (`Recipe:-List-records-of-a-tier`) — Pattern 1. Single sparse GSI keyed on the auto-populated `typeField`. Simplest cross-partition tier listing: one GSI, every record indexed, one Query per tier. Hot-partition ceiling + sharding escape hatch noted. - **Recipe: Per-tier sparse GSI markers** (`Recipe:-Per-tier-sparse-GSI-markers`) — Pattern 2. One sparse GSI per tier, with tier-specific marker attributes. Per-tier projection control, lower write amplification on tiers the index doesn't cover, and sharded-marker variant for leaf-tier scale past 3000 RCU / 1000 WCU per partition. - **Recipe: List records of a tier within a partition** (`Recipe:-List-records-of-a-tier-within-a-partition`) — Pattern 3. Sparse LSI. Cheap (shares base partition) when the listing is always scoped to a known partition value. 10 GB partition cap flagged; `typeField`-based non-sparse variant shown as an alternative that skips a custom prepare hook. Each recipe follows the house style: SQL-equivalent question up top, why DynamoDB can't answer it natively, the pattern, concrete code for both declaration and query, cost/scale trade-offs, "when this fits" and "when it doesn't" sections, and cross-links to the other patterns so users land on the right one. Home.md picks up a `## Recipes` section linking all three. **Not in this commit (deferred to later tranches).** Recipes for `buildKey` shapes, filter URL grammar, text search, cascade, OC, resumable mass ops, provisioning. The F10 trio was the critical gap (new 3.7.0 surface that users won't discover without pedagogy); the rest are incremental and can ship asynchronously. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    @uhop uhop committed Apr 23, 2026