Обновить evidence и цифры в отчёте по финальному прогону
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+26
-26
@@ -5,64 +5,64 @@ PASS: chat row was rolled back together with members
|
||||
PASS: no chats without members exist in the database
|
||||
|
||||
== EXPLAIN for message history pagination
|
||||
messages total: 50010; in explained chat: 10000
|
||||
messages total: 59232; in explained chat: 10000
|
||||
PASS: explained chat has >= 10 000 messages
|
||||
|
||||
-- first page
|
||||
Limit (actual time=0.011..0.018 rows=51 loops=1)
|
||||
Limit (actual time=0.009..0.015 rows=51 loops=1)
|
||||
Buffers: shared hit=4
|
||||
-> Index Scan using messages_keyset_idx on messages (actual time=0.010..0.014 rows=51 loops=1)
|
||||
-> Index Scan using messages_keyset_idx on messages (actual time=0.009..0.012 rows=51 loops=1)
|
||||
Index Cond: (chat_id = 'bc6206c8-0e5d-48f3-94ea-a5fe15e0a9e5'::uuid)
|
||||
Buffers: shared hit=4
|
||||
Planning:
|
||||
Buffers: shared hit=8
|
||||
Planning Time: 0.075 ms
|
||||
Execution Time: 0.033 ms
|
||||
Buffers: shared hit=6
|
||||
Planning Time: 0.067 ms
|
||||
Execution Time: 0.031 ms
|
||||
|
||||
-- keyset page after position 9000
|
||||
Limit (actual time=0.083..0.093 rows=51 loops=1)
|
||||
Limit (actual time=0.012..0.020 rows=51 loops=1)
|
||||
Buffers: shared hit=5
|
||||
-> Index Scan using messages_keyset_idx on messages (actual time=0.082..0.089 rows=51 loops=1)
|
||||
-> Index Scan using messages_keyset_idx on messages (actual time=0.011..0.017 rows=51 loops=1)
|
||||
Index Cond: ((chat_id = 'bc6206c8-0e5d-48f3-94ea-a5fe15e0a9e5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-01 19:08:45.800971+00'::timestamp with time zone, '6f9dad83-2a94-400a-877b-7202790747a3'::uuid)))
|
||||
Buffers: shared hit=5
|
||||
Planning Time: 0.040 ms
|
||||
Execution Time: 0.149 ms
|
||||
Planning Time: 0.051 ms
|
||||
Execution Time: 0.069 ms
|
||||
|
||||
-- OFFSET 9000 (not used by the API)
|
||||
Limit (actual time=3.359..3.364 rows=51 loops=1)
|
||||
Limit (actual time=3.472..3.479 rows=51 loops=1)
|
||||
Buffers: shared hit=208
|
||||
-> Sort (actual time=2.897..3.166 rows=9051 loops=1)
|
||||
-> Sort (actual time=2.992..3.279 rows=9051 loops=1)
|
||||
Sort Key: created_at, id
|
||||
Sort Method: quicksort Memory: 1713kB
|
||||
Buffers: shared hit=208
|
||||
-> Bitmap Heap Scan on messages (actual time=0.209..0.786 rows=10000 loops=1)
|
||||
-> Bitmap Heap Scan on messages (actual time=0.190..0.756 rows=10000 loops=1)
|
||||
Recheck Cond: (chat_id = 'bc6206c8-0e5d-48f3-94ea-a5fe15e0a9e5'::uuid)
|
||||
Heap Blocks: exact=134
|
||||
Buffers: shared hit=208
|
||||
-> Bitmap Index Scan on messages_keyset_idx (actual time=0.194..0.194 rows=10000 loops=1)
|
||||
-> Bitmap Index Scan on messages_keyset_idx (actual time=0.177..0.178 rows=10000 loops=1)
|
||||
Index Cond: (chat_id = 'bc6206c8-0e5d-48f3-94ea-a5fe15e0a9e5'::uuid)
|
||||
Buffers: shared hit=74
|
||||
Planning Time: 0.048 ms
|
||||
Execution Time: 3.476 ms
|
||||
Planning Time: 0.046 ms
|
||||
Execution Time: 3.653 ms
|
||||
|
||||
-- keyset page WITHOUT messages_keyset_idx (rolled back)
|
||||
Limit (actual time=1.986..1.991 rows=51 loops=1)
|
||||
Buffers: shared hit=667
|
||||
-> Sort (actual time=1.985..1.986 rows=51 loops=1)
|
||||
Limit (actual time=2.135..2.140 rows=51 loops=1)
|
||||
Buffers: shared hit=783
|
||||
-> Sort (actual time=2.133..2.135 rows=51 loops=1)
|
||||
Sort Key: created_at, id
|
||||
Sort Method: top-N heapsort Memory: 31kB
|
||||
Buffers: shared hit=667
|
||||
-> Seq Scan on messages (actual time=0.398..1.897 rows=999 loops=1)
|
||||
Buffers: shared hit=783
|
||||
-> Seq Scan on messages (actual time=0.349..2.058 rows=999 loops=1)
|
||||
Filter: ((chat_id = 'bc6206c8-0e5d-48f3-94ea-a5fe15e0a9e5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-01 19:08:45.800971+00'::timestamp with time zone, '6f9dad83-2a94-400a-877b-7202790747a3'::uuid)))
|
||||
Rows Removed by Filter: 49011
|
||||
Buffers: shared hit=667
|
||||
Rows Removed by Filter: 58233
|
||||
Buffers: shared hit=783
|
||||
Planning:
|
||||
Buffers: shared hit=4
|
||||
Planning Time: 0.109 ms
|
||||
Execution Time: 2.019 ms
|
||||
Planning Time: 0.092 ms
|
||||
Execution Time: 2.168 ms
|
||||
PASS: first page reads the index in order, no Sort
|
||||
PASS: keyset cursor is an Index Cond, not a filter over the history
|
||||
PASS: keyset deep page touches fewer buffers than OFFSET (5 < 208)
|
||||
PASS: index reduces buffers for the deep page (5 < 667)
|
||||
PASS: index reduces buffers for the deep page (5 < 783)
|
||||
|
||||
PASS: db checks
|
||||
|
||||
Reference in New Issue
Block a user