Execution plans and instrumentation
Analysis of physical paths, compressed reads, decoding, cache and result-delivery latency.
Measurement protocol
Associate each measurement with exact SQL, parameters, database, physical structures and memory/worker configuration. Separate first reads from warm-cache repetitions. Measure time to first batch and time to full cursor consumption. A query with low output cardinality may still scan, group or sort the entire source set.
Access paths and actual work
| Field / access | Interpretation |
|---|---|
| column_scan / column_group_aggregate | Useful-column reads, potentially with page-level reduction. |
| index_aggregate | Aggregation over visible keys; rows_examined=0 does not mean no key traversal. |
| hash_join / join_count | Build/probe join; count_multiplicity preserves duplicates. |
| aggregate_state_cache | Exact state reused to complete a compatible calculation. |
| aggregate_result_cache | Already-computed snapshot result; not a new scan. |
| materialized_rows | Row-materialization signal, not total RAM usage. |
| parallel_scan_workers | Readers used by the operator, not the configured pool size. |
Timing, read and cache counters
elapsed_ms is measured elapsed time; cpu_ms may sum processes and exceed elapsed time. disk_bytes_read is storage-reported volume, not proof of physical disk I/O bypassing OS cache. storage_read_ms and decompression_ms may sum parallel work: do not naively subtract them from elapsed time.
cache_hits=0 does not rule out page_column_cache_hits/vector_cache_hits, including reuse within one post-restart query. native_projection_batches counts native projection; ordinal_projection_batches is its Python counterpart. Such counter changes need not imply logical-plan changes.
Comparison procedure
- Keep SQL, parameters, version, identity, data and result/hash identical.
- Record restart state, application cache, unpurged OS cache, background work and concurrent load.
- Compare access, aggregation, sources, types, predicates and parallelism; ignore changing PIDs.
- Compare rows/tuples, bytes, pages, decoded values, reductions and group counts.
- Use repeated comparable runs and report medians/spread; separate cached results from cold computation.
- A slower run with the same plan is still an observed slowdown; determine its cause.