Files
mtusi2026lab2/evidence/track5_query_restore.md
T
kaktuz20000 c20fdeca8c
Skeleton contracts / contracts (pull_request) Failing after 38s
реализация лабораторной 5
2026-10-08 13:31:55 +03:00

25 lines
1.6 KiB
Markdown

# Lab2 level-5 track 2 — query plans and recovery
- Run UTC: 2026-10-07T06:01:48.126545+00:00
- Host: macOS-27.0-arm64-arm-64bit-Mach-O (arm64), logical CPUs: 10
- Host physical memory: 17179869184 bytes.
- PostgreSQL: 16.4 in `postgres:16.4-alpine`; container memory limit: 0 bytes; CPU limit: 0 nanocores (0 means unlimited).
- Dataset: 100,000 synthetic rows in each comparison table; one chat has 80,000 rows and 100 small chats share the remaining 20,000. Only generated text is used.
- Query: keyset page from chat 2, identical SELECT and cursor for both indexes; each plan was executed five times after ANALYZE.
| Index | Median execution (ms) | Shared hits | Shared reads | Rows |
|---|---:|---:|---:|---:|
| `(chat_id)` | 0.297 | 206 | 2 | 25 |
| `(chat_id, created_at, id)` | 0.097 | 25 | 3 | 25 |
| Index | Median time for 2,000 inserted rows (ms) | Median shared write blocks |
|---|---:|---:|
| `(chat_id)` | 5.428 | 25 |
| `(chat_id, created_at, id)` | 7.218 | 25 |
Each write-cost query was measured five times inside a transaction and rolled back. This isolates execution and index-maintenance work but does not measure durable commit/fsync latency.
Backup/restore: custom-format dump 1596489 bytes; dump 0.312s; restore into a separately created empty database 0.385s. Restored row counts and deterministic checksums for the selected messages were verified: **PASS**.
Raw JSON plans, samples, environment and restore checksums are in `track5_query_restore.json`. This single-host synthetic run is a reproducible comparison, not a production capacity or HA claim.