ARCHOS 525 BLUEPRINT · /d/dgm_sql-query-plans-and-indexing
SQL query plans and indexing decisions
7 COMPONENTS · 6 FLOWS · UPDATED 2026-11-23
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_sql-query-plans-and-indexing) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_sql-query-plans-and-indexing)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_sql-query-plans-and-indexing" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="SQL query plans and indexing decisions — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("Client application")]
parser_1["Connection pooler"]
planner_2[("PostgreSQL")]
btree_3[("Block volume")]
heap_4[("Local NVMe")]
xray_5[("Continuous profiling")]
sink_6[("Client application")]
client_0 -->|"1. Sends SQL · SQL"| parser_1
parser_1 -->|"2. Plans SQL · SQL"| planner_2
planner_2 -->|"3a. Index scan · TCP"| btree_3
planner_2 -->|"3b. Heap fetch · TCP"| heap_4
heap_4 -->|"4. Buffers · SQL"| xray_5
xray_5 -->|"5. 7ms rows · SQL"| sink_6COMPONENT STACK (7)
- Client applicationSTATEFUL10M-row tenant query
- Connection poolerSTATELESSPgBouncer TX route
- PostgreSQLSTATEFULCost planner + stats
- Block volumeSTATEFULComposite B-Tree (EQ->R)
- Local NVMeSTATEFULShared buffers / heap
- Continuous profilingSTATEFULpg_stat_statements
- Client applicationSTATEFUL3.8s -> <7ms p99
REQUEST & DATA FLOW (6)
- Client application → Connection pooler (Sends SQL)[SQL]
- Connection pooler → PostgreSQL (Plans SQL)[SQL]
- PostgreSQL → Block volume (Index scan)[TCP]
- PostgreSQL → Local NVMe (Heap fetch)[TCP]
- Local NVMe → Continuous profiling (Buffers)[SQL]
- Continuous profiling → Client application (<7ms rows)[SQL]