Files
mtusi2026lab2/evidence/track2/explain/chat_id_index-medium-late-page.txt
T
Alexey BodanyukandClaude Opus 5.5 eb92e8e91e bench: трек 2 — планы запросов, стоимость записи, backup/restore со сверкой
plans.py: 121 120 сообщений (60k/15k/2k/80), 3 индекса x keyset/OFFSET x 3 размера
чата, pgbench в отдельном контейнере; WAL на вставку детерминированно.
backup_restore.py: pg_dump живой БД во время записи через API, восстановление в
новый контейнер и volume, сверка MD5 по чатам, API на восстановленной БД.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:08:13 +03:00

20 lines
1.0 KiB
Plaintext

Limit (cost=1673.53..1673.58 rows=20 width=238) (actual time=4.411..4.418 rows=51.00 loops=1)
Buffers: shared hit=571 read=14
-> Sort (cost=1673.53..1674.03 rows=202 width=238) (actual time=4.410..4.413 rows=51.00 loops=1)
Sort Key: created_at, id
Sort Method: quicksort Memory: 52kB
Buffers: shared hit=571 read=14
-> Bitmap Heap Scan on messages (cost=8.89..1665.79 rows=202 width=238) (actual time=4.306..4.361 rows=75.00 loops=1)
Recheck Cond: (chat_id = $1)
Filter: (ROW(created_at, id) > ROW($2, $3))
Rows Removed by Filter: 14925
Heap Blocks: exact=564
Buffers: shared hit=565 read=14
-> Bitmap Index Scan on messages_chat_only (cost=0.00..8.84 rows=606 width=0) (actual time=0.764..0.765 rows=15000.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=1 read=14
Planning:
Buffers: shared hit=97
Planning Time: 0.339 ms
Execution Time: 4.475 ms