docs: record unit-of-work evidence and report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 00:34:03 +03:00
co-authored by Claude Opus 5.5
parent 6ba74b18f3
commit 952c16350e
127 changed files with 16540 additions and 414 deletions
@@ -0,0 +1,673 @@
# План запроса истории: размер 10k
Commit b2fb88f
Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 10k: first, после 0
duration: 0.184 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '51'
Limit (cost=0.29..9.59 rows=51 width=153) (actual time=0.042..0.140 rows=51.00 loops=1)
Buffers: shared hit=17
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1825.36 rows=10000 width=153) (actual time=0.040..0.135 rows=51.00 loops=1)
Index Cond: (chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid)
Index Searches: 1
Buffers: shared hit=17
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 10k: middle, после 5000
duration: 0.146 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '2026-10-31 20:22:09.184908+00', $3 = 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.032..0.107 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.030..0.103 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 10k: last, после 9900
duration: 0.144 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '2026-10-31 20:22:20.445692+00', $3 = 'ff794cf6-13c4-4816-a97e-ef0fc4ef4326', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.031..0.113 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.030..0.109 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.150 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '51'
Limit (cost=0.29..54.04 rows=51 width=153) (actual time=0.033..0.117 rows=51.00 loops=1)
Buffers: shared hit=46
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1054.25 rows=1000 width=153) (actual time=0.033..0.114 rows=51.00 loops=1)
Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Index Searches: 1
Buffers: shared hit=46
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.185 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '2026-10-31 20:22:09.183192+00', $3 = '6c079c72-956b-4d22-902d-50525cd17715', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.023..0.140 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.022..0.137 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.126 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '2026-10-31 20:22:18.306084+00', $3 = '20861ffc-3d7f-413e-a417-26cec0b4dcb3', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.016..0.096 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.016..0.093 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.165 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '2c89c970-25a2-4db8-be56-14a7e9aa8283', $2 = '51'
Limit (cost=0.29..151.02 rows=51 width=153) (actual time=0.013..0.134 rows=51.00 loops=1)
Buffers: shared hit=48
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.85 rows=100 width=153) (actual time=0.013..0.131 rows=51.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Index Searches: 1
Buffers: shared hit=48
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 10: first, после 0
duration: 0.073 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5', $2 = '51'
Limit (cost=0.29..38.25 rows=10 width=153) (actual time=0.028..0.065 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.25 rows=10 width=153) (actual time=0.027..0.064 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.002..0.002 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
## Страницы сравнения в psql: варианты
Тот же текст запроса и те же параметры, что у плана приложения этой
страницы, в одной транзакции, которая откатывается: индексы базы
после неё те же. Каждый вариант выполнен дважды, здесь — второе
выполнение. `psql` — индекс приложения, custom plan; `generic` — он
же с force_generic_plan; `or-cursor` — условие курсора через OR;
`no-index` — без индекса приложения; варианты индекса вместо него:
`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text).
### read 10k: middle, после 5000
#### psql
Limit (cost=0.29..14.64 rows=51 width=153) (actual time=0.006..0.057 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1408.11 rows=5000 width=153) (actual time=0.005..0.053 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.065 ms
#### generic
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.014..0.065 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.014..0.062 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.011 ms
Execution Time: 0.077 ms
#### or-cursor
Limit (cost=0.29..18.90 rows=51 width=153) (actual time=0.720..0.763 rows=51.00 loops=1)
Buffers: shared hit=5063
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1825.36 rows=5000 width=153) (actual time=0.720..0.760 rows=51.00 loops=1)
Index Cond: (chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid)
Filter: ((created_at > '2026-10-31 20:22:09.184908+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:22:09.184908+00'::timestamp with time zone) AND (id > 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Rows Removed by Filter: 5000
Index Searches: 1
Buffers: shared hit=5063
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.061 ms
Execution Time: 0.779 ms
#### no-index
Limit (cost=771.06..771.19 rows=51 width=153) (actual time=3.982..3.986 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=771.06..783.56 rows=5000 width=153) (actual time=3.982..3.984 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 44kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..604.25 rows=5000 width=153) (actual time=0.224..3.444 rows=5000.00 loops=1)
Filter: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Rows Removed by Filter: 8500
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.069 ms
Execution Time: 3.995 ms
#### chat_only
Limit (cost=771.06..771.19 rows=51 width=153) (actual time=3.710..3.713 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=771.06..783.56 rows=5000 width=153) (actual time=3.710..3.711 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 44kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..604.25 rows=5000 width=153) (actual time=0.208..3.168 rows=5000.00 loops=1)
Filter: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Rows Removed by Filter: 8500
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 3.719 ms
#### covering
Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.007..0.044 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..567.41 rows=5000 width=153) (actual time=0.006..0.041 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.052 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.29..95.89 rows=51 width=153) (actual time=0.006..0.049 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..937.55 rows=500 width=153) (actual time=0.006..0.046 rows=51.00 loops=1)
Index Cond: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.041 ms
Execution Time: 0.057 ms
#### generic
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.012..0.061 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.009 ms
Execution Time: 0.072 ms
#### or-cursor
Limit (cost=0.29..107.79 rows=51 width=153) (actual time=0.083..0.121 rows=51.00 loops=1)
Buffers: shared hit=502
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1054.25 rows=500 width=153) (actual time=0.083..0.119 rows=51.00 loops=1)
Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Filter: ((created_at > '2026-10-31 20:22:09.183192+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:22:09.183192+00'::timestamp with time zone) AND (id > '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=502
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.076 ms
Execution Time: 0.129 ms
#### no-index
Limit (cost=553.43..553.56 rows=51 width=153) (actual time=0.666..0.669 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=553.43..554.68 rows=500 width=153) (actual time=0.666..0.667 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..536.75 rows=500 width=153) (actual time=0.192..0.613 rows=500.00 loops=1)
Filter: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Rows Removed by Filter: 13000
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.066 ms
Execution Time: 0.676 ms
#### chat_only
Limit (cost=350.59..350.72 rows=51 width=153) (actual time=0.507..0.511 rows=51.00 loops=1)
Buffers: shared hit=281
-> Sort (cost=350.59..351.84 rows=500 width=153) (actual time=0.507..0.509 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=281
-> Bitmap Heap Scan on messages (cost=15.91..333.91 rows=500 width=153) (actual time=0.094..0.442 rows=500.00 loops=1)
Recheck Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=278
Buffers: shared hit=281
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.022..0.022 rows=1000.00 loops=1)
Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.042 ms
Execution Time: 0.517 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.007..0.046 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.006..0.044 rows=51.00 loops=1)
Index Cond: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.063 ms
Execution Time: 0.054 ms
### bg 100: first, после 0
#### psql
Limit (cost=0.29..151.02 rows=51 width=153) (actual time=0.005..0.050 rows=51.00 loops=1)
Buffers: shared hit=48
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.85 rows=100 width=153) (actual time=0.005..0.047 rows=51.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Index Searches: 1
Buffers: shared hit=48
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.055 ms
#### generic
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.012..0.061 rows=51.00 loops=1)
Buffers: shared hit=48
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.76 rows=214 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=48
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.005 ms
Execution Time: 0.069 ms
#### no-index
Limit (cost=466.57..466.70 rows=51 width=153) (actual time=0.394..0.397 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=466.57..466.82 rows=100 width=153) (actual time=0.393..0.395 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..463.25 rows=100 width=153) (actual time=0.007..0.376 rows=100.00 loops=1)
Filter: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Rows Removed by Filter: 13400
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.402 ms
#### chat_only
Limit (cost=215.36..215.48 rows=51 width=153) (actual time=0.110..0.114 rows=51.00 loops=1)
Buffers: shared hit=91
-> Sort (cost=215.36..215.61 rows=100 width=153) (actual time=0.110..0.112 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=91
-> Bitmap Heap Scan on messages (cost=5.06..212.03 rows=100 width=153) (actual time=0.011..0.097 rows=100.00 loops=1)
Recheck Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Heap Blocks: exact=89
Buffers: shared hit=91
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.120 ms
#### covering
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.042 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.040 rows=51.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.038 ms
Execution Time: 0.049 ms
### bg 10: first, после 0
#### psql
Limit (cost=0.29..38.25 rows=10 width=153) (actual time=0.008..0.018 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.25 rows=10 width=153) (actual time=0.008..0.017 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.061 ms
Execution Time: 0.026 ms
#### generic
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.013..0.026 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.76 rows=214 width=153) (actual time=0.013..0.024 rows=10.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning Time: 0.006 ms
Execution Time: 0.035 ms
#### no-index
Limit (cost=462.07..462.09 rows=10 width=153) (actual time=0.307..0.308 rows=10.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=462.07..462.09 rows=10 width=153) (actual time=0.307..0.307 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..461.90 rows=10 width=153) (actual time=0.017..0.294 rows=10.00 loops=1)
Filter: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Rows Removed by Filter: 13490
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.050 ms
Execution Time: 0.313 ms
#### chat_only
Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.021 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Index Scan using bench_variant on messages (cost=0.29..33.31 rows=10 width=153) (actual time=0.006..0.017 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.066 ms
Execution Time: 0.030 ms
#### covering
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.017 ms
@@ -0,0 +1,731 @@
# План запроса истории: размер 1k
Commit b2fb88f
Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 1k: first, после 0
duration: 0.147 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '51'
Limit (cost=0.28..24.74 rows=51 width=153) (actual time=0.040..0.113 rows=51.00 loops=1)
Buffers: shared hit=32
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.84 rows=1000 width=153) (actual time=0.039..0.109 rows=51.00 loops=1)
Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Index Searches: 1
Buffers: shared hit=32
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 1k: middle, после 500
duration: 0.121 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '2026-10-31 20:19:42.570021+00', $3 = 'cb5ad463-2531-42b3-8858-75d9f4d51aa0', $4 = '51'
Limit (cost=0.28..45.12 rows=51 width=153) (actual time=0.016..0.085 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.73 rows=501 width=153) (actual time=0.016..0.082 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 1k: last, после 900
duration: 0.240 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '2026-10-31 20:19:45.708241+00', $3 = '10ad2de8-b01a-4b52-a049-d90b26b5aa5b', $4 = '51'
Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.193..0.198 rows=51.00 loops=1)
Buffers: shared hit=28
-> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.193..0.195 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=28
-> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.029..0.144 rows=100.00 loops=1)
Recheck Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.708241+00'::timestamp with time zone, '10ad2de8-b01a-4b52-a049-d90b26b5aa5b'::uuid)))
Heap Blocks: exact=20
Buffers: shared hit=22
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.28 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.708241+00'::timestamp with time zone, '10ad2de8-b01a-4b52-a049-d90b26b5aa5b'::uuid)))
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.106 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '51'
Limit (cost=0.28..24.74 rows=51 width=153) (actual time=0.010..0.078 rows=51.00 loops=1)
Buffers: shared hit=37
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.84 rows=1000 width=153) (actual time=0.009..0.075 rows=51.00 loops=1)
Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Index Searches: 1
Buffers: shared hit=37
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.105 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '2026-10-31 20:19:42.593379+00', $3 = '41e10366-ac36-468e-965e-54b7bd0290ce', $4 = '51'
Limit (cost=0.28..45.38 rows=51 width=153) (actual time=0.012..0.075 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.63 rows=498 width=153) (actual time=0.011..0.072 rows=51.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.156 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '2026-10-31 20:19:45.714312+00', $3 = '630019db-1266-44cc-b5d6-fcb3edda0b30', $4 = '51'
Limit (cost=120.09..120.21 rows=51 width=153) (actual time=0.125..0.130 rows=51.00 loops=1)
Buffers: shared hit=18
-> Sort (cost=120.09..120.33 rows=99 width=153) (actual time=0.125..0.127 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=18
-> Bitmap Heap Scan on messages (cost=9.30..116.81 rows=99 width=153) (actual time=0.019..0.104 rows=100.00 loops=1)
Recheck Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.714312+00'::timestamp with time zone, '630019db-1266-44cc-b5d6-fcb3edda0b30'::uuid)))
Heap Blocks: exact=16
Buffers: shared hit=18
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.27 rows=99 width=0) (actual time=0.009..0.009 rows=100.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.714312+00'::timestamp with time zone, '630019db-1266-44cc-b5d6-fcb3edda0b30'::uuid)))
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.231 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '3694cad0-8739-4553-ba44-604daaaa3382', $2 = '51'
Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.197..0.201 rows=51.00 loops=1)
Buffers: shared hit=64
-> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.197..0.199 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=64
-> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.033..0.175 rows=100.00 loops=1)
Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Blocks: exact=62
Buffers: shared hit=64
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
### bg 10: first, после 0
duration: 0.041 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '173df049-0e59-461f-afe3-8a15542fa0c5', $2 = '51'
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.036..0.037 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.036..0.036 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.014..0.032 rows=10.00 loops=1)
Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
## Страницы сравнения в psql: варианты
Тот же текст запроса и те же параметры, что у плана приложения этой
страницы, в одной транзакции, которая откатывается: индексы базы
после неё те же. Каждый вариант выполнен дважды, здесь — второе
выполнение. `psql` — индекс приложения, custom plan; `generic` — он
же с force_generic_plan; `or-cursor` — условие курсора через OR;
`no-index` — без индекса приложения; варианты индекса вместо него:
`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text).
### read 1k: middle, после 500
#### psql
Limit (cost=0.28..45.12 rows=51 width=153) (actual time=0.009..0.057 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.73 rows=501 width=153) (actual time=0.009..0.054 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.065 ms
#### generic
Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.009..0.064 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.02 rows=24 width=153) (actual time=0.009..0.061 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.006 ms
Execution Time: 0.072 ms
#### or-cursor
Limit (cost=0.28..49.10 rows=51 width=153) (actual time=0.085..0.131 rows=51.00 loops=1)
Buffers: shared hit=525
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.86 rows=501 width=153) (actual time=0.085..0.128 rows=51.00 loops=1)
Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Filter: ((created_at > '2026-10-31 20:19:42.570021+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:19:42.570021+00'::timestamp with time zone) AND (id > 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=525
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.046 ms
Execution Time: 0.136 ms
#### no-index
Limit (cost=203.98..204.11 rows=51 width=153) (actual time=0.545..0.550 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=203.98..205.23 rows=501 width=153) (actual time=0.545..0.547 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..187.27 rows=501 width=153) (actual time=0.077..0.485 rows=500.00 loops=1)
Filter: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Rows Removed by Filter: 4000
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.073 ms
Execution Time: 0.560 ms
#### chat_only
Limit (cost=158.64..158.76 rows=51 width=153) (actual time=0.507..0.512 rows=51.00 loops=1)
Buffers: shared hit=103
-> Sort (cost=158.64..159.89 rows=501 width=153) (actual time=0.507..0.509 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=103
-> Bitmap Heap Scan on messages (cost=15.91..141.92 rows=501 width=153) (actual time=0.053..0.431 rows=500.00 loops=1)
Recheck Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=101
Buffers: shared hit=103
-> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.011..0.012 rows=1000.00 loops=1)
Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.045 ms
Execution Time: 0.519 ms
#### covering
Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.006..0.048 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..57.82 rows=501 width=153) (actual time=0.006..0.045 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.055 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.28..45.38 rows=51 width=153) (actual time=0.011..0.072 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.63 rows=498 width=153) (actual time=0.010..0.070 rows=51.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.067 ms
Execution Time: 0.084 ms
#### generic
Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.010..0.060 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.02 rows=24 width=153) (actual time=0.010..0.057 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.007 ms
Execution Time: 0.069 ms
#### or-cursor
Limit (cost=0.28..49.39 rows=51 width=153) (actual time=0.082..0.139 rows=51.00 loops=1)
Buffers: shared hit=528
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.81 rows=498 width=153) (actual time=0.082..0.137 rows=51.00 loops=1)
Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Filter: ((created_at > '2026-10-31 20:19:42.593379+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:19:42.593379+00'::timestamp with time zone) AND (id > '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=528
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.055 ms
Execution Time: 0.146 ms
#### no-index
Limit (cost=203.83..203.96 rows=51 width=153) (actual time=0.602..0.605 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=203.83..205.08 rows=498 width=153) (actual time=0.602..0.603 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..187.22 rows=498 width=153) (actual time=0.076..0.544 rows=500.00 loops=1)
Filter: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Rows Removed by Filter: 4000
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.050 ms
Execution Time: 0.612 ms
#### chat_only
Limit (cost=158.49..158.62 rows=51 width=153) (actual time=0.442..0.446 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=158.49..159.74 rows=498 width=153) (actual time=0.442..0.443 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=101
-> Bitmap Heap Scan on messages (cost=15.91..141.88 rows=498 width=153) (actual time=0.053..0.390 rows=500.00 loops=1)
Recheck Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=99
Buffers: shared hit=101
-> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.014..0.014 rows=1000.00 loops=1)
Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.453 ms
#### covering
Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.007..0.042 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..57.71 rows=498 width=153) (actual time=0.007..0.040 rows=51.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.056 ms
Execution Time: 0.051 ms
### bg 100: first, после 0
#### psql
Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.106..0.110 rows=51.00 loops=1)
Buffers: shared hit=64
-> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.106..0.108 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=64
-> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.014..0.093 rows=100.00 loops=1)
Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Blocks: exact=62
Buffers: shared hit=64
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.007..0.007 rows=100.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.127 ms
#### generic
Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.008..0.058 rows=51.00 loops=1)
Buffers: shared hit=50
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.88 rows=71 width=153) (actual time=0.008..0.055 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=50
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.003 ms
Execution Time: 0.063 ms
#### no-index
Limit (cost=162.07..162.20 rows=51 width=153) (actual time=0.196..0.200 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=162.07..162.32 rows=100 width=153) (actual time=0.196..0.197 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..158.75 rows=100 width=153) (actual time=0.005..0.182 rows=100.00 loops=1)
Filter: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Rows Removed by Filter: 4400
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.207 ms
#### chat_only
Limit (cost=115.42..115.55 rows=51 width=153) (actual time=0.116..0.120 rows=51.00 loops=1)
Buffers: shared hit=64
-> Sort (cost=115.42..115.67 rows=100 width=153) (actual time=0.116..0.118 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=64
-> Bitmap Heap Scan on messages (cost=5.06..112.10 rows=100 width=153) (actual time=0.010..0.103 rows=100.00 loops=1)
Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Blocks: exact=62
Buffers: shared hit=64
-> Bitmap Index Scan on bench_variant (cost=0.00..5.03 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.038 ms
Execution Time: 0.127 ms
#### covering
Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.007..0.042 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..11.53 rows=100 width=153) (actual time=0.007..0.040 rows=51.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.053 ms
Execution Time: 0.052 ms
### bg 10: first, после 0
#### psql
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.024 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.023 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1)
Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.032 ms
#### generic
Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.007..0.017 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.88 rows=71 width=153) (actual time=0.007..0.016 rows=10.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning Time: 0.003 ms
Execution Time: 0.023 ms
#### no-index
Limit (cost=157.57..157.59 rows=10 width=153) (actual time=0.121..0.123 rows=10.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=157.57..157.59 rows=10 width=153) (actual time=0.121..0.122 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..157.40 rows=10 width=153) (actual time=0.019..0.118 rows=10.00 loops=1)
Filter: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Rows Removed by Filter: 4490
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.051 ms
Execution Time: 0.130 ms
#### chat_only
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.008..0.018 rows=10.00 loops=1)
Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.026 ms
#### covering
Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.011 rows=10.00 loops=1)
Buffers: shared hit=3
-> Index Only Scan using bench_variant on messages (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.011 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.017 ms
@@ -0,0 +1,693 @@
# План запроса истории: размер 5k
Commit b2fb88f
Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 5k: first, после 0
duration: 0.100 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '51'
Limit (cost=0.29..11.51 rows=51 width=153) (actual time=0.018..0.071 rows=51.00 loops=1)
Buffers: shared hit=25
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1100.82 rows=5000 width=153) (actual time=0.018..0.068 rows=51.00 loops=1)
Index Cond: (chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid)
Index Searches: 1
Buffers: shared hit=25
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 5k: middle, после 2500
duration: 0.113 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '2026-10-31 20:20:52.094182+00', $3 = '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.022..0.080 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.021..0.076 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 5k: last, после 4900
duration: 0.112 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '2026-10-31 20:20:59.127167+00', $3 = 'd29a2234-a752-4b15-97ca-bc3a5fe16f81', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.022..0.079 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.021..0.075 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.253 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '51'
Limit (cost=0.29..39.63 rows=51 width=153) (actual time=0.033..0.158 rows=51.00 loops=1)
Buffers: shared hit=45
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..771.85 rows=1000 width=153) (actual time=0.032..0.152 rows=51.00 loops=1)
Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Index Searches: 1
Buffers: shared hit=45
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.109 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '2026-10-31 20:20:52.084497+00', $3 = '9087eb30-8899-4c5d-8728-7327affbc2a1', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.018..0.078 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.017..0.075 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.114 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '2026-10-31 20:20:57.953096+00', $3 = 'aa061a11-d99b-430e-8d57-8956f75927c3', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.019..0.080 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.018..0.077 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.124 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '6c3ce1eb-20ca-48e7-af3c-920956940be7', $2 = '51'
Limit (cost=0.29..154.66 rows=51 width=153) (actual time=0.012..0.077 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.012..0.074 rows=51.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 10: first, после 0
duration: 0.042 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '90a36fb9-ae42-4016-a663-65307e1e1e19', $2 = '51'
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.037..0.038 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.036..0.037 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.017..0.033 rows=10.00 loops=1)
Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.006..0.006 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
## Страницы сравнения в psql: варианты
Тот же текст запроса и те же параметры, что у плана приложения этой
страницы, в одной транзакции, которая откатывается: индексы базы
после неё те же. Каждый вариант выполнен дважды, здесь — второе
выполнение. `psql` — индекс приложения, custom plan; `generic` — он
же с force_generic_plan; `or-cursor` — условие курсора через OR;
`no-index` — без индекса приложения; варианты индекса вместо него:
`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text).
### read 5k: middle, после 2500
#### psql
Limit (cost=0.29..18.68 rows=51 width=153) (actual time=0.011..0.061 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..901.43 rows=2499 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
Index Cond: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.060 ms
Execution Time: 0.070 ms
#### generic
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.014..0.070 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.013..0.064 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.011 ms
Execution Time: 0.081 ms
#### or-cursor
Limit (cost=0.29..22.74 rows=51 width=153) (actual time=0.376..0.420 rows=51.00 loops=1)
Buffers: shared hit=2541
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1100.80 rows=2499 width=153) (actual time=0.376..0.417 rows=51.00 loops=1)
Index Cond: (chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid)
Filter: ((created_at > '2026-10-31 20:20:52.094182+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:20:52.094182+00'::timestamp with time zone) AND (id > '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Rows Removed by Filter: 2500
Index Searches: 1
Buffers: shared hit=2541
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.083 ms
Execution Time: 0.431 ms
#### no-index
Limit (cost=455.61..455.73 rows=51 width=153) (actual time=2.173..2.177 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=455.61..461.85 rows=2499 width=153) (actual time=2.173..2.175 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..372.24 rows=2499 width=153) (actual time=0.165..1.896 rows=2500.00 loops=1)
Filter: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Rows Removed by Filter: 6000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.061 ms
Execution Time: 2.186 ms
#### chat_only
Limit (cost=455.61..455.73 rows=51 width=153) (actual time=2.048..2.052 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=455.61..461.85 rows=2499 width=153) (actual time=2.047..2.049 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..372.24 rows=2499 width=153) (actual time=0.140..1.778 rows=2500.00 loops=1)
Filter: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Rows Removed by Filter: 6000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 2.057 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.009..0.097 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..287.88 rows=2499 width=153) (actual time=0.009..0.093 rows=51.00 loops=1)
Index Cond: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.086 ms
Execution Time: 0.108 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.29..74.92 rows=51 width=153) (actual time=0.009..0.069 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..731.98 rows=500 width=153) (actual time=0.008..0.066 rows=51.00 loops=1)
Index Cond: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.050 ms
Execution Time: 0.076 ms
#### generic
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.010..0.066 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.009..0.064 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.007 ms
Execution Time: 0.076 ms
#### or-cursor
Limit (cost=0.29..78.98 rows=51 width=153) (actual time=0.100..0.138 rows=51.00 loops=1)
Buffers: shared hit=530
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..771.85 rows=500 width=153) (actual time=0.100..0.136 rows=51.00 loops=1)
Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Filter: ((created_at > '2026-10-31 20:20:52.084497+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:20:52.084497+00'::timestamp with time zone) AND (id > '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=530
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.143 ms
#### no-index
Limit (cost=358.93..359.06 rows=51 width=153) (actual time=0.633..0.637 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=358.93..360.18 rows=500 width=153) (actual time=0.633..0.635 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..342.25 rows=500 width=153) (actual time=0.143..0.576 rows=500.00 loops=1)
Filter: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Rows Removed by Filter: 8000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.041 ms
Execution Time: 0.643 ms
#### chat_only
Limit (cost=243.59..243.72 rows=51 width=153) (actual time=0.472..0.476 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=243.59..244.84 rows=500 width=153) (actual time=0.472..0.474 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=186
-> Bitmap Heap Scan on messages (cost=15.91..226.91 rows=500 width=153) (actual time=0.092..0.416 rows=500.00 loops=1)
Recheck Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=183
Buffers: shared hit=186
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.019..0.019 rows=1000.00 loops=1)
Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.483 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.004..0.052 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.004..0.050 rows=51.00 loops=1)
Index Cond: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.028 ms
Execution Time: 0.058 ms
### bg 100: first, после 0
#### psql
Limit (cost=0.29..154.66 rows=51 width=153) (actual time=0.007..0.064 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.007..0.062 rows=51.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.072 ms
#### generic
Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.009..0.062 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.47 rows=135 width=153) (actual time=0.009..0.059 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.003 ms
Execution Time: 0.067 ms
#### no-index
Limit (cost=297.07..297.20 rows=51 width=153) (actual time=0.281..0.284 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=297.07..297.32 rows=100 width=153) (actual time=0.281..0.282 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..293.75 rows=100 width=153) (actual time=0.010..0.266 rows=100.00 loops=1)
Filter: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Rows Removed by Filter: 8400
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.035 ms
Execution Time: 0.290 ms
#### chat_only
Limit (cost=172.68..172.80 rows=51 width=153) (actual time=0.133..0.136 rows=51.00 loops=1)
Buffers: shared hit=79
-> Sort (cost=172.68..172.93 rows=100 width=153) (actual time=0.133..0.134 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=79
-> Bitmap Heap Scan on messages (cost=5.06..169.35 rows=100 width=153) (actual time=0.013..0.120 rows=100.00 loops=1)
Recheck Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Heap Blocks: exact=77
Buffers: shared hit=79
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.143 ms
#### covering
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.055 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.052 rows=51.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.035 ms
Execution Time: 0.062 ms
### bg 10: first, после 0
#### psql
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.026..0.027 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.026..0.026 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.013..0.023 rows=10.00 loops=1)
Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.039 ms
Execution Time: 0.040 ms
#### generic
Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.011..0.023 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.47 rows=135 width=153) (actual time=0.011..0.022 rows=10.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning Time: 0.005 ms
Execution Time: 0.032 ms
#### no-index
Limit (cost=292.57..292.59 rows=10 width=153) (actual time=0.214..0.215 rows=10.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=292.57..292.59 rows=10 width=153) (actual time=0.214..0.214 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..292.40 rows=10 width=153) (actual time=0.016..0.212 rows=10.00 loops=1)
Filter: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Rows Removed by Filter: 8490
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.032 ms
Execution Time: 0.220 ms
#### chat_only
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.023..0.025 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.023..0.024 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1)
Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.052 ms
Execution Time: 0.033 ms
#### covering
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.015 rows=10.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.014 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.038 ms
Execution Time: 0.021 ms
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt
1000,1,0,4500,7.804,4500,0,576.6,0.0,51.614,108.971,151.826,222.608,0.999,125.0,116.1,0.119,,0.203,,
5000,1,0,8500,14.658,8500,0,579.9,0.0,51.796,112.909,148.343,224.403,0.999,125.2,115.5,0.11,,0.2,,
10000,1,0,13500,23.029,13500,0,586.2,0.0,51.517,104.946,144.711,250.139,0.999,125.1,118.1,0.109,,0.202,,
1 size chunk messages_before messages_after duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_end_mib mem_cgroup_end_mib generator_cpu_cores flags db_cpu_cores cell attempt
2 1000 1 0 4500 7.804 4500 0 576.6 0.0 51.614 108.971 151.826 222.608 0.999 125.0 116.1 0.119 0.203
3 5000 1 0 8500 14.658 8500 0 579.9 0.0 51.796 112.909 148.343 224.403 0.999 125.2 115.5 0.11 0.2
4 10000 1 0 13500 23.029 13500 0 586.2 0.0 51.517 104.946 144.711 250.139 0.999 125.1 118.1 0.109 0.202
@@ -0,0 +1,12 @@
{
"label": "unit-of-work-aa",
"profile": "quick",
"stage": "done",
"size": 10000,
"runs_done": 18,
"runs_total": 18,
"elapsed_s": 224,
"eta_s": 0,
"warnings": [],
"updated_at": "2026-10-31T20:23:06+00:00"
}
@@ -0,0 +1 @@
{"metrics":{"checks":{"contains":"default","values":{"passes":13500,"fails":0,"rate":1},"type":"rate"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":144.76235140999998,"max":250.22325,"avg":54.54204372888884,"min":11.426459,"med":51.578166499999995,"p(50)":51.578166499999995,"p(95)":104.99915444999999}},"http_req_duration":{"contains":"time","values":{"p(50)":51.517271,"p(95)":104.94581249999997,"p(99)":144.71090033,"max":250.138834,"avg":54.476573535036856,"min":11.378083,"med":51.517271},"type":"trend"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.339042,"avg":0.0004472439999999999,"min":0}},"data_received":{"type":"counter","contains":"data","values":{"count":6615000,"rate":287252.68865780847}},"iterations":{"type":"counter","contains":"default","values":{"count":13500,"rate":586.2299768526703}},"vus_max":{"contains":"default","values":{"max":32,"value":32,"min":32},"type":"gauge"},"http_req_sending":{"values":{"max":0.49325,"avg":0.005056908518518449,"min":0.001958,"med":0.003792,"p(50)":0.003792,"p(95)":0.010083,"p(99)":0.020041009999999998},"type":"trend","contains":"time"},"http_reqs":{"contains":"default","values":{"count":13500,"rate":586.2299768526703},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.016185549777777898,"min":0.004666,"med":0.013917,"p(50)":0.013917,"p(95)":0.03204404999999998,"p(99)":0.051001249999999984,"max":0.396084}},"data_sent":{"type":"counter","contains":"data","values":{"rate":220422.47129660405,"count":5076000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002083,"p(99)":0.003708,"max":1.04975,"avg":0.002860772888888782}},"vus":{"type":"gauge","contains":"default","values":{"value":30,"min":30,"max":32}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":11.378083,"med":51.517271,"p(50)":51.517271,"p(95)":104.94581249999997,"p(99)":144.71090033,"max":250.138834,"avg":54.476573535036856},"thresholds":{"max>=0":{"ok":true}}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":51.493958,"p(95)":104.92815829999999,"p(99)":144.69301542,"max":250.105042,"avg":54.45533107674069,"min":11.361542,"med":51.493958}},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":13500},"type":"rate"}},"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":23028.50508}}
@@ -0,0 +1 @@
{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":4500,"fails":0}],"name":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":7804.259545},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4500,"fails":0}},"http_req_duration":{"contains":"time","values":{"min":11.5215,"med":51.614146,"p(50)":51.614146,"p(95)":108.97147644999998,"p(99)":151.82628041,"max":222.607834,"avg":55.30293323288895},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":4500}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0006185642222222222,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.276958}},"http_req_receiving":{"contains":"time","values":{"p(50)":0.014166,"p(95)":0.03429404999999999,"p(99)":0.05739041999999994,"max":0.412167,"avg":0.016828069555555564,"min":0.004625,"med":0.014166},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"contains":"default","values":{"min":32,"max":32,"value":32},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.000959,"p(50)":0.000959,"p(95)":0.002125,"p(99)":0.007750419999999998,"max":0.906167,"avg":0.0033415228888889355,"min":0.0005}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"data_received":{"type":"counter","contains":"data","values":{"count":2205000,"rate":282538.0149501422}},"http_req_sending":{"values":{"p(95)":0.010459,"p(99)":0.01895801,"max":0.2155,"avg":0.005030362666666664,"min":0.002125,"med":0.003958,"p(50)":0.003958},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"rate":576.6081937758004,"count":4500}},"iteration_duration":{"contains":"time","values":{"p(99)":151.91362333,"max":222.664875,"avg":55.37190353111107,"min":11.580458,"med":51.66479150000001,"p(50)":51.66479150000001,"p(95)":109.01507884999998},"type":"trend"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":11.5215,"med":51.614146,"p(50)":51.614146,"p(95)":108.97147644999998,"p(99)":151.82628041,"max":222.607834,"avg":55.30293323288895},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"values":{"count":4500,"rate":576.6081937758004},"type":"counter","contains":"default"},"data_sent":{"contains":"data","values":{"count":1692000,"rate":216804.68085970095},"type":"counter"},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":51.5932295,"p(50)":51.5932295,"p(95)":108.95620064999999,"p(99)":151.80782051,"max":222.588416,"avg":55.2810748006667,"min":11.507208}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":8500,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":14657.63784,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":284152.1973365935}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.032960099999999985,"p(99)":0.05421175999999997,"max":0.301458,"avg":0.016481440823529543,"min":0.004417,"med":0.014,"p(50)":0.014}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":8500}},"http_req_waiting":{"values":{"p(50)":51.780333,"p(95)":112.89164854999999,"p(99)":148.32381375,"max":224.371292,"avg":55.03091433164729,"min":10.888125,"med":51.780333},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"contains":"default","values":{"value":32,"min":32,"max":32},"type":"gauge"},"http_reqs":{"values":{"count":8500,"rate":579.9024435440683},"type":"counter","contains":"default"},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"iteration_duration":{"contains":"time","values":{"med":51.8613955,"p(50)":51.8613955,"p(95)":112.95544794999998,"p(99)":148.40809108,"max":224.47075,"avg":55.11979060494095,"min":10.95575},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003792,"p(95)":0.010084,"p(99)":0.018791419999999996,"max":0.267417,"avg":0.004890888588235243,"min":0.001791,"med":0.003792}},"checks":{"contains":"default","values":{"rate":1,"passes":8500,"fails":0},"type":"rate"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"avg":55.052286661058716,"min":10.902833,"med":51.795646000000005,"p(50)":51.795646000000005,"p(95)":112.90908569999999,"p(99)":148.34328125999997,"max":224.402542},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_duration":{"values":{"avg":55.052286661058716,"min":10.902833,"med":51.795646000000005,"p(50)":51.795646000000005,"p(95)":112.90908569999999,"p(99)":148.34328125999997,"max":224.402542},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1.013542,"avg":0.004023293411764744,"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002083,"p(99)":0.0046254099999999965}},"http_req_connecting":{"values":{"avg":0.0007623968235294118,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.350917},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":3196000,"rate":218043.3187725697}},"iterations":{"type":"counter","contains":"default","values":{"count":8500,"rate":579.9024435440683}}}}
@@ -0,0 +1 @@
{"metrics":{"http_req_receiving":{"contains":"time","values":{"med":0.020792,"p(50)":0.020792,"p(95)":0.053574599999999986,"p(99)":0.08314983999999999,"max":0.184625,"avg":0.02564272890338361,"min":0.012291},"type":"trend"},"checks":{"contains":"default","values":{"rate":1,"passes":4906,"fails":0},"type":"rate"},"data_sent":{"type":"counter","contains":"data","values":{"count":1025354,"rate":204990.90979468572}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":3.6188283599999997,"max":85.096792,"avg":2.0356424728903417,"min":1.551791,"med":1.895666,"p(50)":1.895666,"p(95)":2.7046919999999997}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":1.9329760978393826,"min":1.486833,"med":1.807208,"p(50)":1.807208,"p(95)":2.504284,"p(99)":3.4146998399999995,"max":84.908542}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":84.977166,"avg":1.962735408887078,"min":1.50225,"med":1.83075,"p(50)":1.83075,"p(95)":2.5664751999999993,"p(99)":3.4802585199999996}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003,"p(95)":0.008766399999999995,"p(99)":0.017405319999999988,"max":0.155417,"avg":0.004116582144313109,"min":0.001666,"med":0.003}},"iterations":{"values":{"count":2453,"rate":490.4088751069036},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":3.4802585199999996,"max":84.977166,"avg":1.962735408887078,"min":1.50225,"med":1.83075,"p(50)":1.83075,"p(95)":2.5664751999999993},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"values":{"count":2453,"rate":490.4088751069036},"type":"counter","contains":"default"},"http_req_connecting":{"contains":"time","values":{"avg":0.00004835915205870362,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.118625},"type":"trend"},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001041,"p(50)":0.001041,"p(95)":0.002333,"p(99)":0.0034148399999999984,"max":0.486958,"avg":0.0014451271911944483}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2453}},"data_received":{"values":{"count":35713227,"rate":7139862.8126814095},"type":"counter","contains":"data"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2453},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2453,"fails":0}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.948628}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":5019.671711,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_received":{"values":{"count":47243955,"rate":9411761.907949204},"type":"counter","contains":"data"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"values":{"avg":0.024742592295839763,"min":0.008459,"med":0.019292,"p(50)":0.019292,"p(95)":0.05186679999999999,"p(99)":0.10284651999999997,"max":0.438125},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":646.4566184455803,"count":3245}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":46.18396639999993,"p(99)":71.60269499999998,"max":114.556125,"avg":24.59960431093986,"min":8.968417,"med":21.929209,"p(50)":21.929209}},"http_req_sending":{"values":{"min":0.001792,"med":0.003,"p(50)":0.003,"p(95)":0.008458,"p(99)":0.018902999999999996,"max":0.130666,"avg":0.0039610767334360975},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3245,"rate":646.4566184455803}},"http_req_blocked":{"contains":"time","values":{"avg":0.003439970724191103,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002167,"p(99)":0.0061485199999999985,"max":0.585125},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6490,"fails":0}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iteration_duration":{"type":"trend","contains":"time","values":{"max":114.636042,"avg":24.702842439753418,"min":9.031625,"med":22.034792,"p(50)":22.034792,"p(95)":46.357516799999914,"p(99)":71.70724799999998}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":3245,"rate":0}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"min":8.984208,"med":21.958834,"p(50)":21.958834,"p(95)":46.24320819999993,"p(99)":71.63251995999998,"max":114.57775,"avg":24.628307979969204},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":71.63251995999998,"max":114.57775,"avg":24.628307979969204,"min":8.984208,"med":21.958834,"p(50)":21.958834,"p(95)":46.24320819999993}},"data_sent":{"values":{"count":1356410,"rate":270218.8665102525},"type":"counter","contains":"data"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.1645,"avg":0.000370775654853621}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3245,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3245}]}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5011.529779},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":45.538875,"avg":5.689445096292062,"min":3.606375,"med":5.338625,"p(50)":5.338625,"p(95)":7.03525,"p(99)":9.824547999999993},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":3479,"rate":0,"passes":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1454222,"rate":290175.26865622564}},"data_received":{"type":"counter","contains":"data","values":{"count":50650761,"rate":10106846.259248776}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.399542,"p(95)":7.147579499999998,"p(99)":9.941798519999988,"max":45.592625,"avg":5.756671475998839,"min":3.661667,"med":5.399542}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.002792,"p(50)":0.002792,"p(95)":0.00675,"p(99)":0.017477259999999998,"max":0.241125,"avg":0.003896505605058975,"min":0.001666}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"iterations":{"type":"counter","contains":"default","values":{"count":3479,"rate":694.1992073115446}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.0865657599999999,"max":0.3295,"avg":0.022590152917505008,"min":0.007375,"med":0.018333,"p(50)":0.018333,"p(95)":0.04400409999999999}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":5.689445096292062,"min":3.606375,"med":5.338625,"p(50)":5.338625,"p(95)":7.03525,"p(99)":9.824547999999993,"max":45.538875}},"vus_max":{"values":{"value":4,"min":4,"max":4},"type":"gauge","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.001916,"p(99)":0.0031340199999999986,"max":0.700708,"avg":0.001768398102903145,"min":0.000541,"med":0.000875,"p(50)":0.000875}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":5.662958437769487,"min":3.582459,"med":5.316708,"p(50)":5.316708,"p(95)":6.996358,"p(99)":9.792100979999994,"max":45.517916}},"http_req_connecting":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.190542,"avg":0.00017812848519689565,"min":0,"med":0},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3479,"rate":694.1992073115446}},"checks":{"contains":"default","values":{"rate":1,"passes":6958,"fails":0},"type":"rate"}},"root_group":{"groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3479,"fails":0,"name":"status 200"},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3479,"fails":0,"name":"full page"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"}}
@@ -0,0 +1 @@
{"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"fails":2644,"rate":0,"passes":0}},"http_reqs":{"values":{"count":2644,"rate":528.76398207808},"type":"counter","contains":"default"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.113167,"avg":0.000042801437216338884}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000541,"med":0.000958,"p(50)":0.000958,"p(95)":0.001875,"p(99)":0.0028153699999999993,"max":0.481166,"avg":0.0012639568835098244}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":2.1086411999999997,"p(99)":2.48973644,"max":5.192542,"avg":1.7930774803328309,"min":1.51975,"med":1.757021,"p(50)":1.757021}},"data_sent":{"type":"counter","contains":"data","values":{"count":1105192,"rate":221023.34450863744}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":2.156706249999999,"p(99)":2.54961031,"max":5.288125,"avg":1.820558904689867,"min":1.551166,"med":1.7807705,"p(50)":1.7807705}},"http_req_sending":{"values":{"avg":0.0038285355521936824,"min":0.001708,"med":0.002792,"p(50)":0.002792,"p(95)":0.006660699999999995,"p(99)":0.018350939999999986,"max":0.41575},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":5288,"fails":0,"rate":1}},"iteration_duration":{"values":{"p(95)":2.24451065,"p(99)":2.6700183699999998,"max":5.453458,"avg":1.8878566168683786,"min":1.600708,"med":1.8409165,"p(50)":1.8409165},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.06927338,"max":0.384875,"avg":0.02365288880484111,"min":0.010208,"med":0.019333,"p(50)":0.019333,"p(95)":0.046493849999999996}},"data_received":{"type":"counter","contains":"data","values":{"count":38493996,"rate":7698274.815074766}},"iterations":{"type":"counter","contains":"default","values":{"count":2644,"rate":528.76398207808}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":1.7807705,"p(50)":1.7807705,"p(95)":2.156706249999999,"p(99)":2.54961031,"max":5.288125,"avg":1.820558904689867,"min":1.551166},"thresholds":{"max>=0":{"ok":true}}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2644,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2644,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5000.340586,"isStdOutTTY":false}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5048.659086},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"values":{"count":3344,"rate":662.3540910640921},"type":"counter","contains":"default"},"http_req_sending":{"values":{"p(99)":0.024581619999999967,"max":1.013667,"avg":0.004336318480861308,"min":0.001792,"med":0.003,"p(50)":0.003,"p(95)":0.00795885},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":6688,"fails":0,"rate":1}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3344}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.019208,"p(95)":0.048071399999999986,"p(99)":0.08819443999999996,"max":0.42,"avg":0.02350889324162677,"min":0.007875,"med":0.019208}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.280458,"avg":0.000769337619617225,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":8.014208,"med":22.0177085,"p(50)":22.0177085,"p(95)":42.995177749999975,"p(99)":63.08671443999999,"max":81.39475,"avg":24.016956552631573}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3344,"rate":662.3540910640921}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":24.116835040669816,"min":8.11925,"med":22.106292,"p(50)":22.106292,"p(95)":43.11353919999997,"p(99)":63.17906324999999,"max":81.4895}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":24.04480176435406,"min":8.041584,"med":22.049291500000002,"p(50)":22.049291500000002,"p(95)":43.02531069999998,"p(99)":63.11551587999999,"max":81.416208}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.0037237036483254104,"min":0.0005,"med":0.000916,"p(50)":0.000916,"p(95)":0.002041,"p(99)":0.0065775599999999945,"max":0.65575}},"http_req_tls_handshaking":{"contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":48685296,"rate":9643213.211802118}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"avg":24.04480176435406,"min":8.041584,"med":22.049291500000002,"p(50)":22.049291500000002,"p(95)":43.02531069999998,"p(99)":63.11551587999999,"max":81.416208}},"data_sent":{"type":"counter","contains":"data","values":{"count":1397792,"rate":276864.0100647905}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3344},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3344,"fails":0}],"name":""}}
@@ -0,0 +1 @@
{"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":51291357,"rate":10248825.252492458}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3523,"rate":703.9511815710184}},"http_req_sending":{"values":{"max":0.157125,"avg":0.003812594379789994,"min":0.0015,"med":0.002792,"p(50)":0.002792,"p(95)":0.0074957999999999934,"p(99)":0.02257901999999999},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"iteration_duration":{"contains":"time","values":{"avg":5.676752529946061,"min":3.619625,"med":5.395125,"p(50)":5.395125,"p(95)":6.776379799999997,"p(99)":8.692119999999996,"max":48.706125},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.165125,"avg":0.00014973034345728073,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3523,"rate":703.9511815710184}},"http_req_blocked":{"values":{"avg":0.002050076923076931,"min":0.0005,"med":0.000875,"p(50)":0.000875,"p(95)":0.001917,"p(99)":0.0034869999999999923,"max":0.758208},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3523}},"data_sent":{"contains":"data","values":{"count":1472614,"rate":294251.5938966857},"type":"counter"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":5.610329624183942,"min":3.567292,"med":5.331666,"p(50)":5.331666,"p(95)":6.672999999999999,"p(99)":8.570651519999997,"max":48.642916},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.375833,"avg":0.02323795061027531,"min":0.008334,"med":0.018667,"p(50)":0.018667,"p(95)":0.0461669,"p(99)":0.08783427999999999}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7046,"fails":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":3.545,"med":5.30575,"p(50)":5.30575,"p(95)":6.6194956000000005,"p(99)":8.493257499999999,"max":48.619125,"avg":5.583279079193863}},"http_req_duration":{"contains":"time","values":{"p(99)":8.570651519999997,"max":48.642916,"avg":5.610329624183942,"min":3.567292,"med":5.331666,"p(50)":5.331666,"p(95)":6.672999999999999},"type":"trend"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3523,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3523,"fails":0}],"name":"","path":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5004.608405}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2614},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2614,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":5000.092127,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_sent":{"contains":"data","values":{"count":1092652,"rate":218526.37356415653},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"count":2614,"rate":522.7903673783649}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":2.7415035399999996,"max":5.22225,"avg":1.8430075065034452,"min":1.563875,"med":1.789688,"p(50)":1.789688,"p(95)":2.23730175}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.003416129686304529,"min":0.001541,"med":0.002709,"p(50)":0.002709,"p(95)":0.006431699999999995,"p(99)":0.012875,"max":0.059167}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5228,"fails":0}},"http_req_tls_handshaking":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.023220708110175934,"min":0.01175,"med":0.019292,"p(50)":0.019292,"p(95)":0.044362049999999986,"p(99)":0.06488078999999998,"max":0.240833}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":1.8163706687069614,"min":1.530416,"med":1.766729,"p(50)":1.766729,"p(95)":2.1934084499999993,"p(99)":2.67899904,"max":4.935333}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.124125,"avg":0.00004748469778117827,"min":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":2.23730175,"p(99)":2.7415035399999996,"max":5.22225,"avg":1.8430075065034452,"min":1.563875,"med":1.789688,"p(50)":1.789688},"thresholds":{"max>=0":{"ok":true}}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001,"p(95)":0.0019583499999999998,"p(99)":0.003203539999999999,"max":0.54375,"avg":0.001391233741392495,"min":0.000541,"med":0.001}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":522.7903673783649,"count":2614}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":1.9095807157612832,"min":1.615583,"med":1.850167,"p(50)":1.850167,"p(95)":2.3316375999999996,"p(99)":2.8422507899999996,"max":6.042708}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2614}},"data_received":{"values":{"count":38057226,"rate":7611304.958661614},"type":"counter","contains":"data"}}}
@@ -0,0 +1 @@
{"state":{"isStdErrTTY":false,"testRunDurationMs":5014.521253,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02380628,"max":0.219875,"avg":0.004594586503473429,"min":0.001584,"med":0.003333,"p(50)":0.003333,"p(95)":0.009916900000000001}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":26.500153423089635,"min":7.866458,"med":23.110541,"p(50)":23.110541,"p(95)":54.84152049999996,"p(99)":88.09617749999998,"max":120.399417}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":120.224667,"avg":26.387985808799147,"min":7.779291,"med":23.019416,"p(50)":23.019416,"p(95)":54.72934559999996,"p(99)":87.95581326}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.96975,"avg":0.005644528283162502,"min":0.0005,"med":0.001042,"p(50)":0.001042,"p(95)":0.002375,"p(99)":0.007509739999999991}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":0.323459,"avg":0.001172897122064175,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":44011857,"rate":8776881.137689736}},"data_sent":{"contains":"data","values":{"rate":251990.9551174057,"count":1263614},"type":"counter"},"iterations":{"contains":"default","values":{"count":3023,"rate":602.8491749220233},"type":"counter"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"max":120.281458,"avg":26.419748478994347,"min":7.805542,"med":23.041,"p(50)":23.041,"p(95)":54.76722919999996,"p(99)":88.00283373999999},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3023,"rate":602.8491749220233}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3023}},"vus_max":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"checks":{"values":{"rate":1,"passes":6046,"fails":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.05807469999999999,"p(99)":0.11203276,"max":0.827417,"avg":0.027168083691697036,"min":0.007375,"med":0.0205,"p(50)":0.0205}},"http_req_duration":{"contains":"time","values":{"p(50)":23.041,"p(95)":54.76722919999996,"p(99)":88.00283373999999,"max":120.281458,"avg":26.419748478994347,"min":7.805542,"med":23.041},"type":"trend"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}}},"root_group":{"groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3023},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3023,"fails":0,"name":"full page"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5003.234544,"isStdOutTTY":false},"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":1487244,"rate":297256.5021529001}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":47.142292,"avg":5.52966184710512,"min":3.569583,"med":5.294499999999999,"p(50)":5.294499999999999,"p(95)":6.43459815,"p(99)":8.00445143}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.002667,"p(95)":0.006125,"p(99)":0.01716069,"max":0.191708,"avg":0.003529186059584083,"min":0.001625,"med":0.002667}},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.000875,"p(50)":0.000875,"p(95)":0.00175,"p(99)":0.00375,"max":0.691958,"avg":0.0017067211916807312,"min":0.0005}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":5.5551518057897535,"min":3.591375,"med":5.31875,"p(50)":5.31875,"p(95)":6.47629555,"p(99)":8.04724588,"max":47.174583},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":6.47629555,"p(99)":8.04724588,"max":47.174583,"avg":5.5551518057897535,"min":3.591375,"med":5.31875,"p(50)":5.31875}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3558,"rate":711.1399573035887}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":0.148709,"avg":0.00013642973580663294,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.021960772625070294,"min":0.008708,"med":0.018125,"p(50)":0.018125,"p(95)":0.04152504999999997,"p(99)":0.08883999999999997,"max":0.253625}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3558}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7116,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":51800922,"rate":10353486.638382949}},"iteration_duration":{"values":{"p(99)":8.12663325,"max":47.25275,"avg":5.619875662169743,"min":3.641292,"med":5.377583,"p(50)":5.377583,"p(95)":6.563735799999999},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3558,"rate":711.1399573035887}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3558,"fails":0,"name":"status 200","path":"::status 200"},{"passes":3558,"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed"}]}}
@@ -0,0 +1 @@
{"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":433.00895844180155}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.0040625,"p(50)":0.0040625,"p(95)":0.011920199999999995,"p(99)":0.023254589999999995,"max":0.455875,"avg":0.005743883999999999,"min":0.00225}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":5.3019307399999995,"max":15.476708,"avg":2.2201656080000007,"min":1.780708,"med":2.0443119999999997,"p(50)":2.0443119999999997,"p(95)":3.1018523999999994}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":433.00895844180155}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_blocked":{"values":{"p(95)":0.002416,"p(99)":0.004516659999999985,"max":0.473958,"avg":0.0019196249999999927,"min":0.000584,"med":0.001083,"p(50)":0.001083},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":2.12425,"p(95)":3.2528919499999995,"p(99)":5.5812415799999995,"max":15.692167,"avg":2.3058623410000023,"min":1.833125,"med":2.12425}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.112209,"avg":0.00011220900000000001,"min":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":162811.3683741174}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":2.243771140999998,"min":1.794375,"med":2.0628745,"p(50)":2.0628745,"p(95)":3.1475441,"p(99)":5.442005829999999,"max":15.536875},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":1000,"rate":0}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":212174.38963648275}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_duration":{"values":{"p(95)":3.1475441,"p(99)":5.442005829999999,"max":15.536875,"avg":2.243771140999998,"min":1.794375,"med":2.0628745,"p(50)":2.0628745},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.014375,"p(50)":0.014375,"p(95)":0.037335099999999996,"p(99)":0.06266208999999996,"max":0.161583,"avg":0.017861648999999973,"min":0.009583}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2309.421042}}
@@ -0,0 +1 @@
{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1641.939751},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.0777412499999999,"max":0.71725,"avg":0.0036357499999999992,"min":0,"med":0}},"iterations":{"type":"counter","contains":"default","values":{"rate":609.0357453073198,"count":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.056186335000017,"min":11.624417,"med":24.996354500000002,"p(50)":24.996354500000002,"p(95)":37.32970655,"p(99)":68.02312758,"max":78.769333}},"data_sent":{"type":"counter","contains":"data","values":{"rate":228997.44023555223,"count":376000}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":298427.5152005867}},"iteration_duration":{"values":{"avg":26.15557987400002,"min":11.70125,"med":25.074292,"p(50)":25.074292,"p(95)":37.47407325,"p(99)":68.08472457999999,"max":78.8375},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":26.08076150099999,"min":11.64675,"med":25.024167,"p(50)":25.024167,"p(95)":37.351916349999996,"p(99)":68.03714858000001,"max":78.784208},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"values":{"count":1000,"rate":609.0357453073198},"type":"counter","contains":"default"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.109958,"avg":0.01590642599999998,"min":0.00475,"med":0.0137915,"p(50)":0.0137915,"p(95)":0.030137499999999987,"p(99)":0.04887792}},"http_req_sending":{"values":{"avg":0.008668740000000003,"min":0.002375,"med":0.003875,"p(50)":0.003875,"p(95)":0.009877049999999998,"p(99)":0.1565754999999997,"max":0.739583},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_duration":{"contains":"time","values":{"p(99)":68.03714858000001,"max":78.784208,"avg":26.08076150099999,"min":11.64675,"med":25.024167,"p(50)":25.024167,"p(95)":37.351916349999996},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.013573354000000048,"min":0.000458,"med":0.000959,"p(50)":0.000959,"p(95)":0.002,"p(99)":0.6113774199999998,"max":1.501709}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1619.940084},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_reqs":{"contains":"default","values":{"count":1000,"rate":617.3067818229257},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.015791837999999985,"min":0.004833,"med":0.012833,"p(50)":0.012833,"p(95)":0.033309749999999985,"p(99)":0.05079532999999999,"max":0.246583}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.0021690499999999983,"p(99)":0.004086069999999998,"max":1.045334,"avg":0.005220708000000031,"min":0.0005,"med":0.001,"p(50)":0.001}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":56.553375,"avg":6.405489956000002,"min":3.001041,"med":5.936813,"p(50)":5.936813,"p(95)":8.140912499999999,"p(99)":11.29438774999999},"thresholds":{"max>=0":{"ok":true}}},"data_sent":{"contains":"data","values":{"count":376000,"rate":232107.3499654201},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"rate":617.3067818229257,"count":1000}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"contains":"time","values":{"avg":6.384549774999999,"min":2.987291,"med":5.919207999999999,"p(50)":5.919207999999999,"p(95)":8.063758349999999,"p(99)":11.255386579999989,"max":56.530417},"type":"trend"},"checks":{"contains":"default","values":{"rate":1,"passes":1000,"fails":0},"type":"rate"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":302480.32309323363}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":56.553375,"avg":6.405489956000002,"min":3.001041,"med":5.936813,"p(50)":5.936813,"p(95)":8.140912499999999,"p(99)":11.29438774999999}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000983918,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.25525}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.001916,"med":0.00375,"p(50)":0.00375,"p(95)":0.010711049999999998,"p(99)":0.02201041999999999,"max":0.190375,"avg":0.005148342999999997}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":3.041292,"med":5.990083,"p(50)":5.990083,"p(95)":8.2630048,"p(99)":11.43236907999999,"max":56.638166,"avg":6.469330499999993}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2163.683751},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"max":1,"value":1,"min":1}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_sent":{"values":{"count":376000,"rate":173777.70657390307},"type":"counter","contains":"data"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":462.17475152633796}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.705,"med":2.0068539999999997,"p(50)":2.0068539999999997,"p(95)":2.6988586499999996,"p(99)":3.51352959,"max":5.30425,"avg":2.101649129999998},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":462.17475152633796}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":226465.6282479056}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.0797107400000012,"min":1.690209,"med":1.9869585,"p(50)":1.9869585,"p(95)":2.6669768,"p(99)":3.46678375,"max":5.193375}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":2.0068539999999997,"p(50)":2.0068539999999997,"p(95)":2.6988586499999996,"p(99)":3.51352959,"max":5.30425,"avg":2.101649129999998,"min":1.705}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":2.7850895499999995,"p(99)":3.5957780899999996,"max":5.510958,"avg":2.160288035000002,"min":1.751625,"med":2.054042,"p(50)":2.054042}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001,"p(95)":0.002044049999999998,"p(99)":0.003,"max":0.429042,"avg":0.0015876289999999917,"min":0.000542,"med":0.001}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003875,"p(95)":0.009462199999999995,"p(99)":0.020298239999999995,"max":0.105958,"avg":0.004893426999999993,"min":0.002084,"med":0.003875}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.099833,"avg":0.000099833,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.04704184,"max":0.113375,"avg":0.017044963,"min":0.009333,"med":0.014437499999999999,"p(50)":0.014437499999999999,"p(95)":0.031713099999999994}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":1640.780209,"isStdOutTTY":false},"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":298638.41440325417}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_receiving":{"contains":"time","values":{"max":0.142792,"avg":0.016537924999999988,"min":0.004708,"med":0.0141875,"p(50)":0.0141875,"p(95)":0.03200205,"p(99)":0.05542558999999999},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":40.06294794999998,"p(99)":69.202682,"max":78.869084,"avg":26.132035742,"min":11.154875,"med":25.0128125,"p(50)":25.0128125}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.03107947000002,"min":11.043875,"med":24.907958999999998,"p(50)":24.907958999999998,"p(95)":40.00222464999998,"p(99)":69.10328408,"max":78.803375}},"http_req_duration{expected_response:true}":{"values":{"avg":26.05335018599999,"min":11.061334,"med":24.9315625,"p(50)":24.9315625,"p(95)":40.01309999999998,"p(99)":69.13171032999999,"max":78.820375},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":229159.2730931093}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.002043099999999998,"p(99)":0.6220609199999997,"max":1.177708,"avg":0.01313667800000005,"min":0.0005,"med":0.000958,"p(50)":0.000958}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.04519907999999997,"max":0.123667,"avg":0.005732790999999992,"min":0.002083,"med":0.003958,"p(50)":0.003958,"p(95)":0.011083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":69.13171032999999,"max":78.820375,"avg":26.05335018599999,"min":11.061334,"med":24.9315625,"p(50)":24.9315625,"p(95)":40.01309999999998}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":609.4661518433759,"count":1000}},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_connecting":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0.12758323999999996,"max":0.255375,"avg":0.0023912500000000006,"min":0},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iterations":{"contains":"default","values":{"count":1000,"rate":609.4661518433759},"type":"counter"}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1672.543709},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":5.9296665,"p(95)":9.039264249999997,"p(99)":20.011489579999996,"max":59.028666,"avg":6.612037893000003,"min":4.708042,"med":5.9296665}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":1000,"rate":0,"passes":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.612037893000003,"min":4.708042,"med":5.9296665,"p(50)":5.9296665,"p(95)":9.039264249999997,"p(99)":20.011489579999996,"max":59.028666},"thresholds":{"max>=0":{"ok":true}}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":224807.27886316783}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_req_tls_handshaking":{"values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":597.8916991041698}},"iteration_duration":{"values":{"min":4.757791,"med":5.984916500000001,"p(50)":5.984916500000001,"p(95)":9.186197899999994,"p(99)":20.17459816,"max":59.110667,"avg":6.680733336999996},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":597.8916991041698}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":1000}},"data_received":{"contains":"data","values":{"count":490000,"rate":292966.9325610432},"type":"counter"},"http_req_sending":{"values":{"p(95)":0.013849699999999986,"p(99)":0.026933249999999985,"max":0.178125,"avg":0.005683878999999994,"min":0.002083,"med":0.003959,"p(50)":0.003959},"type":"trend","contains":"time"},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":19.933702169999997,"max":59.005083,"avg":6.588747367000007,"min":4.691125,"med":5.9102705,"p(50)":5.9102705,"p(95)":8.996960749999996}},"http_req_blocked":{"values":{"max":0.612292,"avg":0.003701035999999989,"min":0.000583,"med":0.000959,"p(50)":0.000959,"p(95)":0.0025440499999999982,"p(99)":0.006561159999999983},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.154291,"avg":0.0005304580000000001,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.017606646999999996,"min":0.005208,"med":0.01275,"p(50)":0.01275,"p(95)":0.0412941,"p(99)":0.09343823999999998,"max":0.25175}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2327.550376},"metrics":{"http_req_connecting":{"values":{"p(99)":0,"max":0.109417,"avg":0.000109417,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend","contains":"time"},"http_req_sending":{"values":{"p(95)":0.013216349999999991,"p(99)":0.024268749999999985,"max":0.209459,"avg":0.005603398000000001,"min":0.002292,"med":0.003958,"p(50)":0.003958},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.3239004549999986,"min":1.764875,"med":2.11125,"p(50)":2.11125,"p(95)":3.3807003,"p(99)":5.19731083,"max":19.04}},"http_req_duration":{"contains":"time","values":{"max":18.280416,"avg":2.259913190999999,"min":1.728292,"med":2.0561455,"p(50)":2.0561455,"p(95)":3.27103335,"p(99)":4.831108829999998},"type":"trend"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.235650339000002,"min":1.714916,"med":2.0361875,"p(50)":2.0361875,"p(95)":3.223722599999999,"p(99)":4.774236249999999,"max":18.209875}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.218208,"avg":0.01865945399999998,"min":0.009458,"med":0.0145205,"p(50)":0.0145205,"p(95)":0.039417,"p(99)":0.07346241999999996}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":210521.75929359993}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":18.280416,"avg":2.259913190999999,"min":1.728292,"med":2.0561455,"p(50)":2.0561455,"p(95)":3.27103335,"p(99)":4.831108829999998},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":429.6362434563264,"count":1000}},"data_sent":{"type":"counter","contains":"data","values":{"rate":161543.22753957871,"count":376000}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":429.6362434563264}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.466042,"avg":0.0018335679999999929,"min":0.000625,"med":0.001125,"p(50)":0.001125,"p(95)":0.002377049999999998,"p(99)":0.004589249999999994}}}}
@@ -0,0 +1 @@
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1699.896126},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":27.017318861000003,"min":12.295583,"med":25.5844795,"p(50)":25.5844795,"p(95)":40.35386454999999,"p(99)":73.69158466999998,"max":90.147},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":40.35386454999999,"p(99)":73.69158466999998,"max":90.147,"avg":27.017318861000003,"min":12.295583,"med":25.5844795,"p(50)":25.5844795}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"contains":"time","values":{"med":0.014417,"p(50)":0.014417,"p(95)":0.036181549999999986,"p(99)":0.06034383999999999,"max":0.096625,"avg":0.016866206999999998,"min":0.004667},"type":"trend"},"data_sent":{"type":"counter","contains":"data","values":{"rate":221189.98581681572,"count":376000}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.994032220000012,"min":12.28325,"med":25.568834000000003,"p(50)":25.568834000000003,"p(95)":40.336578499999995,"p(99)":73.67144041999998,"max":90.0965}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":25.6364585,"p(95)":40.40026729999999,"p(99)":73.74738834,"max":90.233458,"avg":27.095294938000006,"min":12.344084,"med":25.6364585}},"http_req_sending":{"values":{"p(95)":0.011679499999999989,"p(99)":0.055858919999999604,"max":0.253875,"avg":0.006420433999999992,"min":0.001875,"med":0.003875,"p(50)":0.003875},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":588.2712388745099}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":588.2712388745099}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":288252.90704850986}},"http_req_blocked":{"contains":"time","values":{"avg":0.013805569000000044,"min":0.000458,"med":0.000959,"p(50)":0.000959,"p(95)":0.002377099999999998,"p(99)":0.6511208399999993,"max":1.073667},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.1504150799999998,"max":0.428084,"avg":0.003984211,"min":0,"med":0}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1494.866334},"metrics":{"http_req_blocked":{"values":{"avg":0.003952613999999986,"min":0.000541,"med":0.000875,"p(50)":0.000875,"p(95)":0.001875,"p(99)":0.003880409999999995,"max":0.781375},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.014153164999999987,"min":0.005333,"med":0.0118545,"p(50)":0.0118545,"p(95)":0.029768749999999983,"p(99)":0.04425624999999999,"max":0.1545}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":5.846854,"p(50)":5.846854,"p(95)":7.029823549999999,"p(99)":8.48984851,"max":10.031167,"avg":5.9711622539999984,"min":4.399042}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003333,"p(50)":0.003333,"p(95)":0.008462199999999996,"p(99)":0.027675829999999957,"max":0.134125,"avg":0.0044882939999999994,"min":0.002}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":251527.50546859263}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":668.9561315654059}},"checks":{"contains":"default","values":{"passes":1000,"fails":0,"rate":1},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":5.796041499999999,"p(50)":5.796041499999999,"p(95)":6.9658181,"p(99)":8.44333217,"max":9.192083,"avg":5.913922664000003,"min":4.358916}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.199125,"avg":0.000645541,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":6.940322899999999,"p(99)":8.42800324,"max":9.14775,"avg":5.895281205000001,"min":4.342583,"med":5.778063,"p(50)":5.778063}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":327788.5044670489}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"iterations":{"values":{"count":1000,"rate":668.9561315654059},"type":"counter","contains":"default"},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":9.192083,"avg":5.913922664000003,"min":4.358916,"med":5.796041499999999,"p(50)":5.796041499999999,"p(95)":6.9658181,"p(99)":8.44333217},"thresholds":{"max>=0":{"ok":true}}},"vus":{"values":{"max":4,"value":4,"min":4},"type":"gauge","contains":"default"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]}}
+19
View File
@@ -0,0 +1,19 @@
run,scenario,size,concurrency,repeat,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_start_mib,rss_end_mib,rss_max_mib,mem_cgroup_end_mib,store_messages_start,store_messages_end,generator_cpu_cores,flags,check_failed,db_cpu_cores,series,cell,attempt,config,replicas,replica_cpus,replica_memory,db_max_connections,step,step_kind,target_rps,sent,missing,dropped_iterations,slo_error_ratio,slo_pass,fail_reason,read_p95_ms,write_p95_ms,me_p95_ms,read_errors,write_errors,me_errors,short_pages,vus_max,generator_throttled_ratio,generator_mem_peak_mib,app_cpu_replica_max,app_cpu_second_max,app_throttled_ratio,app_throttled_ms,app_mem_peak_mib,app_us_per_request,db_throttled_ratio,db_mem_peak_mib,db_us_per_request,lb_cpu_cores,lb_throttled_ratio,cache_cpu_cores,vm_busy_cores,vm_cpu_pressure,db_commits_per_s,db_rollbacks_per_s,db_wal_mib_per_s,db_wal_fsyncs_per_s,db_sessions_new,db_conn_max,db_conn_replica_max,db_aas_cpu,db_aas_wal,db_aas_lock,db_aas_lwlock,db_aas_io,db_aas_other,db_idle_in_tx_mean,pool_busy_share,db_too_many_clients,lb_qtime_ms,lb_ctime_ms,lb_rtime_ms,lb_ttime_ms,lb_scur_max,lb_qcur_max,lb_retries,lb_redispatches,lb_econ,lb_eresp,lb_chkdown,lb_5xx,instances,instance_share_min,instance_share_max,host_swapouts,signs,error_codes,level
1,read,1000,1,1,5.0,2644,0,528.8,0.0,1.781,2.157,2.55,5.288,0.817,125.0,125.0,125.0,118.0,4500,4500,0.118,,0,0.138,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,read,1000,4,1,5.005,3523,0,704.0,0.0,5.332,6.673,8.571,48.643,1.005,125.0,125.0,125.0,114.0,4500,4500,0.151,,0,0.181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3,read,1000,16,1,5.049,3344,0,662.4,0.0,22.049,43.025,63.116,81.416,1.005,125.0,125.0,125.1,115.8,4500,4500,0.151,,0,0.181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4,write,1000,1,1,2.164,1000,0,462.2,0.0,2.007,2.699,3.514,5.304,0.775,125.0,125.0,125.0,115.9,4600,5600,0.102,,0,0.131,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5,write,1000,4,1,1.673,1000,0,597.9,0.0,5.93,9.039,20.011,59.029,0.99,125.0,125.1,125.1,114.0,5700,6700,0.142,,0,0.209,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,write,1000,16,1,1.641,1000,0,609.5,0.0,24.932,40.013,69.132,78.82,1.008,125.1,125.3,125.3,114.5,6800,7800,0.142,,0,0.223,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7,read,5000,1,1,5.0,2614,0,522.8,0.0,1.79,2.237,2.742,5.222,0.819,125.2,125.2,125.2,117.9,8500,8500,0.115,,0,0.138,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
8,read,5000,4,1,5.003,3558,0,711.1,0.0,5.319,6.476,8.047,47.175,1.004,125.2,125.2,125.2,116.4,8500,8500,0.149,,0,0.178,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
9,read,5000,16,1,5.015,3023,0,602.8,0.0,23.041,54.767,88.003,120.281,1.0,125.2,125.2,125.3,116.5,8500,8500,0.152,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
10,write,5000,1,1,2.328,1000,0,429.6,0.0,2.056,3.271,4.831,18.28,0.765,125.2,125.2,125.2,114.4,8600,9600,0.102,,0,0.145,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
11,write,5000,4,1,1.495,1000,0,669.0,0.0,5.796,6.966,8.443,9.192,0.998,125.2,125.2,125.2,115.8,9700,10700,0.138,,0,0.187,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12,write,5000,16,1,1.7,1000,0,588.3,0.0,25.584,40.354,73.692,90.147,1.008,125.4,125.4,125.5,117.7,10800,11800,0.147,,0,0.206,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
13,read,10000,1,1,5.002,2453,0,490.4,0.0,1.831,2.566,3.48,84.977,0.821,125.2,125.2,125.2,115.8,13500,13500,0.118,,0,0.137,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
14,read,10000,4,1,5.012,3479,0,694.2,0.0,5.339,7.035,9.825,45.539,1.004,125.2,125.2,125.2,115.6,13500,13500,0.152,,0,0.178,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
15,read,10000,16,1,5.02,3245,0,646.5,0.0,21.959,46.243,71.633,114.578,1.005,125.2,125.2,125.3,114.4,13500,13500,0.154,,0,0.182,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
16,write,10000,1,1,2.309,1000,0,433.0,0.0,2.063,3.148,5.442,15.537,0.764,125.2,125.2,125.2,113.7,13600,14600,0.1,,0,0.132,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
17,write,10000,4,1,1.62,1000,0,617.3,0.0,5.937,8.141,11.294,56.553,0.996,125.2,125.3,125.3,115.6,14700,15700,0.13,,0,0.209,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
18,write,10000,16,1,1.642,1000,0,609.0,0.0,25.024,37.352,68.037,78.784,1.008,125.3,125.4,125.4,116.3,15800,16800,0.143,,0,0.212,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1 run scenario size concurrency repeat duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_start_mib rss_end_mib rss_max_mib mem_cgroup_end_mib store_messages_start store_messages_end generator_cpu_cores flags check_failed db_cpu_cores series cell attempt config replicas replica_cpus replica_memory db_max_connections step step_kind target_rps sent missing dropped_iterations slo_error_ratio slo_pass fail_reason read_p95_ms write_p95_ms me_p95_ms read_errors write_errors me_errors short_pages vus_max generator_throttled_ratio generator_mem_peak_mib app_cpu_replica_max app_cpu_second_max app_throttled_ratio app_throttled_ms app_mem_peak_mib app_us_per_request db_throttled_ratio db_mem_peak_mib db_us_per_request lb_cpu_cores lb_throttled_ratio cache_cpu_cores vm_busy_cores vm_cpu_pressure db_commits_per_s db_rollbacks_per_s db_wal_mib_per_s db_wal_fsyncs_per_s db_sessions_new db_conn_max db_conn_replica_max db_aas_cpu db_aas_wal db_aas_lock db_aas_lwlock db_aas_io db_aas_other db_idle_in_tx_mean pool_busy_share db_too_many_clients lb_qtime_ms lb_ctime_ms lb_rtime_ms lb_ttime_ms lb_scur_max lb_qcur_max lb_retries lb_redispatches lb_econ lb_eresp lb_chkdown lb_5xx instances instance_share_min instance_share_max host_swapouts signs error_codes level
2 1 read 1000 1 1 5.0 2644 0 528.8 0.0 1.781 2.157 2.55 5.288 0.817 125.0 125.0 125.0 118.0 4500 4500 0.118 0 0.138
3 2 read 1000 4 1 5.005 3523 0 704.0 0.0 5.332 6.673 8.571 48.643 1.005 125.0 125.0 125.0 114.0 4500 4500 0.151 0 0.181
4 3 read 1000 16 1 5.049 3344 0 662.4 0.0 22.049 43.025 63.116 81.416 1.005 125.0 125.0 125.1 115.8 4500 4500 0.151 0 0.181
5 4 write 1000 1 1 2.164 1000 0 462.2 0.0 2.007 2.699 3.514 5.304 0.775 125.0 125.0 125.0 115.9 4600 5600 0.102 0 0.131
6 5 write 1000 4 1 1.673 1000 0 597.9 0.0 5.93 9.039 20.011 59.029 0.99 125.0 125.1 125.1 114.0 5700 6700 0.142 0 0.209
7 6 write 1000 16 1 1.641 1000 0 609.5 0.0 24.932 40.013 69.132 78.82 1.008 125.1 125.3 125.3 114.5 6800 7800 0.142 0 0.223
8 7 read 5000 1 1 5.0 2614 0 522.8 0.0 1.79 2.237 2.742 5.222 0.819 125.2 125.2 125.2 117.9 8500 8500 0.115 0 0.138
9 8 read 5000 4 1 5.003 3558 0 711.1 0.0 5.319 6.476 8.047 47.175 1.004 125.2 125.2 125.2 116.4 8500 8500 0.149 0 0.178
10 9 read 5000 16 1 5.015 3023 0 602.8 0.0 23.041 54.767 88.003 120.281 1.0 125.2 125.2 125.3 116.5 8500 8500 0.152 0 0.18
11 10 write 5000 1 1 2.328 1000 0 429.6 0.0 2.056 3.271 4.831 18.28 0.765 125.2 125.2 125.2 114.4 8600 9600 0.102 0 0.145
12 11 write 5000 4 1 1.495 1000 0 669.0 0.0 5.796 6.966 8.443 9.192 0.998 125.2 125.2 125.2 115.8 9700 10700 0.138 0 0.187
13 12 write 5000 16 1 1.7 1000 0 588.3 0.0 25.584 40.354 73.692 90.147 1.008 125.4 125.4 125.5 117.7 10800 11800 0.147 0 0.206
14 13 read 10000 1 1 5.002 2453 0 490.4 0.0 1.831 2.566 3.48 84.977 0.821 125.2 125.2 125.2 115.8 13500 13500 0.118 0 0.137
15 14 read 10000 4 1 5.012 3479 0 694.2 0.0 5.339 7.035 9.825 45.539 1.004 125.2 125.2 125.2 115.6 13500 13500 0.152 0 0.178
16 15 read 10000 16 1 5.02 3245 0 646.5 0.0 21.959 46.243 71.633 114.578 1.005 125.2 125.2 125.3 114.4 13500 13500 0.154 0 0.182
17 16 write 10000 1 1 2.309 1000 0 433.0 0.0 2.063 3.148 5.442 15.537 0.764 125.2 125.2 125.2 113.7 13600 14600 0.1 0 0.132
18 17 write 10000 4 1 1.62 1000 0 617.3 0.0 5.937 8.141 11.294 56.553 0.996 125.2 125.3 125.3 115.6 14700 15700 0.13 0 0.209
19 18 write 10000 16 1 1.642 1000 0 609.0 0.0 25.024 37.352 68.037 78.784 1.008 125.3 125.4 125.4 116.3 15800 16800 0.143 0 0.212
+167
View File
@@ -0,0 +1,167 @@
# Нагрузочный замер: метка `unit-of-work-aa`
- Статус: **complete**
- Commit: `b2fb88f`
- Профиль `quick`: размеры 1k, 5k, 10k; клиенты 1, 4, 16; повторов 1; чтение 5 с после 2 с прогрева; запись 1000 после 100
- Лимиты без swap: API 1 CPU / 2g × 1 реплик за HAProxy 1 CPU / 256m, PostgreSQL 4 CPU / 3g, Valkey 2 CPU / 512m; CPU и RSS API — сумма по репликам; значения — медиана (min–max) по повторам
- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1
## Сценарий `read`
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 529 | 1.78 | 2.16 | 2.55 | 5.3 | 0.82 | 0.14 | 125.0 | 4500 | — |
| 1k | 4 | 704 | 5.33 | 6.67 | 8.57 | 48.6 | 1.00 | 0.18 | 125.0 | 4500 | — |
| 1k | 16 | 662 | 22.05 | 43.02 | 63.12 | 81.4 | 1.00 | 0.18 | 125.0 | 4500 | — |
| 5k | 1 | 523 | 1.79 | 2.24 | 2.74 | 5.2 | 0.82 | 0.14 | 125.2 | 8500 | — |
| 5k | 4 | 711 | 5.32 | 6.48 | 8.05 | 47.2 | 1.00 | 0.18 | 125.2 | 8500 | — |
| 5k | 16 | 603 | 23.04 | 54.77 | 88.00 | 120.3 | 1.00 | 0.18 | 125.2 | 8500 | — |
| 10k | 1 | 490 | 1.83 | 2.57 | 3.48 | 85.0 | 0.82 | 0.14 | 125.2 | 13500 | — |
| 10k | 4 | 694 | 5.34 | 7.04 | 9.82 | 45.5 | 1.00 | 0.18 | 125.2 | 13500 | — |
| 10k | 16 | 646 | 21.96 | 46.24 | 71.63 | 114.6 | 1.00 | 0.18 | 125.2 | 13500 | — |
## Сценарий `write`
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 462 | 2.01 | 2.70 | 3.51 | 5.3 | 0.78 | 0.13 | 125.0 | 4600 | — |
| 1k | 4 | 598 | 5.93 | 9.04 | 20.01 | 59.0 | 0.99 | 0.21 | 125.1 | 5700 | — |
| 1k | 16 | 610 | 24.93 | 40.01 | 69.13 | 78.8 | 1.01 | 0.22 | 125.3 | 6800 | — |
| 5k | 1 | 430 | 2.06 | 3.27 | 4.83 | 18.3 | 0.77 | 0.14 | 125.2 | 8600 | — |
| 5k | 4 | 669 | 5.80 | 6.97 | 8.44 | 9.2 | 1.00 | 0.19 | 125.2 | 9700 | — |
| 5k | 16 | 588 | 25.58 | 40.35 | 73.69 | 90.1 | 1.01 | 0.21 | 125.4 | 10800 | — |
| 10k | 1 | 433 | 2.06 | 3.15 | 5.44 | 15.5 | 0.76 | 0.13 | 125.2 | 13600 | — |
| 10k | 4 | 617 | 5.94 | 8.14 | 11.29 | 56.6 | 1.00 | 0.21 | 125.3 | 14700 | — |
| 10k | 16 | 609 | 25.02 | 37.35 | 68.04 | 78.8 | 1.01 | 0.21 | 125.4 | 15800 | — |
## Память и наполнение по размерам
Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`).
| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 4500 | 121.0 | 125.0 | 928 | 0.8 | 0.6 | 331 | 577 | 9 | 184.6 |
| 5k | 8500 | 121.0 | 125.2 | 511 | 1.5 | 1.1 | 322 | 580 | 49 | 184.7 |
| 10k | 13500 | 121.1 | 125.1 | 317 | 2.3 | 1.9 | 328 | 586 | 99 | 184.7 |
## Планы запроса истории
Страница (`limit` профиля) читаемого чата и первого чата каждого фонового уровня. `app` — план запроса приложения (auto_explain). Остальное — тот же запрос с теми же параметрами в psql, в откатываемой транзакции: `psql` — индекс приложения, `generic` — он же с generic plan, `or-cursor` — условие курсора через OR, `no-index` — без индекса, дальше — варианты индекса профиля. Буферы — верхнего узла плана, файлы — `explain-<размер>.txt`.
| Размер | Чат | Страница | После сообщений | Вариант | Узел | shared hit | read | Строк | Время, мс | План |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | read 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 32 | 0 | 51 | 0.147 | custom |
| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.121 | custom |
| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.065 | custom |
| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.072 | generic |
| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 525 | 0 | 51 | 0.136 | custom |
| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.560 | custom |
| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.519 | custom |
| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.055 | custom |
| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 28 | 0 | 51 | 0.240 | custom |
| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 37 | 0 | 51 | 0.106 | custom |
| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.105 | custom |
| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.084 | custom |
| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.069 | generic |
| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 528 | 0 | 51 | 0.146 | custom |
| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.612 | custom |
| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 101 | 0 | 51 | 0.453 | custom |
| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom |
| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 18 | 0 | 51 | 0.156 | custom |
| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.231 | custom |
| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.127 | custom |
| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.063 | generic |
| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.207 | custom |
| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.127 | custom |
| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.052 | custom |
| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.041 | custom |
| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.032 | custom |
| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.023 | generic |
| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 10 | 0.130 | custom |
| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.026 | custom |
| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.017 | custom |
| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 25 | 0 | 51 | 0.100 | custom |
| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.113 | generic |
| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.070 | custom |
| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.081 | generic |
| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2541 | 0 | 51 | 0.431 | custom |
| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 2.186 | custom |
| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 186 | 0 | 51 | 2.057 | custom |
| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.108 | custom |
| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.112 | generic |
| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 45 | 0 | 51 | 0.253 | custom |
| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.109 | generic |
| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.076 | custom |
| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.076 | generic |
| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 530 | 0 | 51 | 0.143 | custom |
| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.643 | custom |
| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 186 | 0 | 51 | 0.483 | custom |
| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.058 | custom |
| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.114 | generic |
| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.124 | custom |
| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.072 | custom |
| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.067 | generic |
| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.290 | custom |
| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 79 | 0 | 51 | 0.143 | custom |
| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.062 | custom |
| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.042 | custom |
| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.040 | custom |
| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.032 | generic |
| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 10 | 0.220 | custom |
| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.033 | custom |
| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.021 | custom |
| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 17 | 0 | 51 | 0.184 | custom |
| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.146 | generic |
| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.065 | custom |
| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.077 | generic |
| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 5063 | 0 | 51 | 0.779 | custom |
| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 293 | 0 | 51 | 3.995 | custom |
| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 293 | 0 | 51 | 3.719 | custom |
| 10k | read 10k | middle | 5000 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.052 | custom |
| 10k | read 10k | last | 9900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.144 | generic |
| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.150 | custom |
| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.185 | generic |
| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.057 | custom |
| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.072 | generic |
| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 502 | 0 | 51 | 0.129 | custom |
| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 293 | 0 | 51 | 0.676 | custom |
| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 281 | 0 | 51 | 0.517 | custom |
| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.054 | custom |
| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.126 | generic |
| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.165 | custom |
| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.055 | custom |
| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.069 | generic |
| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 293 | 0 | 51 | 0.402 | custom |
| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 91 | 0 | 51 | 0.120 | custom |
| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.049 | custom |
| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.073 | custom |
| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | custom |
| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.035 | generic |
| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 293 | 0 | 10 | 0.313 | custom |
| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.030 | custom |
| 10k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 10 | 0.017 | custom |
## Стоимость записи по вариантам индекса
Вставка порции сообщений во все чаты в пропорции наполнения одной командой, в транзакции, которая откатывается; индекс истории построен заново, перед вставкой `CHECKPOINT`. Значения — медиана (min–max) повторов. «4000 символов» — вставка сообщения максимальной длины из несжимаемого текста.
| Размер | Вариант | Строк вставки | Индекс, МиБ | Байт индекса на сообщение | мкс на сообщение | WAL байт на сообщение | FPI на 1000 | 4000 символов |
|---|---|---|---|---|---|---|---|---|
| 1k | app | 5000 | 0.5 | 60.9 | 5.24 (5.07–6.19) | 488 (488–501) | 20.8 (12.0–20.8) | ok |
| 1k | chat_only | 5000 | 0.1 | 9.5 | 4.97 (4.91–4.97) | 398 (398–399) | 18.2 (18.2–18.2) | ok |
| 1k | covering | 5000 | 1.2 | 159.6 | 5.71 (5.46–6.67) | 689 (689–689) | 24.2 (24.2–24.2) | index row requires 12072 bytes, maximum size is 8191 |
| 1k | none | 5000 | 0.0 | 0.0 | 4.62 (4.47–6.41) | 311 (311–311) | 16.8 (16.8–16.8) | ok |
| 5k | app | 5000 | 0.7 | 60.4 | 5.20 (5.04–5.34) | 512 (510–512) | 22.8 (17.2–22.8) | ok |
| 5k | chat_only | 5000 | 0.1 | 9.0 | 4.92 (4.77–5.05) | 425 (424–425) | 20.2 (19.8–20.6) | ok |
| 5k | covering | 5000 | 1.8 | 160.4 | 5.73 (5.70–8.37) | 719 (718–719) | 26.6 (26.2–26.6) | index row requires 12072 bytes, maximum size is 8191 |
| 5k | none | 5000 | 0.0 | 0.0 | 4.39 (4.28–4.39) | 336 (336–337) | 18.6 (18.4–18.6) | ok |
| 10k | app | 5000 | 1.0 | 59.5 | 5.16 (5.14–5.58) | 536 (536–550) | 30.2 (19.2–30.6) | ok |
| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.93 (4.83–4.96) | 450 (448–452) | 28.0 (26.2–28.6) | ok |
| 10k | covering | 5000 | 2.6 | 160.4 | 5.63 (5.56–8.60) | 748 (747–749) | 34.2 (33.2–34.4) | index row requires 12072 bytes, maximum size is 8191 |
| 10k | none | 5000 | 0.0 | 0.0 | 4.39 (4.36–4.59) | 365 (363–365) | 26.8 (26.2–27.2) | ok |
## Кривая наполнения 10k: запись при росте хранилища, 32 клиента
| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 13500 | 586 | 51.517 | 104.946 | 144.711 | 250.139 | 0.999 | 0.202 | 125.1 | — |