docs: record unit-of-work evidence and report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,673 @@
|
||||
# План запроса истории: размер 10k
|
||||
|
||||
Commit 6ba74b1
|
||||
Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
|
||||
Страница — `limit` профиля; «после» — сколько сообщений чата до
|
||||
страницы.
|
||||
|
||||
## Планы приложения
|
||||
|
||||
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
|
||||
с которыми его выполнило приложение (prepared statement asyncpg).
|
||||
|
||||
### read 10k: first, после 0
|
||||
|
||||
duration: 0.183 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 = '99ea412a-276b-4e62-817a-131787be68f4', $2 = '51'
|
||||
Limit (cost=0.29..9.61 rows=51 width=153) (actual time=0.066..0.141 rows=51.00 loops=1)
|
||||
Buffers: shared hit=10
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1828.70 rows=10000 width=153) (actual time=0.065..0.137 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=10
|
||||
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.173 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 = '99ea412a-276b-4e62-817a-131787be68f4', $2 = '2026-10-31 20:25:58.972716+00', $3 = 'a8013679-c33e-427a-bd32-ce55583660ec', $4 = '51'
|
||||
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.033..0.139 rows=51.00 loops=1)
|
||||
Buffers: shared hit=50
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.032..0.135 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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)
|
||||
|
||||
### read 10k: last, после 9900
|
||||
|
||||
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 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 = '99ea412a-276b-4e62-817a-131787be68f4', $2 = '2026-10-31 20:26:12.424471+00', $3 = '1181b092-52d6-4ca4-be5f-638e84c56409', $4 = '51'
|
||||
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.033..0.129 rows=51.00 loops=1)
|
||||
Buffers: shared hit=48
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.032..0.125 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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 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 = '46b04d36-1a11-4041-9b6f-9851466b16d5', $2 = '51'
|
||||
Limit (cost=0.29..54.21 rows=51 width=153) (actual time=0.026..0.114 rows=51.00 loops=1)
|
||||
Buffers: shared hit=48
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.60 rows=1000 width=153) (actual time=0.025..0.111 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::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 1k: middle, после 500
|
||||
|
||||
duration: 0.174 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 = '46b04d36-1a11-4041-9b6f-9851466b16d5', $2 = '2026-10-31 20:25:58.952532+00', $3 = '76134beb-2514-483c-9e57-35cca348654e', $4 = '51'
|
||||
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.034..0.135 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.46 rows=71 width=153) (actual time=0.033..0.131 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 1k: last, после 900
|
||||
|
||||
duration: 0.136 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 = '46b04d36-1a11-4041-9b6f-9851466b16d5', $2 = '2026-10-31 20:26:10.027592+00', $3 = 'd40867ec-a74c-405c-a995-63fd352c51eb', $4 = '51'
|
||||
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.032..0.108 rows=51.00 loops=1)
|
||||
Buffers: shared hit=48
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.031..0.105 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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 100: first, после 0
|
||||
|
||||
duration: 0.182 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 = '569aadba-e8bf-42b0-badc-792ce65b3d18', $2 = '51'
|
||||
Limit (cost=0.29..151.03 rows=51 width=153) (actual time=0.015..0.151 rows=51.00 loops=1)
|
||||
Buffers: shared hit=43
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.87 rows=100 width=153) (actual time=0.015..0.149 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=43
|
||||
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.086 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 = 'af5d41fb-ffe2-459e-b929-6a4ab3569116', $2 = '51'
|
||||
Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.010..0.081 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.26 rows=10 width=153) (actual time=0.010..0.080 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::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.68 rows=51 width=153) (actual time=0.007..0.054 rows=51.00 loops=1)
|
||||
Buffers: shared hit=50
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1411.46 rows=5000 width=153) (actual time=0.007..0.051 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid)))
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=50
|
||||
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.052 ms
|
||||
Execution Time: 0.063 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.006..0.057 rows=51.00 loops=1)
|
||||
Buffers: shared hit=50
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.46 rows=71 width=153) (actual time=0.006..0.054 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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.006 ms
|
||||
Execution Time: 0.065 ms
|
||||
|
||||
#### or-cursor
|
||||
|
||||
Limit (cost=0.29..18.93 rows=51 width=153) (actual time=0.682..0.725 rows=51.00 loops=1)
|
||||
Buffers: shared hit=4713
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1828.70 rows=5000 width=153) (actual time=0.682..0.723 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid)
|
||||
Filter: ((created_at > '2026-10-31 20:25:58.972716+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:25:58.972716+00'::timestamp with time zone) AND (id > 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid)))
|
||||
Rows Removed by Filter: 5000
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=4713
|
||||
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.051 ms
|
||||
Execution Time: 0.732 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=772.06..772.19 rows=51 width=153) (actual time=3.998..4.002 rows=51.00 loops=1)
|
||||
Buffers: shared hit=294
|
||||
-> Sort (cost=772.06..784.56 rows=5000 width=153) (actual time=3.998..4.000 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 43kB
|
||||
Buffers: shared hit=294
|
||||
-> Seq Scan on messages (cost=0.00..605.25 rows=5000 width=153) (actual time=0.232..3.473 rows=5000.00 loops=1)
|
||||
Filter: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid)))
|
||||
Rows Removed by Filter: 8500
|
||||
Buffers: shared hit=294
|
||||
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.052 ms
|
||||
Execution Time: 4.012 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=772.06..772.19 rows=51 width=153) (actual time=3.749..3.754 rows=51.00 loops=1)
|
||||
Buffers: shared hit=294
|
||||
-> Sort (cost=772.06..784.56 rows=5000 width=153) (actual time=3.749..3.751 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 43kB
|
||||
Buffers: shared hit=294
|
||||
-> Seq Scan on messages (cost=0.00..605.25 rows=5000 width=153) (actual time=0.228..3.243 rows=5000.00 loops=1)
|
||||
Filter: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::uuid)))
|
||||
Rows Removed by Filter: 8500
|
||||
Buffers: shared hit=294
|
||||
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.061 ms
|
||||
Execution Time: 3.763 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.006..0.045 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.043 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '99ea412a-276b-4e62-817a-131787be68f4'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.972716+00'::timestamp with time zone, 'a8013679-c33e-427a-bd32-ce55583660ec'::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.045 ms
|
||||
Execution Time: 0.051 ms
|
||||
|
||||
### bg 1k: middle, после 500
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=0.29..96.04 rows=51 width=153) (actual time=0.007..0.048 rows=51.00 loops=1)
|
||||
Buffers: shared hit=47
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..940.94 rows=501 width=153) (actual time=0.006..0.046 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::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.045 ms
|
||||
Execution Time: 0.056 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.007..0.054 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.46 rows=71 width=153) (actual time=0.007..0.051 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)
|
||||
Planning Time: 0.005 ms
|
||||
Execution Time: 0.061 ms
|
||||
|
||||
#### or-cursor
|
||||
|
||||
Limit (cost=0.29..107.92 rows=51 width=153) (actual time=0.080..0.117 rows=51.00 loops=1)
|
||||
Buffers: shared hit=514
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.62 rows=501 width=153) (actual time=0.080..0.115 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid)
|
||||
Filter: ((created_at > '2026-10-31 20:25:58.952532+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:25:58.952532+00'::timestamp with time zone) AND (id > '76134beb-2514-483c-9e57-35cca348654e'::uuid)))
|
||||
Rows Removed by Filter: 500
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=514
|
||||
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.073 ms
|
||||
Execution Time: 0.125 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=554.48..554.61 rows=51 width=153) (actual time=0.698..0.702 rows=51.00 loops=1)
|
||||
Buffers: shared hit=294
|
||||
-> Sort (cost=554.48..555.73 rows=501 width=153) (actual time=0.698..0.699 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 39kB
|
||||
Buffers: shared hit=294
|
||||
-> Seq Scan on messages (cost=0.00..537.76 rows=501 width=153) (actual time=0.171..0.639 rows=500.00 loops=1)
|
||||
Filter: ((chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::uuid)))
|
||||
Rows Removed by Filter: 13000
|
||||
Buffers: shared hit=294
|
||||
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.053 ms
|
||||
Execution Time: 0.708 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=351.64..351.77 rows=51 width=153) (actual time=0.473..0.476 rows=51.00 loops=1)
|
||||
Buffers: shared hit=285
|
||||
-> Sort (cost=351.64..352.89 rows=501 width=153) (actual time=0.473..0.474 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 39kB
|
||||
Buffers: shared hit=285
|
||||
-> Bitmap Heap Scan on messages (cost=15.91..334.93 rows=501 width=153) (actual time=0.098..0.423 rows=500.00 loops=1)
|
||||
Recheck Cond: (chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid)
|
||||
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::uuid))
|
||||
Rows Removed by Filter: 500
|
||||
Heap Blocks: exact=283
|
||||
Buffers: shared hit=285
|
||||
-> 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 = '46b04d36-1a11-4041-9b6f-9851466b16d5'::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.041 ms
|
||||
Execution Time: 0.484 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..6.27 rows=51 width=153) (actual time=0.008..0.047 rows=51.00 loops=1)
|
||||
Buffers: shared hit=5
|
||||
-> Index Only Scan using bench_variant on messages (cost=0.41..57.94 rows=501 width=153) (actual time=0.008..0.044 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '46b04d36-1a11-4041-9b6f-9851466b16d5'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:25:58.952532+00'::timestamp with time zone, '76134beb-2514-483c-9e57-35cca348654e'::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.053 ms
|
||||
Execution Time: 0.055 ms
|
||||
|
||||
### bg 100: first, после 0
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=0.29..151.03 rows=51 width=153) (actual time=0.014..0.058 rows=51.00 loops=1)
|
||||
Buffers: shared hit=43
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.87 rows=100 width=153) (actual time=0.014..0.056 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=43
|
||||
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.043 ms
|
||||
Execution Time: 0.063 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.009..0.057 rows=51.00 loops=1)
|
||||
Buffers: shared hit=43
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.79 rows=214 width=153) (actual time=0.009..0.054 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = $1)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=43
|
||||
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.064 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=467.57..467.70 rows=51 width=153) (actual time=0.392..0.395 rows=51.00 loops=1)
|
||||
Buffers: shared hit=294
|
||||
-> Sort (cost=467.57..467.82 rows=100 width=153) (actual time=0.392..0.393 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=294
|
||||
-> Seq Scan on messages (cost=0.00..464.25 rows=100 width=153) (actual time=0.012..0.377 rows=100.00 loops=1)
|
||||
Filter: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid)
|
||||
Rows Removed by Filter: 13400
|
||||
Buffers: shared hit=294
|
||||
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.050 ms
|
||||
Execution Time: 0.403 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=215.59..215.72 rows=51 width=153) (actual time=0.118..0.122 rows=51.00 loops=1)
|
||||
Buffers: shared hit=85
|
||||
-> Sort (cost=215.59..215.84 rows=100 width=153) (actual time=0.118..0.120 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=85
|
||||
-> Bitmap Heap Scan on messages (cost=5.06..212.27 rows=100 width=153) (actual time=0.015..0.104 rows=100.00 loops=1)
|
||||
Recheck Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::uuid)
|
||||
Heap Blocks: exact=83
|
||||
Buffers: shared hit=85
|
||||
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.005..0.005 rows=100.00 loops=1)
|
||||
Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::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.038 ms
|
||||
Execution Time: 0.129 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.006..0.048 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.006..0.045 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '569aadba-e8bf-42b0-badc-792ce65b3d18'::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.045 ms
|
||||
Execution Time: 0.055 ms
|
||||
|
||||
### bg 10: first, после 0
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.009..0.021 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.26 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::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.056 ms
|
||||
Execution Time: 0.028 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.009..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..537.79 rows=214 width=153) (actual time=0.008..0.017 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.004 ms
|
||||
Execution Time: 0.024 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=463.07..463.09 rows=10 width=153) (actual time=0.324..0.325 rows=10.00 loops=1)
|
||||
Buffers: shared hit=294
|
||||
-> Sort (cost=463.07..463.09 rows=10 width=153) (actual time=0.324..0.324 rows=10.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 27kB
|
||||
Buffers: shared hit=294
|
||||
-> Seq Scan on messages (cost=0.00..462.90 rows=10 width=153) (actual time=0.022..0.322 rows=10.00 loops=1)
|
||||
Filter: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::uuid)
|
||||
Rows Removed by Filter: 13490
|
||||
Buffers: shared hit=294
|
||||
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.033 ms
|
||||
Execution Time: 0.329 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.018..0.019 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.005..0.016 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::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.051 ms
|
||||
Execution Time: 0.027 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.013 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.012 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = 'af5d41fb-ffe2-459e-b929-6a4ab3569116'::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.052 ms
|
||||
Execution Time: 0.019 ms
|
||||
@@ -0,0 +1,731 @@
|
||||
# План запроса истории: размер 1k
|
||||
|
||||
Commit 6ba74b1
|
||||
Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
|
||||
Страница — `limit` профиля; «после» — сколько сообщений чата до
|
||||
страницы.
|
||||
|
||||
## Планы приложения
|
||||
|
||||
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
|
||||
с которыми его выполнило приложение (prepared statement asyncpg).
|
||||
|
||||
### read 1k: first, после 0
|
||||
|
||||
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 ORDER BY messages.created_at, messages.id
|
||||
LIMIT $2::INTEGER
|
||||
Query Parameters: $1 = '46854c14-676a-4932-9061-086bf0a80bf2', $2 = '51'
|
||||
Limit (cost=0.28..24.73 rows=51 width=153) (actual time=0.045..0.125 rows=51.00 loops=1)
|
||||
Buffers: shared hit=27
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.69 rows=1000 width=153) (actual time=0.044..0.122 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=27
|
||||
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.160 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 = '46854c14-676a-4932-9061-086bf0a80bf2', $2 = '2026-10-31 20:23:26.500819+00', $3 = '5576746d-8c9e-4881-84fd-1a794cd17f1d', $4 = '51'
|
||||
Limit (cost=0.28..45.28 rows=51 width=153) (actual time=0.036..0.125 rows=51.00 loops=1)
|
||||
Buffers: shared hit=47
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.51 rows=499 width=153) (actual time=0.035..0.122 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid)))
|
||||
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)
|
||||
|
||||
### read 1k: last, после 900
|
||||
|
||||
duration: 0.279 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 = '46854c14-676a-4932-9061-086bf0a80bf2', $2 = '2026-10-31 20:23:30.080533+00', $3 = '29d6bdf7-735d-47a4-bb3c-aa907842be2e', $4 = '51'
|
||||
Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.239..0.244 rows=51.00 loops=1)
|
||||
Buffers: shared hit=22
|
||||
-> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.239..0.241 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=22
|
||||
-> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.040..0.199 rows=100.00 loops=1)
|
||||
Recheck Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.080533+00'::timestamp with time zone, '29d6bdf7-735d-47a4-bb3c-aa907842be2e'::uuid)))
|
||||
Heap Blocks: exact=19
|
||||
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.017..0.017 rows=100.00 loops=1)
|
||||
Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.080533+00'::timestamp with time zone, '29d6bdf7-735d-47a4-bb3c-aa907842be2e'::uuid)))
|
||||
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=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.135 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 = '62be041f-7108-4a7a-becb-28edcdfc01aa', $2 = '51'
|
||||
Limit (cost=0.28..24.73 rows=51 width=153) (actual time=0.027..0.101 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.69 rows=1000 width=153) (actual time=0.027..0.098 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::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)
|
||||
|
||||
### bg 1k: middle, после 500
|
||||
|
||||
duration: 0.108 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 = '62be041f-7108-4a7a-becb-28edcdfc01aa', $2 = '2026-10-31 20:23:26.481237+00', $3 = 'd44546d3-6718-4522-9e30-1bb8271f1d93', $4 = '51'
|
||||
Limit (cost=0.28..45.51 rows=51 width=153) (actual time=0.019..0.079 rows=51.00 loops=1)
|
||||
Buffers: shared hit=49
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..444.58 rows=501 width=153) (actual time=0.018..0.076 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid)))
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=49
|
||||
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.154 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 = '62be041f-7108-4a7a-becb-28edcdfc01aa', $2 = '2026-10-31 20:23:30.078364+00', $3 = 'd0076703-57f1-4448-86f4-e1b7e93ee8d7', $4 = '51'
|
||||
Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.129..0.132 rows=51.00 loops=1)
|
||||
Buffers: shared hit=19
|
||||
-> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.128..0.130 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=19
|
||||
-> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.026..0.104 rows=100.00 loops=1)
|
||||
Recheck Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.078364+00'::timestamp with time zone, 'd0076703-57f1-4448-86f4-e1b7e93ee8d7'::uuid)))
|
||||
Heap Blocks: exact=17
|
||||
Buffers: shared hit=19
|
||||
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.28 rows=100 width=0) (actual time=0.011..0.011 rows=100.00 loops=1)
|
||||
Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:30.078364+00'::timestamp with time zone, 'd0076703-57f1-4448-86f4-e1b7e93ee8d7'::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.314 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 = 'c29b11ae-9145-41f5-ad26-73f1c05430d8', $2 = '51'
|
||||
Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.284..0.288 rows=51.00 loops=1)
|
||||
Buffers: shared hit=65
|
||||
-> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.283..0.285 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=65
|
||||
-> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.033..0.257 rows=100.00 loops=1)
|
||||
Recheck Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid)
|
||||
Heap Blocks: exact=63
|
||||
Buffers: shared hit=65
|
||||
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.009..0.009 rows=100.00 loops=1)
|
||||
Index Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::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.043 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 = '6f3adfe6-1e3e-4065-a369-d2cd6e625865', $2 = '51'
|
||||
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.039..0.040 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.039..0.039 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.015..0.030 rows=10.00 loops=1)
|
||||
Recheck Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.007..0.007 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.28 rows=51 width=153) (actual time=0.006..0.063 rows=51.00 loops=1)
|
||||
Buffers: shared hit=47
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.51 rows=499 width=153) (actual time=0.006..0.060 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid)))
|
||||
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)
|
||||
Planning:
|
||||
Buffers: shared hit=3
|
||||
Planning Time: 0.047 ms
|
||||
Execution Time: 0.070 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.28..7.92 rows=2 width=153) (actual time=0.011..0.061 rows=51.00 loops=1)
|
||||
Buffers: shared hit=47
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..91.99 rows=24 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=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)
|
||||
Planning Time: 0.006 ms
|
||||
Execution Time: 0.069 ms
|
||||
|
||||
#### or-cursor
|
||||
|
||||
Limit (cost=0.28..49.28 rows=51 width=153) (actual time=0.077..0.122 rows=51.00 loops=1)
|
||||
Buffers: shared hit=496
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.68 rows=499 width=153) (actual time=0.077..0.120 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid)
|
||||
Filter: ((created_at > '2026-10-31 20:23:26.500819+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:23:26.500819+00'::timestamp with time zone) AND (id > '5576746d-8c9e-4881-84fd-1a794cd17f1d'::uuid)))
|
||||
Rows Removed by Filter: 500
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=496
|
||||
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.047 ms
|
||||
Execution Time: 0.128 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=203.88..204.01 rows=51 width=153) (actual time=0.566..0.571 rows=51.00 loops=1)
|
||||
Buffers: shared hit=101
|
||||
-> Sort (cost=203.88..205.13 rows=499 width=153) (actual time=0.566..0.568 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 41kB
|
||||
Buffers: shared hit=101
|
||||
-> Seq Scan on messages (cost=0.00..187.24 rows=499 width=153) (actual time=0.092..0.507 rows=500.00 loops=1)
|
||||
Filter: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::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.054 ms
|
||||
Execution Time: 0.578 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=158.54..158.67 rows=51 width=153) (actual time=0.455..0.459 rows=51.00 loops=1)
|
||||
Buffers: shared hit=103
|
||||
-> Sort (cost=158.54..159.79 rows=499 width=153) (actual time=0.455..0.457 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 41kB
|
||||
Buffers: shared hit=103
|
||||
-> Bitmap Heap Scan on messages (cost=15.91..141.89 rows=499 width=153) (actual time=0.046..0.401 rows=500.00 loops=1)
|
||||
Recheck Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid)
|
||||
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::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.011 rows=1000.00 loops=1)
|
||||
Index Cond: (chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::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.046 ms
|
||||
Execution Time: 0.466 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.005..0.050 rows=51.00 loops=1)
|
||||
Buffers: shared hit=4
|
||||
-> Index Only Scan using bench_variant on messages (cost=0.28..57.75 rows=499 width=153) (actual time=0.005..0.048 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '46854c14-676a-4932-9061-086bf0a80bf2'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.500819+00'::timestamp with time zone, '5576746d-8c9e-4881-84fd-1a794cd17f1d'::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.051 ms
|
||||
Execution Time: 0.057 ms
|
||||
|
||||
### bg 1k: middle, после 500
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=0.28..45.51 rows=51 width=153) (actual time=0.014..0.059 rows=51.00 loops=1)
|
||||
Buffers: shared hit=49
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..444.58 rows=501 width=153) (actual time=0.014..0.056 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid)))
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=49
|
||||
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.074 ms
|
||||
Execution Time: 0.068 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.28..7.92 rows=2 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
|
||||
Buffers: shared hit=49
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..91.99 rows=24 width=153) (actual time=0.011..0.054 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=49
|
||||
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.069 ms
|
||||
|
||||
#### or-cursor
|
||||
|
||||
Limit (cost=0.28..49.09 rows=51 width=153) (actual time=0.082..0.117 rows=51.00 loops=1)
|
||||
Buffers: shared hit=487
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.71 rows=501 width=153) (actual time=0.081..0.115 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid)
|
||||
Filter: ((created_at > '2026-10-31 20:23:26.481237+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:23:26.481237+00'::timestamp with time zone) AND (id > 'd44546d3-6718-4522-9e30-1bb8271f1d93'::uuid)))
|
||||
Rows Removed by Filter: 500
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=487
|
||||
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.073 ms
|
||||
Execution Time: 0.125 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=203.98..204.11 rows=51 width=153) (actual time=0.480..0.484 rows=51.00 loops=1)
|
||||
Buffers: shared hit=101
|
||||
-> Sort (cost=203.98..205.23 rows=501 width=153) (actual time=0.480..0.482 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.069..0.430 rows=500.00 loops=1)
|
||||
Filter: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::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.038 ms
|
||||
Execution Time: 0.489 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=158.64..158.76 rows=51 width=153) (actual time=0.418..0.421 rows=51.00 loops=1)
|
||||
Buffers: shared hit=101
|
||||
-> Sort (cost=158.64..159.89 rows=501 width=153) (actual time=0.417..0.419 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.92 rows=501 width=153) (actual time=0.062..0.369 rows=500.00 loops=1)
|
||||
Recheck Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid)
|
||||
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::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.015..0.015 rows=1000.00 loops=1)
|
||||
Index Cond: (chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::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.068 ms
|
||||
Execution Time: 0.431 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.005..0.049 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.005..0.047 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '62be041f-7108-4a7a-becb-28edcdfc01aa'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:23:26.481237+00'::timestamp with time zone, 'd44546d3-6718-4522-9e30-1bb8271f1d93'::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.045 ms
|
||||
Execution Time: 0.055 ms
|
||||
|
||||
### bg 100: first, после 0
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.122..0.126 rows=51.00 loops=1)
|
||||
Buffers: shared hit=65
|
||||
-> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.121..0.123 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=65
|
||||
-> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.017..0.108 rows=100.00 loops=1)
|
||||
Recheck Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid)
|
||||
Heap Blocks: exact=63
|
||||
Buffers: shared hit=65
|
||||
-> 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 = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::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.042 ms
|
||||
Execution Time: 0.138 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.28..21.53 rows=7 width=153) (actual time=0.016..0.059 rows=51.00 loops=1)
|
||||
Buffers: shared hit=45
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.80 rows=71 width=153) (actual time=0.015..0.057 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = $1)
|
||||
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)
|
||||
Planning Time: 0.003 ms
|
||||
Execution Time: 0.065 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=162.07..162.20 rows=51 width=153) (actual time=0.187..0.191 rows=51.00 loops=1)
|
||||
Buffers: shared hit=101
|
||||
-> Sort (cost=162.07..162.32 rows=100 width=153) (actual time=0.187..0.188 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.172 rows=100.00 loops=1)
|
||||
Filter: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::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.053 ms
|
||||
Execution Time: 0.198 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=115.42..115.55 rows=51 width=153) (actual time=0.113..0.118 rows=51.00 loops=1)
|
||||
Buffers: shared hit=65
|
||||
-> Sort (cost=115.42..115.67 rows=100 width=153) (actual time=0.113..0.115 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=65
|
||||
-> Bitmap Heap Scan on messages (cost=5.06..112.10 rows=100 width=153) (actual time=0.009..0.096 rows=100.00 loops=1)
|
||||
Recheck Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::uuid)
|
||||
Heap Blocks: exact=63
|
||||
Buffers: shared hit=65
|
||||
-> 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 = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::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.125 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.006..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.006..0.040 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = 'c29b11ae-9145-41f5-ad26-73f1c05430d8'::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.040 ms
|
||||
Execution Time: 0.049 ms
|
||||
|
||||
### bg 10: first, после 0
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.032..0.033 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.032..0.033 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.020..0.030 rows=10.00 loops=1)
|
||||
Recheck Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.004..0.004 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.047 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.28..21.53 rows=7 width=153) (actual time=0.013..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.28..215.80 rows=71 width=153) (actual time=0.012..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.003 ms
|
||||
Execution Time: 0.029 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=157.57..157.59 rows=10 width=153) (actual time=0.139..0.140 rows=10.00 loops=1)
|
||||
Buffers: shared hit=101
|
||||
-> Sort (cost=157.57..157.59 rows=10 width=153) (actual time=0.138..0.139 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.012..0.135 rows=10.00 loops=1)
|
||||
Filter: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.050 ms
|
||||
Execution Time: 0.146 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
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.008..0.020 rows=10.00 loops=1)
|
||||
Recheck Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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 = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.057 ms
|
||||
Execution Time: 0.033 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.004..0.010 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.004..0.010 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '6f3adfe6-1e3e-4065-a369-d2cd6e625865'::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.038 ms
|
||||
Execution Time: 0.015 ms
|
||||
@@ -0,0 +1,693 @@
|
||||
# План запроса истории: размер 5k
|
||||
|
||||
Commit 6ba74b1
|
||||
Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
|
||||
Страница — `limit` профиля; «после» — сколько сообщений чата до
|
||||
страницы.
|
||||
|
||||
## Планы приложения
|
||||
|
||||
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
|
||||
с которыми его выполнило приложение (prepared statement asyncpg).
|
||||
|
||||
### read 5k: first, после 0
|
||||
|
||||
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 ORDER BY messages.created_at, messages.id
|
||||
LIMIT $2::INTEGER
|
||||
Query Parameters: $1 = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6', $2 = '51'
|
||||
Limit (cost=0.29..11.48 rows=51 width=153) (actual time=0.045..0.114 rows=51.00 loops=1)
|
||||
Buffers: shared hit=25
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1097.45 rows=5000 width=153) (actual time=0.045..0.111 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::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.178 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 = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6', $2 = '2026-10-31 20:24:38.589912+00', $3 = '53146b82-aceb-4178-811a-86a646e422ce', $4 = '51'
|
||||
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.036..0.138 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.21 rows=45 width=153) (actual time=0.034..0.134 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 5k: last, после 4900
|
||||
|
||||
duration: 0.159 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 = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6', $2 = '2026-10-31 20:24:46.567187+00', $3 = '7bd2d45d-95d6-4adb-baaa-00598e6d08bc', $4 = '51'
|
||||
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.030..0.122 rows=51.00 loops=1)
|
||||
Buffers: shared hit=50
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.029..0.119 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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)
|
||||
|
||||
### bg 1k: first, после 0
|
||||
|
||||
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 ORDER BY messages.created_at, messages.id
|
||||
LIMIT $2::INTEGER
|
||||
Query Parameters: $1 = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3', $2 = '51'
|
||||
Limit (cost=0.29..39.26 rows=51 width=153) (actual time=0.021..0.082 rows=51.00 loops=1)
|
||||
Buffers: shared hit=42
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..764.58 rows=1000 width=153) (actual time=0.020..0.079 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=42
|
||||
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.128 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 = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3', $2 = '2026-10-31 20:24:38.568925+00', $3 = 'f4606134-1824-43bd-a240-3ea3b55a63ec', $4 = '51'
|
||||
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.017..0.095 rows=51.00 loops=1)
|
||||
Buffers: shared hit=46
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.016..0.092 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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: last, после 900
|
||||
|
||||
duration: 0.108 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 = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3', $2 = '2026-10-31 20:24:45.262628+00', $3 = '9f773982-da33-47e1-834f-64b654a77314', $4 = '51'
|
||||
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.013..0.085 rows=51.00 loops=1)
|
||||
Buffers: shared hit=50
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.012..0.081 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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)
|
||||
|
||||
### bg 100: first, после 0
|
||||
|
||||
duration: 0.172 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 = 'fb160065-34cc-4298-8362-ba055cc9499f', $2 = '51'
|
||||
Limit (cost=0.29..154.68 rows=51 width=153) (actual time=0.022..0.143 rows=51.00 loops=1)
|
||||
Buffers: shared hit=51
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..303.03 rows=100 width=153) (actual time=0.021..0.140 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::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)
|
||||
|
||||
### bg 10: first, после 0
|
||||
|
||||
duration: 0.052 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 = '3dcf3ed2-fde3-4c72-8da6-3d291584e568', $2 = '51'
|
||||
Limit (cost=37.81..37.83 rows=10 width=153) (actual time=0.047..0.048 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Sort (cost=37.81..37.83 rows=10 width=153) (actual time=0.047..0.047 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.64 rows=10 width=153) (actual time=0.021..0.042 rows=10.00 loops=1)
|
||||
Recheck Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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.009..0.009 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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.53 rows=51 width=153) (actual time=0.010..0.056 rows=51.00 loops=1)
|
||||
Buffers: shared hit=53
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..894.15 rows=2499 width=153) (actual time=0.010..0.053 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::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.063 ms
|
||||
Execution Time: 0.065 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.019..0.064 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.21 rows=45 width=153) (actual time=0.018..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.010 ms
|
||||
Execution Time: 0.077 ms
|
||||
|
||||
#### or-cursor
|
||||
|
||||
Limit (cost=0.29..22.67 rows=51 width=153) (actual time=0.322..0.374 rows=51.00 loops=1)
|
||||
Buffers: shared hit=2365
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1097.45 rows=2500 width=153) (actual time=0.322..0.371 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid)
|
||||
Filter: ((created_at > '2026-10-31 20:24:38.589912+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:24:38.589912+00'::timestamp with time zone) AND (id > '53146b82-aceb-4178-811a-86a646e422ce'::uuid)))
|
||||
Rows Removed by Filter: 2500
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=2365
|
||||
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.052 ms
|
||||
Execution Time: 0.380 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=453.61..453.73 rows=51 width=153) (actual time=2.113..2.117 rows=51.00 loops=1)
|
||||
Buffers: shared hit=184
|
||||
-> Sort (cost=453.61..459.85 rows=2499 width=153) (actual time=2.113..2.114 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 44kB
|
||||
Buffers: shared hit=184
|
||||
-> Seq Scan on messages (cost=0.00..370.24 rows=2499 width=153) (actual time=0.154..1.813 rows=2500.00 loops=1)
|
||||
Filter: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::uuid)))
|
||||
Rows Removed by Filter: 6000
|
||||
Buffers: shared hit=184
|
||||
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.038 ms
|
||||
Execution Time: 2.122 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=453.61..453.73 rows=51 width=153) (actual time=2.113..2.117 rows=51.00 loops=1)
|
||||
Buffers: shared hit=184
|
||||
-> Sort (cost=453.61..459.85 rows=2499 width=153) (actual time=2.113..2.115 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 44kB
|
||||
Buffers: shared hit=184
|
||||
-> Seq Scan on messages (cost=0.00..370.24 rows=2499 width=153) (actual time=0.180..1.802 rows=2500.00 loops=1)
|
||||
Filter: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::uuid)))
|
||||
Rows Removed by Filter: 6000
|
||||
Buffers: shared hit=184
|
||||
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.048 ms
|
||||
Execution Time: 2.124 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.006..0.046 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.006..0.043 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = 'e12c9819-0da8-4ba6-83cf-a8f7e1be48b6'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.589912+00'::timestamp with time zone, '53146b82-aceb-4178-811a-86a646e422ce'::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.041 ms
|
||||
Execution Time: 0.053 ms
|
||||
|
||||
### bg 1k: middle, после 500
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=0.29..74.03 rows=51 width=153) (actual time=0.011..0.053 rows=51.00 loops=1)
|
||||
Buffers: shared hit=46
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..724.74 rows=501 width=153) (actual time=0.011..0.050 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid)))
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=46
|
||||
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.072 ms
|
||||
Execution Time: 0.064 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.009..0.057 rows=51.00 loops=1)
|
||||
Buffers: shared hit=46
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.21 rows=45 width=153) (actual time=0.009..0.054 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
|
||||
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)
|
||||
Planning Time: 0.005 ms
|
||||
Execution Time: 0.064 ms
|
||||
|
||||
#### or-cursor
|
||||
|
||||
Limit (cost=0.29..78.09 rows=51 width=153) (actual time=0.073..0.109 rows=51.00 loops=1)
|
||||
Buffers: shared hit=498
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..764.59 rows=501 width=153) (actual time=0.073..0.107 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid)
|
||||
Filter: ((created_at > '2026-10-31 20:24:38.568925+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:24:38.568925+00'::timestamp with time zone) AND (id > 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid)))
|
||||
Rows Removed by Filter: 500
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=498
|
||||
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.049 ms
|
||||
Execution Time: 0.114 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=356.98..357.11 rows=51 width=153) (actual time=0.560..0.563 rows=51.00 loops=1)
|
||||
Buffers: shared hit=184
|
||||
-> Sort (cost=356.98..358.23 rows=501 width=153) (actual time=0.559..0.561 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 39kB
|
||||
Buffers: shared hit=184
|
||||
-> Seq Scan on messages (cost=0.00..340.26 rows=501 width=153) (actual time=0.127..0.499 rows=500.00 loops=1)
|
||||
Filter: ((chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid)))
|
||||
Rows Removed by Filter: 8000
|
||||
Buffers: shared hit=184
|
||||
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.040 ms
|
||||
Execution Time: 0.568 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=241.64..241.77 rows=51 width=153) (actual time=0.425..0.428 rows=51.00 loops=1)
|
||||
Buffers: shared hit=186
|
||||
-> Sort (cost=241.64..242.89 rows=501 width=153) (actual time=0.424..0.426 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: top-N heapsort Memory: 39kB
|
||||
Buffers: shared hit=186
|
||||
-> Bitmap Heap Scan on messages (cost=15.91..224.93 rows=501 width=153) (actual time=0.078..0.374 rows=500.00 loops=1)
|
||||
Recheck Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid)
|
||||
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::uuid))
|
||||
Rows Removed by Filter: 500
|
||||
Heap Blocks: exact=184
|
||||
Buffers: shared hit=186
|
||||
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.017..0.018 rows=1000.00 loops=1)
|
||||
Index Cond: (chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::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.047 ms
|
||||
Execution Time: 0.435 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..6.27 rows=51 width=153) (actual time=0.007..0.043 rows=51.00 loops=1)
|
||||
Buffers: shared hit=5
|
||||
-> Index Only Scan using bench_variant on messages (cost=0.41..57.94 rows=501 width=153) (actual time=0.006..0.041 rows=51.00 loops=1)
|
||||
Index Cond: ((chat_id = '296f4cbe-97a0-4dfe-a14b-2c3b1a4440a3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:24:38.568925+00'::timestamp with time zone, 'f4606134-1824-43bd-a240-3ea3b55a63ec'::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.066 ms
|
||||
Execution Time: 0.053 ms
|
||||
|
||||
### bg 100: first, после 0
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=0.29..154.68 rows=51 width=153) (actual time=0.007..0.055 rows=51.00 loops=1)
|
||||
Buffers: shared hit=51
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..303.03 rows=100 width=153) (actual time=0.007..0.052 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::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.040 ms
|
||||
Execution Time: 0.061 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..39.44 rows=14 width=153) (actual time=0.011..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.29..377.84 rows=135 width=153) (actual time=0.010..0.055 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = $1)
|
||||
Index Searches: 1
|
||||
Buffers: shared hit=51
|
||||
SubPlan 1
|
||||
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..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=295.07..295.20 rows=51 width=153) (actual time=0.264..0.267 rows=51.00 loops=1)
|
||||
Buffers: shared hit=184
|
||||
-> Sort (cost=295.07..295.32 rows=100 width=153) (actual time=0.263..0.265 rows=51.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 50kB
|
||||
Buffers: shared hit=184
|
||||
-> Seq Scan on messages (cost=0.00..291.75 rows=100 width=153) (actual time=0.007..0.248 rows=100.00 loops=1)
|
||||
Filter: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid)
|
||||
Rows Removed by Filter: 8400
|
||||
Buffers: shared hit=184
|
||||
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.038 ms
|
||||
Execution Time: 0.273 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=171.84..171.97 rows=51 width=153) (actual time=0.117..0.120 rows=51.00 loops=1)
|
||||
Buffers: shared hit=84
|
||||
-> Sort (cost=171.84..172.09 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=84
|
||||
-> Bitmap Heap Scan on messages (cost=5.06..168.52 rows=100 width=153) (actual time=0.014..0.102 rows=100.00 loops=1)
|
||||
Recheck Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::uuid)
|
||||
Heap Blocks: exact=82
|
||||
Buffers: shared hit=84
|
||||
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.005..0.005 rows=100.00 loops=1)
|
||||
Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::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.051 ms
|
||||
Execution Time: 0.129 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.041 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.039 rows=51.00 loops=1)
|
||||
Index Cond: (chat_id = 'fb160065-34cc-4298-8362-ba055cc9499f'::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.046 ms
|
||||
Execution Time: 0.048 ms
|
||||
|
||||
### bg 10: first, после 0
|
||||
|
||||
#### psql
|
||||
|
||||
Limit (cost=37.81..37.83 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Sort (cost=37.81..37.83 rows=10 width=153) (actual time=0.020..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..37.64 rows=10 width=153) (actual time=0.009..0.018 rows=10.00 loops=1)
|
||||
Recheck Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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.004..0.004 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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=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.030 ms
|
||||
|
||||
#### generic
|
||||
|
||||
Limit (cost=0.29..39.44 rows=14 width=153) (actual time=0.009..0.020 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..377.84 rows=135 width=153) (actual time=0.008..0.019 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.024 ms
|
||||
|
||||
#### no-index
|
||||
|
||||
Limit (cost=290.57..290.59 rows=10 width=153) (actual time=0.197..0.198 rows=10.00 loops=1)
|
||||
Buffers: shared hit=184
|
||||
-> Sort (cost=290.57..290.59 rows=10 width=153) (actual time=0.197..0.197 rows=10.00 loops=1)
|
||||
Sort Key: messages.created_at, messages.id
|
||||
Sort Method: quicksort Memory: 27kB
|
||||
Buffers: shared hit=184
|
||||
-> Seq Scan on messages (cost=0.00..290.40 rows=10 width=153) (actual time=0.009..0.194 rows=10.00 loops=1)
|
||||
Filter: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::uuid)
|
||||
Rows Removed by Filter: 8490
|
||||
Buffers: shared hit=184
|
||||
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.035 ms
|
||||
Execution Time: 0.202 ms
|
||||
|
||||
#### chat_only
|
||||
|
||||
Limit (cost=37.81..37.83 rows=10 width=153) (actual time=0.015..0.017 rows=10.00 loops=1)
|
||||
Buffers: shared hit=12
|
||||
-> Sort (cost=37.81..37.83 rows=10 width=153) (actual time=0.015..0.016 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.64 rows=10 width=153) (actual time=0.005..0.014 rows=10.00 loops=1)
|
||||
Recheck Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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.002..0.002 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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=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.022 ms
|
||||
|
||||
#### covering
|
||||
|
||||
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.013 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.005..0.012 rows=10.00 loops=1)
|
||||
Index Cond: (chat_id = '3dcf3ed2-fde3-4c72-8da6-3d291584e568'::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.037 ms
|
||||
Execution Time: 0.019 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,9.23,4500,0,487.5,0.0,57.744,133.952,180.042,316.055,1.001,127.6,120.3,0.105,,0.19,,
|
||||
5000,1,0,8500,17.276,8500,0,492.0,0.0,55.683,140.252,190.905,329.158,0.999,127.6,118.9,0.103,,0.192,,
|
||||
10000,1,0,13500,27.19,13500,0,496.5,0.0,56.805,132.984,180.953,321.418,0.999,127.6,118.4,0.099,,0.189,,
|
||||
|
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"label": "unit-of-work-after",
|
||||
"profile": "quick",
|
||||
"stage": "done",
|
||||
"size": 10000,
|
||||
"runs_done": 18,
|
||||
"runs_total": 18,
|
||||
"elapsed_s": 232,
|
||||
"eta_s": 0,
|
||||
"warnings": [],
|
||||
"updated_at": "2026-10-31T20:26:59+00:00"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0}]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":27189.677123},"metrics":{"checks":{"contains":"default","values":{"rate":1,"passes":13500,"fails":0},"type":"rate"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":132.95090414999999,"p(99)":180.93459874999996,"max":321.356791,"avg":64.31712892777783,"min":20.327334,"med":56.7864795,"p(50)":56.7864795}},"data_sent":{"contains":"data","values":{"count":5076000,"rate":186688.49861796133},"type":"counter"},"http_reqs":{"type":"counter","contains":"default","values":{"count":13500,"rate":496.5119644094716}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":2.576083,"avg":0.0055037169629627075,"min":0.000458,"med":0.001042,"p(50)":0.001042,"p(95)":0.002375,"p(99)":0.005167409999999995}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":56.8733955,"p(95)":133.03922534999995,"p(99)":181.01220666999998,"max":323.570584,"avg":64.4134922988887,"min":20.387792,"med":56.8733955}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"min":20.340084,"med":56.805354,"p(50)":56.805354,"p(95)":132.98426105,"p(99)":180.95251740999998,"max":321.418375,"avg":64.34017009659262}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":13500}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":132.98426105,"p(99)":180.95251740999998,"max":321.418375,"avg":64.34017009659262,"min":20.340084,"med":56.805354,"p(50)":56.805354}},"iterations":{"contains":"default","values":{"count":13500,"rate":496.5119644094716},"type":"counter"},"data_received":{"values":{"count":6615000,"rate":243290.86256064108},"type":"counter","contains":"data"},"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_connecting":{"type":"trend","contains":"time","values":{"max":0.512041,"avg":0.0003175462962962963,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_sending":{"contains":"time","values":{"med":0.004083,"p(50)":0.004083,"p(95)":0.011625,"p(99)":0.021750409999999994,"max":0.2695,"avg":0.00533743896296289,"min":0.001958},"type":"trend"},"http_req_receiving":{"contains":"time","values":{"avg":0.01770372985185193,"min":0.004542,"med":0.014834,"p(50)":0.014834,"p(95)":0.036375,"p(99)":0.05787957999999995,"max":0.286417},"type":"trend"}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":4500,"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":9230.194046},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"avg":65.52788921577809,"min":20.467334,"med":57.832688000000005,"p(50)":57.832688000000005,"p(95)":134.0061374999999,"p(99)":180.57026125,"max":316.115917}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.01831031444444449,"min":0.004625,"med":0.015167,"p(50)":0.015167,"p(95)":0.03746009999999999,"p(99)":0.06623856999999989,"max":0.218708}},"data_sent":{"type":"counter","contains":"data","values":{"count":1692000,"rate":183311.42244330668}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":4500},"type":"rate","contains":"default"},"checks":{"type":"rate","contains":"default","values":{"passes":4500,"fails":0,"rate":1}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000458,"med":0.001083,"p(50)":0.001083,"p(95)":0.002292,"p(99)":0.009836329999999987,"max":1.590208,"avg":0.006626726888888941}},"http_reqs":{"type":"counter","contains":"default","values":{"count":4500,"rate":487.5303788385816}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":180.04155000999998,"max":316.054709,"avg":65.45115012999989,"min":20.390417,"med":57.744104,"p(50)":57.744104,"p(95)":133.95184759999992},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"data_received":{"contains":"data","values":{"count":2205000,"rate":238889.885630905},"type":"counter"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":180.03003000999996,"max":316.027209,"avg":65.42744734155552,"min":20.366625,"med":57.7173125,"p(50)":57.7173125,"p(95)":133.93560479999994}},"iterations":{"values":{"count":4500,"rate":487.5303788385816},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":316.054709,"avg":65.45115012999989,"min":20.390417,"med":57.744104,"p(50)":57.744104,"p(95)":133.95184759999992,"p(99)":180.04155000999998}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.005392473999999991,"min":0.001958,"med":0.004125,"p(50)":0.004125,"p(95)":0.011627049999999991,"p(99)":0.022635839999999956,"max":0.213792}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.2775,"avg":0.000706129111111111}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"groups":[],"checks":[{"id":"6445aff337e1ade0bc10402fbac79882","passes":8500,"fails":0,"name":"message 201","path":"::message 201"}],"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":17276.269577},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":8500,"rate":492.0043625225726}},"checks":{"contains":"default","values":{"fails":0,"rate":1,"passes":8500},"type":"rate"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(95)":140.25182325,"p(99)":190.90460083999997,"max":329.158333,"avg":64.9178918292941,"min":20.328167,"med":55.682812,"p(50)":55.682812},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.004208,"p(95)":0.012458,"p(99)":0.022169339999999975,"max":0.222125,"avg":0.005572461999999937,"min":0.001958,"med":0.004208}},"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":241082.13763606056}},"http_reqs":{"type":"counter","contains":"default","values":{"count":8500,"rate":492.0043625225726}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":64.99221260482351,"min":20.377959,"med":55.745020499999995,"p(50)":55.745020499999995,"p(95)":140.32584759999992,"p(99)":191.55400717,"max":329.227875}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0004613432941176472,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.304958}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.015125,"p(95)":0.03920805,"p(99)":0.06613041999999997,"max":0.4165,"avg":0.018574271058823498,"min":0.004666,"med":0.015125}},"http_req_waiting":{"contains":"time","values":{"avg":64.89374509623538,"min":20.317042,"med":55.656687000000005,"p(50)":55.656687000000005,"p(95)":140.19741315,"p(99)":190.74523600999993,"max":329.125084},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":140.25182325,"p(99)":190.90460083999997,"max":329.158333,"avg":64.9178918292941,"min":20.328167,"med":55.682812,"p(50)":55.682812}},"http_req_tls_handshaking":{"values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend","contains":"time"},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":8500},"type":"rate","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0062924099999999965,"max":1.656083,"avg":0.0038655840000000486,"min":0.000458,"med":0.001083,"p(50)":0.001083,"p(95)":0.002417}},"data_sent":{"type":"counter","contains":"data","values":{"count":3196000,"rate":184993.6403084873}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2086},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2086,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.72196},"metrics":{"http_req_waiting":{"values":{"med":2.191375,"p(50)":2.191375,"p(95)":2.9072705,"p(99)":4.0882143499999986,"max":9.279417,"avg":2.2918886308724873,"min":1.833666},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":30370074,"rate":6071923.678060665}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.850375,"med":2.2183124999999997,"p(50)":2.2183124999999997,"p(95)":2.9552917499999998,"p(99)":4.161641099999998,"max":9.367167,"avg":2.321879934324063},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.02598910642377749,"min":0.0125,"med":0.021084,"p(50)":0.021084,"p(95)":0.050760499999999986,"p(99)":0.07584194999999999,"max":0.207167}},"iteration_duration":{"contains":"time","values":{"avg":2.3943000210930028,"min":1.904166,"med":2.284354,"p(50)":2.284354,"p(95)":3.051458,"p(99)":4.2998873999999985,"max":9.554875},"type":"trend"},"http_req_duration":{"values":{"p(50)":2.2183124999999997,"p(95)":2.9552917499999998,"p(99)":4.161641099999998,"max":9.367167,"avg":2.321879934324063,"min":1.850375,"med":2.2183124999999997},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":2086,"rate":417.056369122925}},"vus":{"contains":"default","values":{"min":1,"max":1,"value":1},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001042,"p(50)":0.001042,"p(95)":0.0021147499999999964,"p(99)":0.0033706499999999954,"max":0.475083,"avg":0.001471345158197501}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2086}},"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}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4172,"fails":0}},"iterations":{"type":"counter","contains":"default","values":{"count":2086,"rate":417.056369122925}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003125,"p(50)":0.003125,"p(95)":0.008739749999999998,"p(99)":0.01609374999999999,"max":0.105208,"avg":0.004002197027804413,"min":0.001792}},"data_sent":{"type":"counter","contains":"data","values":{"rate":174329.56229338265,"count":871948}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.132542,"avg":0.00006353883029721956,"min":0}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5014.13571},"metrics":{"vus_max":{"contains":"default","values":{"value":16,"min":16,"max":16},"type":"gauge"},"data_received":{"contains":"data","values":{"count":41347560,"rate":8246198.824961601},"type":"counter"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000917,"p(95)":0.001959,"p(99)":0.006992859999999997,"max":1.111084,"avg":0.006506575704225427,"min":0.000458,"med":0.000917}},"http_req_connecting":{"contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.152458,"avg":0.0005383654929577464,"min":0,"med":0,"p(50)":0},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.020193499999999993,"max":0.136458,"avg":0.003936164788732426,"min":0.00175,"med":0.0029795,"p(50)":0.0029795,"p(95)":0.007002049999999995}},"http_req_waiting":{"contains":"time","values":{"avg":28.115221237676,"min":15.035125,"med":26.0595,"p(50)":26.0595,"p(95)":54.028943749999875,"p(99)":63.81551138,"max":71.131333},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":26.158521,"p(95)":54.15496634999988,"p(99)":63.90134411,"max":71.214458,"avg":28.21871787852109,"min":15.122334,"med":26.158521}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"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":{"type":"trend","contains":"time","values":{"p(95)":54.076899349999884,"p(99)":63.838450879999996,"max":71.148292,"avg":28.142992576408407,"min":15.05825,"med":26.084145999999997,"p(50)":26.084145999999997}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2840,"rate":566.3987104170342}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2840}},"data_sent":{"type":"counter","contains":"data","values":{"count":1187120,"rate":236754.6609543203}},"http_req_receiving":{"contains":"time","values":{"avg":0.023835173943661924,"min":0.007292,"med":0.019917,"p(50)":0.019917,"p(95)":0.04596219999999999,"p(99)":0.07268486999999998,"max":0.288541},"type":"trend"},"iterations":{"type":"counter","contains":"default","values":{"count":2840,"rate":566.3987104170342}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5680,"fails":0}},"http_req_duration{expected_response:true}":{"values":{"min":15.05825,"med":26.084145999999997,"p(50)":26.084145999999997,"p(95)":54.076899349999884,"p(99)":63.838450879999996,"max":71.148292,"avg":28.142992576408407},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2840,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2840}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2983},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2983,"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":5002.517669},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.002958,"p(95)":0.008953899999999996,"p(99)":0.026916179999999998,"max":0.253167,"avg":0.00426409621186729,"min":0.0015,"med":0.002958}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":6.702080893395912,"min":3.969458,"med":6.08225,"p(50)":6.08225,"p(95)":8.935066899999999,"p(99)":16.723635499999997,"max":53.947708}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2983,"rate":596.2997429245062}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_receiving":{"values":{"min":0.007875,"med":0.019333,"p(50)":0.019333,"p(95)":0.05614519999999997,"p(99)":0.11041549999999987,"max":0.384875,"avg":0.025283911163258423},"type":"trend","contains":"time"},"vus":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":6.011625,"p(95)":8.843999400000001,"p(99)":16.63976,"max":53.866083,"avg":6.626327401944355,"min":3.891333,"med":6.011625}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":53.818875,"avg":6.596779394569224,"min":3.854417,"med":5.986875,"p(50)":5.986875,"p(95)":8.8187872,"p(99)":16.60168556}},"iterations":{"contains":"default","values":{"rate":596.2997429245062,"count":2983},"type":"counter"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2983}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":5966}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.185042,"avg":0.0002088783104257459,"min":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1246894,"rate":249253.29254244358}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":3.891333,"med":6.011625,"p(50)":6.011625,"p(95)":8.843999400000001,"p(99)":16.63976,"max":53.866083,"avg":6.626327401944355},"thresholds":{"max>=0":{"ok":true}}},"data_received":{"type":"counter","contains":"data","values":{"count":43429497,"rate":8681527.957237884}},"http_req_blocked":{"values":{"p(50)":0.000958,"p(95)":0.002375,"p(99)":0.00544249999999999,"max":0.661875,"avg":0.0021751350988937408,"min":0.0005,"med":0.000958},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2085,"fails":0},{"id":"736a4affc4111c8285c374c0b4d25aed","passes":2085,"fails":0,"name":"full page","path":"::full page"}],"name":"","path":""},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5000.077003},"metrics":{"http_req_duration":{"contains":"time","values":{"avg":2.3229551194244586,"min":1.826625,"med":2.221667,"p(50)":2.221667,"p(95)":2.9193663999999995,"p(99)":3.76187272,"max":12.807625},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":12.66075,"avg":2.2925789558752983,"min":1.808208,"med":2.195167,"p(50)":2.195167,"p(95)":2.869224799999999,"p(99)":3.70756556}},"http_req_connecting":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.108625,"avg":0.00005209832134292566,"min":0,"med":0},"type":"trend","contains":"time"},"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"},"http_reqs":{"contains":"default","values":{"rate":416.99357804870186,"count":2085},"type":"counter"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.008458,"p(99)":0.01597555999999997,"max":0.170542,"avg":0.004117697841726627,"min":0.001667,"med":0.003042,"p(50)":0.003042}},"http_req_failed":{"values":{"passes":0,"fails":2085,"rate":0},"type":"rate","contains":"default"},"http_req_duration{expected_response:true}":{"values":{"avg":2.3229551194244586,"min":1.826625,"med":2.221667,"p(50)":2.221667,"p(95)":2.9193663999999995,"p(99)":3.76187272,"max":12.807625},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":30355515,"rate":6071009.502811051}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":871530,"rate":174303.31562435738}},"iteration_duration":{"values":{"min":1.913542,"med":2.287791,"p(50)":2.287791,"p(95)":3.031616599999999,"p(99)":3.8599455599999994,"max":12.987709,"avg":2.3945366767386145},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.5135,"avg":0.001448032613908868,"min":0.000583,"med":0.001083,"p(50)":0.001083,"p(95)":0.002125,"p(99)":0.003256719999999999}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.011417,"med":0.021125,"p(50)":0.021125,"p(95)":0.05215039999999999,"p(99)":0.08475,"max":0.281167,"avg":0.026258465707434033}},"checks":{"values":{"rate":1,"passes":4170,"fails":0},"type":"rate","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":2085,"rate":416.99357804870186}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"state":{"testRunDurationMs":5018.430419,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":2852,"rate":568.3051794844463}},"data_sent":{"type":"counter","contains":"data","values":{"count":1192136,"rate":237551.56502449853}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":28.12566447230019,"min":16.95325,"med":26.077396,"p(50)":26.077396,"p(95)":56.367629349999895,"p(99)":66.91783258000001,"max":73.381458}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2852,"rate":568.3051794844463}},"http_req_connecting":{"contains":"time","values":{"avg":0.0009257682328190741,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.304208},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2852}},"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_sending":{"type":"trend","contains":"time","values":{"min":0.001625,"med":0.003,"p(50)":0.003,"p(95)":0.00779145,"p(99)":0.02495432999999999,"max":0.237583,"avg":0.004307600280504954}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":28.022048732117835,"min":16.826125,"med":25.980978999999998,"p(50)":25.980978999999998,"p(95)":56.280253499999894,"p(99)":66.83168742,"max":73.272792}},"http_req_duration":{"type":"trend","contains":"time","values":{"med":26.010729,"p(50)":26.010729,"p(95)":56.300268749999894,"p(99)":66.85538125,"max":73.324083,"avg":28.0510954386395,"min":16.879125}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.975709,"avg":0.005406860098176765,"min":0.000458,"med":0.000958,"p(50)":0.000958,"p(95)":0.002,"p(99)":0.0063485799999999865}},"http_req_receiving":{"values":{"min":0.007041,"med":0.02,"p(50)":0.02,"p(95)":0.047893899999999996,"p(99)":0.09100307999999996,"max":0.561416,"avg":0.024739106241234207},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"min":16.879125,"med":26.010729,"p(50)":26.010729,"p(95)":56.300268749999894,"p(99)":66.85538125,"max":73.324083,"avg":28.0510954386395},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5704,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":41522268,"rate":8273955.108114053}}},"root_group":{"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2852,"fails":0,"name":"status 200","path":"::status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2852,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}}
|
||||
@@ -0,0 +1 @@
|
||||
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5003.220211},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.397552297445833,"min":5.097625,"med":6.076208,"p(50)":6.076208,"p(95)":7.626383599999999,"p(99)":10.917583359999998,"max":47.5205},"thresholds":{"max>=0":{"ok":true}}},"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}},"checks":{"type":"rate","contains":"default","values":{"passes":6186,"fails":0,"rate":1}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":3093,"rate":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":6.465945855480103,"min":5.163167,"med":6.139125,"p(50)":6.139125,"p(95)":7.729182799999999,"p(99)":10.984212719999999,"max":47.581042}},"http_req_waiting":{"contains":"time","values":{"p(50)":6.046542,"p(95)":7.554659,"p(99)":10.888967,"max":47.498417,"avg":6.369435519236985,"min":5.080042,"med":6.046542},"type":"trend"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000958,"p(95)":0.0019164,"p(99)":0.004336359999999999,"max":1.087917,"avg":0.002571816359521525,"min":0.000542,"med":0.000958}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.10333463999999995,"max":0.616375,"avg":0.024096509537665685,"min":0.008959,"med":0.018792,"p(50)":0.018792,"p(95)":0.0478918}},"data_received":{"type":"counter","contains":"data","values":{"count":45030987,"rate":9000400.7620923}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":5.097625,"med":6.076208,"p(50)":6.076208,"p(95)":7.626383599999999,"p(99)":10.917583359999998,"max":47.5205,"avg":6.397552297445833}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"http_reqs":{"contains":"default","values":{"count":3093,"rate":618.2018519192458},"type":"counter"},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.167625,"avg":0.00014540898803750403,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_sending":{"contains":"time","values":{"max":0.275667,"avg":0.00402026867119305,"min":0.001625,"med":0.002834,"p(50)":0.002834,"p(95)":0.006691799999999977,"p(99)":0.024066639999999976},"type":"trend"},"data_sent":{"values":{"count":1292874,"rate":258408.37410224474},"type":"counter","contains":"data"},"iterations":{"values":{"count":3093,"rate":618.2018519192458},"type":"counter","contains":"default"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3093,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3093,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2156,"fails":0,"name":"status 200"},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2156,"fails":0,"name":"full page"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5000.565627},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"max":8.11375,"avg":2.2451795909090912,"min":1.90625,"med":2.162292,"p(50)":2.162292,"p(95)":2.79482325,"p(99)":3.4564038}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001,"p(50)":0.001,"p(95)":0.00208325,"p(99)":0.0030893999999999943,"max":0.563417,"avg":0.0015144369202226323}},"iterations":{"type":"counter","contains":"default","values":{"count":2156,"rate":431.15122584511573}},"data_sent":{"type":"counter","contains":"data","values":{"count":901208,"rate":180221.2124032584}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.3158437773654907,"min":1.962291,"med":2.2246045,"p(50)":2.2246045,"p(95)":2.889312749999999,"p(99)":3.5605213499999997,"max":8.911458}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.216082878014835,"min":1.887833,"med":2.1367295,"p(50)":2.1367295,"p(95)":2.75439625,"p(99)":3.40082295,"max":7.9775}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":2156,"rate":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"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}},"checks":{"values":{"rate":1,"passes":4312,"fails":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0038737115027829374,"min":0.001666,"med":0.002917,"p(50)":0.002917,"p(95)":0.00820825,"p(99)":0.01493545,"max":0.117708}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.122125,"avg":0.00005664424860853432,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"med":2.162292,"p(50)":2.162292,"p(95)":2.79482325,"p(99)":3.4564038,"max":8.11375,"avg":2.2451795909090912,"min":1.90625},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.020792,"p(50)":0.020792,"p(95)":0.049551999999999985,"p(99)":0.0760148,"max":0.12775,"avg":0.025223001391465615,"min":0.013542}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2156,"rate":431.15122584511573}},"data_received":{"values":{"count":31389204,"rate":6277130.69707904},"type":"counter","contains":"data"}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5035.103336},"metrics":{"http_req_waiting":{"type":"trend","contains":"time","values":{"max":78.18825,"avg":28.180085395782136,"min":16.226583,"med":25.414583,"p(50)":25.414583,"p(95)":56.1267418,"p(99)":67.85688144}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":5690}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":2845},"type":"rate","contains":"default"},"iterations":{"type":"counter","contains":"default","values":{"count":2845,"rate":565.0330907131158}},"vus_max":{"contains":"default","values":{"value":16,"min":16,"max":16},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.92075,"avg":0.004690142355008824,"min":0.0005,"med":0.000958,"p(50)":0.000958,"p(95)":0.002208,"p(99)":0.007660479999999986}},"http_reqs":{"type":"counter","contains":"default","values":{"count":2845,"rate":565.0330907131158}},"http_req_sending":{"contains":"time","values":{"med":0.002958,"p(50)":0.002958,"p(95)":0.008366599999999995,"p(99)":0.01664995999999999,"max":0.175458,"avg":0.0038856653778559223,"min":0.00175},"type":"trend"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":28.208660703339174,"min":16.322708,"med":25.437167,"p(50)":25.437167,"p(95)":56.142933199999995,"p(99)":67.89432151999999,"max":78.228167}},"data_received":{"values":{"rate":8226316.767692253,"count":41420355},"type":"counter","contains":"data"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":25.51725,"p(95)":56.207683599999996,"p(99)":67.95575996,"max":78.312875,"avg":28.284825590861136,"min":16.723875,"med":25.51725}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":28.208660703339174,"min":16.322708,"med":25.437167,"p(50)":25.437167,"p(95)":56.142933199999995,"p(99)":67.89432151999999,"max":78.228167},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.006833,"med":0.019667,"p(50)":0.019667,"p(95)":0.051774399999999984,"p(99)":0.08984495999999999,"max":0.357333,"avg":0.024689642179261877}},"data_sent":{"values":{"count":1189210,"rate":236183.83191808243},"type":"counter","contains":"data"},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_connecting":{"contains":"time","values":{"avg":0.0006472467486818981,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.281334},"type":"trend"},"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"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2845,"fails":0,"name":"status 200","path":"::status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2845,"fails":0}]}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":3078,"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3078,"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":5004.400363},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":3078,"rate":615.0587036874931}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(99)":13.77936809,"max":54.117625,"avg":6.425303464912284,"min":4.929417,"med":5.9691875,"p(50)":5.9691875,"p(95)":7.597579549999999}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":6156}},"iterations":{"type":"counter","contains":"default","values":{"rate":615.0587036874931,"count":3078}},"http_req_blocked":{"contains":"time","values":{"med":0.000959,"p(50)":0.000959,"p(95)":0.002125,"p(99)":0.004977859999999998,"max":0.902416,"avg":0.0024011884340480972,"min":0.000541},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"max":54.183167,"avg":6.498326862897976,"min":4.997208,"med":6.033062,"p(50)":6.033062,"p(95)":7.70628935,"p(99)":13.84396607}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"data_sent":{"type":"counter","contains":"data","values":{"count":1286604,"rate":257094.53814137212}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.158709,"avg":0.0001494077322936972,"min":0}},"data_received":{"type":"counter","contains":"data","values":{"rate":8954639.666986212,"count":44812602}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.008833,"p(99)":0.022483589999999977,"max":0.202958,"avg":0.004289829434697895,"min":0.001708,"med":0.003041,"p(50)":0.003041}},"http_req_waiting":{"contains":"time","values":{"avg":6.396198562053303,"min":4.851,"med":5.941,"p(50)":5.941,"p(95)":7.5647839999999995,"p(99)":13.75739716,"max":53.874416},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3078}},"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_duration":{"contains":"time","values":{"med":5.9691875,"p(50)":5.9691875,"p(95)":7.597579549999999,"p(99)":13.77936809,"max":54.117625,"avg":6.425303464912284,"min":4.929417},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.019146,"p(95)":0.05121429999999999,"p(99)":0.11929838999999991,"max":0.551,"avg":0.024815073424301524,"min":0.008917,"med":0.019146}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"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":2643.077585},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":378.34682026558824}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0056532489999999965,"min":0.002333,"med":0.004458,"p(50)":0.004458,"p(95)":0.01226039999999999,"p(99)":0.026044489999999997,"max":0.105583}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.0025020499999999983,"p(99)":0.006804079999999989,"max":0.49875,"avg":0.002227167999999992,"min":0.000666,"med":0.001167,"p(50)":0.001167}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_receiving":{"values":{"med":0.015708,"p(50)":0.015708,"p(95)":0.03953749999999997,"p(99)":0.058047319999999916,"max":0.199708,"avg":0.019952871999999976,"min":0.010125},"type":"trend","contains":"time"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.6393210610000035,"min":2.064792,"med":2.4705000000000004,"p(50)":2.4705000000000004,"p(95)":3.5712211499999995,"p(99)":5.043757739999998,"max":11.916209}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":2.411979,"p(95)":3.4531020999999984,"p(99)":4.907222169999998,"max":11.742167,"avg":2.572333423999999,"min":2.027541,"med":2.411979},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":2.027541,"med":2.411979,"p(50)":2.411979,"p(95)":3.4531020999999984,"p(99)":4.907222169999998,"max":11.742167,"avg":2.572333423999999}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.00010104200000000001,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.101042}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":4.795540749999998,"max":11.651167,"avg":2.546727302999998,"min":2.01325,"med":2.3918125,"p(50)":2.3918125,"p(95)":3.4034683999999973}},"data_received":{"values":{"count":490000,"rate":185389.94193013824},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"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}},"data_sent":{"values":{"count":376000,"rate":142258.40441986118},"type":"counter","contains":"data"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":378.34682026558824}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1942.546918},"metrics":{"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":29.177208999999998,"p(95)":44.99443155,"p(99)":66.266635,"max":69.522209,"avg":30.933831306999984,"min":16.585,"med":29.177208999999998},"thresholds":{"max>=0":{"ok":true}}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.675125,"avg":0.00930603200000007,"min":0.000542,"med":0.001042,"p(50)":0.001042,"p(95)":0.00266605,"p(99)":0.47226273999999996}},"data_sent":{"values":{"rate":193560.31842315584,"count":376000},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_waiting":{"contains":"time","values":{"max":69.50175,"avg":30.90990272299997,"min":16.567834,"med":29.140916500000003,"p(50)":29.140916500000003,"p(95)":44.94767115,"p(99)":66.25622008},"type":"trend"},"checks":{"contains":"default","values":{"passes":1000,"fails":0,"rate":1},"type":"rate"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":514.7880809126485}},"http_req_duration":{"type":"trend","contains":"time","values":{"med":29.177208999999998,"p(50)":29.177208999999998,"p(95)":44.99443155,"p(99)":66.266635,"max":69.522209,"avg":30.933831306999984,"min":16.585}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.002125,"med":0.004166,"p(50)":0.004166,"p(95)":0.01318989999999998,"p(99)":0.033897919999999984,"max":0.077958,"avg":0.005824462999999999}},"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"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":29.2556875,"p(95)":45.08806249999999,"p(99)":66.31149042,"max":69.577375,"avg":31.010193856999972,"min":16.648083,"med":29.2556875}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":252246.15964719778}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.06004324,"max":0.130583,"avg":0.018104120999999994,"min":0.005208,"med":0.015,"p(50)":0.015,"p(95)":0.038917}},"vus_max":{"contains":"default","values":{"value":16,"min":16,"max":16},"type":"gauge"},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.002146791,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.09646032999999997,"max":0.28325}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":514.7880809126485}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}]}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":1831.542918,"isStdOutTTY":false},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":7.2328762560000035,"min":5.266708,"med":6.698792,"p(50)":6.698792,"p(95)":9.66762565,"p(99)":12.738756249999998,"max":49.462291}},"http_req_receiving":{"contains":"time","values":{"p(95)":0.031879199999999996,"p(99)":0.04800417,"max":0.130625,"avg":0.015755112999999953,"min":0.005291,"med":0.0129795,"p(50)":0.0129795},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.231875,"avg":0.0007268760000000001}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003792,"p(50)":0.003792,"p(95)":0.011719399999999991,"p(99)":0.02202165999999998,"max":0.174125,"avg":0.005365873999999993,"min":0.002041}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":1000,"rate":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":6.717771,"p(95)":9.69400175,"p(99)":12.86709958,"max":49.481458,"avg":7.253997242999997,"min":5.287458,"med":6.717771},"thresholds":{"max>=0":{"ok":true}}},"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"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":205291.39465133735}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":545.9877517322802,"count":1000}},"vus":{"values":{"value":4,"min":4,"max":4},"type":"gauge","contains":"default"},"iterations":{"contains":"default","values":{"count":1000,"rate":545.9877517322802},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":9.77271105,"p(99)":12.9788945,"max":49.529667,"avg":7.318827585000002,"min":5.344792,"med":6.7809375,"p(50)":6.7809375}},"http_req_blocked":{"values":{"max":0.882875,"avg":0.004234382999999999,"min":0.000541,"med":0.001,"p(50)":0.001,"p(95)":0.002208,"p(99)":0.005867739999999969},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":267533.9983488173}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":9.69400175,"p(99)":12.86709958,"max":49.481458,"avg":7.253997242999997,"min":5.287458,"med":6.717771,"p(50)":6.717771}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2661.00346},"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"checks":{"values":{"passes":1000,"fails":0,"rate":1},"type":"rate","contains":"default"},"http_req_receiving":{"values":{"p(95)":0.03889794999999998,"p(99)":0.06935382999999999,"max":0.256166,"avg":0.019682251999999963,"min":0.009875,"med":0.015542,"p(50)":0.015542},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":375.79808332906117}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.656671208999997,"min":2.071333,"med":2.4682295,"p(50)":2.4682295,"p(95)":3.7350922999999985,"p(99)":5.372018089999999,"max":14.197083}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":2.5885219269999986,"min":2.031625,"med":2.4043545,"p(50)":2.4043545,"p(95)":3.635204149999999,"p(99)":5.176087170000001,"max":13.957458},"thresholds":{"max>=0":{"ok":true}}},"http_req_sending":{"values":{"avg":0.005729933000000003,"min":0.002417,"med":0.004375,"p(50)":0.004375,"p(95)":0.013178499999999989,"p(99)":0.019751249999999998,"max":0.116708},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":375.79808332906117}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":184141.06083123997}},"http_req_duration":{"values":{"avg":2.5885219269999986,"min":2.031625,"med":2.4043545,"p(50)":2.4043545,"p(95)":3.635204149999999,"p(99)":5.176087170000001,"max":13.957458},"type":"trend","contains":"time"},"vus":{"contains":"default","values":{"value":1,"min":1,"max":1},"type":"gauge"},"http_req_blocked":{"values":{"min":0.000583,"med":0.00125,"p(50)":0.00125,"p(95)":0.002542,"p(99)":0.004085239999999999,"max":0.554167,"avg":0.001959872999999992},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000103459,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.103459}},"http_req_tls_handshaking":{"values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":141300.079331727}},"http_req_waiting":{"contains":"time","values":{"min":2.01575,"med":2.3839375,"p(50)":2.3839375,"p(95)":3.5983169499999996,"p(99)":5.064193749999999,"max":13.862458,"avg":2.563109741999997},"type":"trend"}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":""}}
|
||||
@@ -0,0 +1 @@
|
||||
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1930.910043},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"rate":517.8905167670724,"count":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"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}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":517.8905167670724}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.001958,"med":0.004083,"p(50)":0.004083,"p(95)":0.011342299999999993,"p(99)":0.12596949999999996,"max":0.171541,"avg":0.007393258000000007}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.014895499999999999,"p(95)":0.03519104999999998,"p(99)":0.05456782999999998,"max":0.213625,"avg":0.01763274299999998,"min":0.004875,"med":0.014895499999999999}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":30.737733305999967,"min":15.189584,"med":28.6821665,"p(50)":28.6821665,"p(95)":42.57651814999986,"p(99)":77.09808316,"max":83.811666},"thresholds":{"max>=0":{"ok":true}}},"http_req_waiting":{"values":{"p(50)":28.648249999999997,"p(95)":42.556616699999864,"p(99)":77.0708125,"max":83.786417,"avg":30.71270730499999,"min":15.17675,"med":28.648249999999997},"type":"trend","contains":"time"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":30.814248803000044,"min":15.230875,"med":28.7347705,"p(50)":28.7347705,"p(95)":42.64126669999986,"p(99)":77.17800176,"max":83.879542}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.48780908,"max":0.7415,"avg":0.009609650000000065,"min":0.0005,"med":0.0010205000000000001,"p(50)":0.0010205000000000001,"p(95)":0.002083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_duration":{"contains":"time","values":{"med":28.6821665,"p(50)":28.6821665,"p(95)":42.57651814999986,"p(99)":77.09808316,"max":83.811666,"avg":30.737733305999967,"min":15.189584},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0.10751333999999999,"max":0.243708,"avg":0.002241374,"min":0}},"data_sent":{"contains":"data","values":{"count":376000,"rate":194726.83430441923},"type":"counter"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":253766.3532158655}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":"","path":""},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1709.027945},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":286712.6903533458}},"http_req_duration{expected_response:true}":{"values":{"avg":6.770621169000005,"min":5.475667,"med":6.512625,"p(50)":6.512625,"p(95)":7.790464249999999,"p(99)":10.00905625,"max":45.321083},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"http_req_sending":{"contains":"time","values":{"med":0.003625,"p(50)":0.003625,"p(95)":0.011338149999999996,"p(99)":0.04666540999999996,"max":0.284292,"avg":0.005943480999999996,"min":0.002},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.120667,"avg":0.00038991699999999993,"min":0}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":585.1279394966242}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":45.298583,"avg":6.749173715000003,"min":5.41775,"med":6.4963545,"p(50)":6.4963545,"p(95)":7.749725,"p(99)":9.82830842}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":10.00905625,"max":45.321083,"avg":6.770621169000005,"min":5.475667,"med":6.512625,"p(50)":6.512625,"p(95)":7.790464249999999}},"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}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":220008.10525073067}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.309875,"avg":0.015503972999999982,"min":0.004,"med":0.0113125,"p(50)":0.0113125,"p(95)":0.03683924999999999,"p(99)":0.05962523999999985}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":585.1279394966242}},"http_req_blocked":{"values":{"min":0.000458,"med":0.000958,"p(50)":0.000958,"p(95)":0.002083,"p(99)":0.003543249999999999,"max":0.477708,"avg":0.002691585999999997},"type":"trend","contains":"time"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":6.569520499999999,"p(95)":7.870337500000001,"p(99)":10.6346695,"max":45.38875,"avg":6.831152906999999,"min":5.592042,"med":6.569520499999999}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}}}}
|
||||
@@ -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":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2499.285543},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_reqs":{"contains":"default","values":{"count":1000,"rate":400.11434579806235},"type":"counter"},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.002291,"med":0.004,"p(50)":0.004,"p(95)":0.010964249999999995,"p(99)":0.01781683999999998,"max":0.11,"avg":0.005324662999999993}},"http_req_duration{expected_response:true}":{"values":{"avg":2.4352147959999995,"min":1.98325,"med":2.3347085,"p(50)":2.3347085,"p(95)":3.11337145,"p(99)":4.17272625,"max":6.670042},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"http_req_waiting":{"contains":"time","values":{"avg":2.4127738830000007,"min":1.968166,"med":2.3126670000000003,"p(50)":2.3126670000000003,"p(95)":3.0806872,"p(99)":4.128559159999999,"max":6.61125},"type":"trend"},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":1000},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":2.4352147959999995,"min":1.98325,"med":2.3347085,"p(50)":2.3347085,"p(95)":3.11337145,"p(99)":4.17272625,"max":6.670042}},"data_received":{"values":{"count":490000,"rate":196056.02944105054},"type":"counter","contains":"data"},"http_req_connecting":{"contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.0935,"avg":0.0000935,"min":0,"med":0,"p(50)":0},"type":"trend"},"http_req_receiving":{"values":{"avg":0.017116249999999986,"min":0.008333,"med":0.0141875,"p(50)":0.0141875,"p(95)":0.031463149999999995,"p(99)":0.04759966999999998,"max":0.187875},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":150442.99402007143}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001083,"p(95)":0.002083,"p(99)":0.003003329999999997,"max":0.434208,"avg":0.0016854299999999884,"min":0.000666,"med":0.001083}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":2.023958,"med":2.3845625000000004,"p(50)":2.3845625000000004,"p(95)":3.2080475999999996,"p(99)":4.29520518,"max":6.82275,"avg":2.495532967}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":400.11434579806235}},"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"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201","path":"::message 201"}]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1897.544709},"metrics":{"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.1448462499999996,"max":0.352917,"avg":0.003329376}},"data_sent":{"contains":"data","values":{"count":376000,"rate":198150.79888059702},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":30.26871481799999,"min":19.6535,"med":27.856458500000002,"p(50)":27.856458500000002,"p(95)":45.03120204999995,"p(99)":75.91491291999999,"max":82.534042}},"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}},"data_received":{"values":{"count":490000,"rate":258228.43471141634},"type":"counter","contains":"data"},"vus":{"type":"gauge","contains":"default","values":{"min":16,"max":16,"value":16}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":74.63274267,"max":81.487583,"avg":30.18790630100003,"min":19.599666,"med":27.809854,"p(50)":27.809854,"p(95)":44.95925354999995}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.004042,"p(95)":0.011377099999999998,"p(99)":0.028280839999999974,"max":0.070708,"avg":0.00536654,"min":0.002042,"med":0.004042}},"iterations":{"contains":"default","values":{"count":1000,"rate":526.9968055335028},"type":"counter"},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":1000,"rate":0,"passes":0}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1.097834,"avg":0.014326870000000038,"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002166,"p(99)":0.7119654199999991}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":526.9968055335028}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.03534229999999999,"p(99)":0.05893224999999999,"max":0.172084,"avg":0.017506172000000018,"min":0.005125,"med":0.014646,"p(50)":0.014646}},"http_req_waiting":{"contains":"time","values":{"p(99)":74.61307366999999,"max":81.451958,"avg":30.165033588999982,"min":19.587792,"med":27.791542,"p(50)":27.791542,"p(95)":44.93727319999995},"type":"trend"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":81.487583,"avg":30.18790630100003,"min":19.599666,"med":27.809854,"p(50)":27.809854,"p(95)":44.95925354999995,"p(99)":74.63274267},"thresholds":{"max>=0":{"ok":true}}}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"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":1766.698918},"metrics":{"http_req_sending":{"contains":"time","values":{"p(95)":0.012675349999999991,"p(99)":0.04755857999999991,"max":0.208125,"avg":0.006234194999999996,"min":0.002167,"med":0.0039165,"p(50)":0.0039165},"type":"trend"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":6.966763175999989,"min":4.326375,"med":6.513937,"p(50)":6.513937,"p(95)":9.2097333,"p(99)":13.635809999999998,"max":47.0805}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.004625,"med":0.0120625,"p(50)":0.0120625,"p(95)":0.04082324999999998,"p(99)":0.06288857999999996,"max":0.356125,"avg":0.016932802999999958}},"data_sent":{"values":{"count":376000,"rate":212826.30343468633},"type":"counter","contains":"data"},"http_req_duration":{"type":"trend","contains":"time","values":{"min":4.342417,"med":6.5357085,"p(50)":6.5357085,"p(95)":9.23373155,"p(99)":13.664201499999997,"max":47.109792,"avg":6.989930173999996}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_failed":{"values":{"fails":1000,"rate":0,"passes":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":566.0274027518253}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.7775,"avg":0.004280834000000003,"min":0.0005,"med":0.001,"p(50)":0.001,"p(95)":0.002461049999999998,"p(99)":0.006379579999999996}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.148917,"avg":0.000513833,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":4.732208,"med":6.593146,"p(50)":6.593146,"p(95)":9.385426449999999,"p(99)":13.729791079999998,"max":47.198834,"avg":7.057867474000005}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":566.0274027518253}},"checks":{"type":"rate","contains":"default","values":{"passes":1000,"fails":0,"rate":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":9.23373155,"p(99)":13.664201499999997,"max":47.109792,"avg":6.989930173999996,"min":4.342417,"med":6.5357085,"p(50)":6.5357085},"thresholds":{"max>=0":{"ok":true}}},"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}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":277353.4273483944}}}}
|
||||
@@ -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,2085,0,417.0,0.0,2.222,2.919,3.762,12.808,0.755,127.6,127.6,127.6,118.7,4500,4500,0.1,,0,0.125,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
2,read,1000,4,1,5.003,3093,0,618.2,0.0,6.076,7.626,10.918,47.52,0.993,127.6,127.6,127.6,118.4,4500,4500,0.132,,0,0.172,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
3,read,1000,16,1,5.018,2852,0,568.3,0.0,26.011,56.3,66.855,73.324,1.004,127.6,127.6,127.7,116.7,4500,4500,0.133,,0,0.168,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
4,write,1000,1,1,2.661,1000,0,375.8,0.0,2.404,3.635,5.176,13.957,0.755,127.6,127.6,127.6,118.6,4600,5600,0.091,,0,0.134,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
5,write,1000,4,1,1.709,1000,0,585.1,0.0,6.513,7.79,10.009,45.321,0.984,127.6,127.6,127.6,112.0,5700,6700,0.117,,0,0.179,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
6,write,1000,16,1,1.931,1000,0,517.9,0.0,28.682,42.577,77.098,83.812,1.012,127.6,127.6,127.7,117.0,6800,7800,0.124,,0,0.203,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
7,read,5000,1,1,5.001,2156,0,431.2,0.0,2.162,2.795,3.456,8.114,0.755,127.7,127.7,127.7,118.9,8500,8500,0.102,,0,0.124,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
8,read,5000,4,1,5.004,3078,0,615.1,0.0,5.969,7.598,13.779,54.118,0.992,127.7,127.7,127.7,117.2,8500,8500,0.138,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
9,read,5000,16,1,5.035,2845,0,565.0,0.0,25.437,56.143,67.894,78.228,1.003,127.7,127.7,127.7,118.6,8500,8500,0.176,,0,0.17,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
10,write,5000,1,1,2.499,1000,0,400.1,0.0,2.335,3.113,4.173,6.67,0.757,127.7,127.7,127.7,117.0,8600,9600,0.118,,0,0.135,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
11,write,5000,4,1,1.767,1000,0,566.0,0.0,6.536,9.234,13.664,47.11,0.982,127.7,127.7,127.7,118.9,9700,10700,0.123,,0,0.205,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
12,write,5000,16,1,1.898,1000,0,527.0,0.0,27.81,44.959,74.633,81.488,1.013,127.7,127.7,127.7,118.0,10800,11800,0.133,,0,0.195,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
13,read,10000,1,1,5.002,2086,0,417.1,0.0,2.218,2.955,4.162,9.367,0.753,127.7,127.7,127.7,118.7,13500,13500,0.103,,0,0.124,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
14,read,10000,4,1,5.003,2983,0,596.3,0.0,6.012,8.844,16.64,53.866,0.994,127.7,127.7,127.7,116.9,13500,13500,0.138,,0,0.183,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
15,read,10000,16,1,5.014,2840,0,566.4,0.0,26.084,54.077,63.838,71.148,1.003,127.7,127.7,127.8,117.2,13500,13500,0.134,,0,0.167,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
16,write,10000,1,1,2.643,1000,0,378.3,0.0,2.412,3.453,4.907,11.742,0.748,127.7,127.7,127.7,118.0,13600,14600,0.088,,0,0.127,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
17,write,10000,4,1,1.832,1000,0,546.0,0.0,6.718,9.694,12.867,49.481,1.003,127.7,127.7,127.7,116.7,14700,15700,0.119,,0,0.193,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
18,write,10000,16,1,1.943,1000,0,514.8,0.0,29.177,44.994,66.267,69.522,1.01,127.7,127.7,127.7,118.3,15800,16800,0.132,,0,0.219,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||
|
@@ -0,0 +1,167 @@
|
||||
# Нагрузочный замер: метка `unit-of-work-after`
|
||||
|
||||
- Статус: **complete**
|
||||
- Commit: `6ba74b1`
|
||||
- Профиль `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 | 417 | 2.22 | 2.92 | 3.76 | 12.8 | 0.76 | 0.12 | 127.6 | 4500 | — |
|
||||
| 1k | 4 | 618 | 6.08 | 7.63 | 10.92 | 47.5 | 0.99 | 0.17 | 127.6 | 4500 | — |
|
||||
| 1k | 16 | 568 | 26.01 | 56.30 | 66.86 | 73.3 | 1.00 | 0.17 | 127.6 | 4500 | — |
|
||||
| 5k | 1 | 431 | 2.16 | 2.79 | 3.46 | 8.1 | 0.76 | 0.12 | 127.7 | 8500 | — |
|
||||
| 5k | 4 | 615 | 5.97 | 7.60 | 13.78 | 54.1 | 0.99 | 0.18 | 127.7 | 8500 | — |
|
||||
| 5k | 16 | 565 | 25.44 | 56.14 | 67.89 | 78.2 | 1.00 | 0.17 | 127.7 | 8500 | — |
|
||||
| 10k | 1 | 417 | 2.22 | 2.96 | 4.16 | 9.4 | 0.75 | 0.12 | 127.7 | 13500 | — |
|
||||
| 10k | 4 | 596 | 6.01 | 8.84 | 16.64 | 53.9 | 0.99 | 0.18 | 127.7 | 13500 | — |
|
||||
| 10k | 16 | 566 | 26.08 | 54.08 | 63.84 | 71.1 | 1.00 | 0.17 | 127.7 | 13500 | — |
|
||||
|
||||
## Сценарий `write`
|
||||
|
||||
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 1k | 1 | 376 | 2.40 | 3.63 | 5.18 | 14.0 | 0.76 | 0.13 | 127.6 | 4600 | — |
|
||||
| 1k | 4 | 585 | 6.51 | 7.79 | 10.01 | 45.3 | 0.98 | 0.18 | 127.6 | 5700 | — |
|
||||
| 1k | 16 | 518 | 28.68 | 42.58 | 77.10 | 83.8 | 1.01 | 0.20 | 127.6 | 6800 | — |
|
||||
| 5k | 1 | 400 | 2.33 | 3.11 | 4.17 | 6.7 | 0.76 | 0.14 | 127.7 | 8600 | — |
|
||||
| 5k | 4 | 566 | 6.54 | 9.23 | 13.66 | 47.1 | 0.98 | 0.20 | 127.7 | 9700 | — |
|
||||
| 5k | 16 | 527 | 27.81 | 44.96 | 74.63 | 81.5 | 1.01 | 0.20 | 127.7 | 10800 | — |
|
||||
| 10k | 1 | 378 | 2.41 | 3.45 | 4.91 | 11.7 | 0.75 | 0.13 | 127.7 | 13600 | — |
|
||||
| 10k | 4 | 546 | 6.72 | 9.69 | 12.87 | 49.5 | 1.00 | 0.19 | 127.7 | 14700 | — |
|
||||
| 10k | 16 | 515 | 29.18 | 44.99 | 66.27 | 69.5 | 1.01 | 0.22 | 127.7 | 15800 | — |
|
||||
|
||||
## Память и наполнение по размерам
|
||||
|
||||
Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`).
|
||||
|
||||
| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 1k | 4500 | 121.4 | 127.6 | 1430 | 0.8 | 0.6 | 330 | 488 | 9 | 185.0 |
|
||||
| 5k | 8500 | 121.5 | 127.6 | 758 | 1.5 | 1.1 | 321 | 492 | 49 | 185.0 |
|
||||
| 10k | 13500 | 121.5 | 127.6 | 478 | 2.3 | 1.9 | 328 | 497 | 99 | 185.0 |
|
||||
|
||||
## Планы запроса истории
|
||||
|
||||
Страница (`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 | 27 | 0 | 51 | 0.156 | custom |
|
||||
| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.160 | custom |
|
||||
| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.070 | custom |
|
||||
| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.069 | generic |
|
||||
| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 496 | 0 | 51 | 0.128 | custom |
|
||||
| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.578 | custom |
|
||||
| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.466 | custom |
|
||||
| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.057 | custom |
|
||||
| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 22 | 0 | 51 | 0.279 | custom |
|
||||
| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 32 | 0 | 51 | 0.135 | custom |
|
||||
| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.108 | custom |
|
||||
| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.068 | custom |
|
||||
| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.069 | generic |
|
||||
| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 487 | 0 | 51 | 0.125 | custom |
|
||||
| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.489 | custom |
|
||||
| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 101 | 0 | 51 | 0.431 | custom |
|
||||
| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.055 | custom |
|
||||
| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 19 | 0 | 51 | 0.154 | custom |
|
||||
| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 65 | 0 | 51 | 0.314 | custom |
|
||||
| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 65 | 0 | 51 | 0.138 | custom |
|
||||
| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 45 | 0 | 51 | 0.065 | generic |
|
||||
| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.198 | custom |
|
||||
| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 65 | 0 | 51 | 0.125 | custom |
|
||||
| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.049 | custom |
|
||||
| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.043 | custom |
|
||||
| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.047 | custom |
|
||||
| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.029 | generic |
|
||||
| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 10 | 0.146 | custom |
|
||||
| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.033 | custom |
|
||||
| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.015 | custom |
|
||||
| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 25 | 0 | 51 | 0.156 | custom |
|
||||
| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.178 | generic |
|
||||
| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.065 | custom |
|
||||
| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.077 | generic |
|
||||
| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2365 | 0 | 51 | 0.380 | custom |
|
||||
| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 184 | 0 | 51 | 2.122 | custom |
|
||||
| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 184 | 0 | 51 | 2.124 | custom |
|
||||
| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.053 | custom |
|
||||
| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.159 | generic |
|
||||
| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 42 | 0 | 51 | 0.113 | custom |
|
||||
| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.128 | generic |
|
||||
| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.064 | custom |
|
||||
| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.064 | generic |
|
||||
| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 498 | 0 | 51 | 0.114 | custom |
|
||||
| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 184 | 0 | 51 | 0.568 | custom |
|
||||
| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 186 | 0 | 51 | 0.435 | custom |
|
||||
| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.053 | custom |
|
||||
| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.108 | generic |
|
||||
| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.172 | custom |
|
||||
| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.061 | custom |
|
||||
| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.063 | generic |
|
||||
| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 184 | 0 | 51 | 0.273 | custom |
|
||||
| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 84 | 0 | 51 | 0.129 | custom |
|
||||
| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.048 | custom |
|
||||
| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.052 | custom |
|
||||
| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.030 | custom |
|
||||
| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.024 | generic |
|
||||
| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 184 | 0 | 10 | 0.202 | custom |
|
||||
| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.022 | custom |
|
||||
| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.019 | custom |
|
||||
| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 10 | 0 | 51 | 0.183 | custom |
|
||||
| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.173 | generic |
|
||||
| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.063 | custom |
|
||||
| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.065 | generic |
|
||||
| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 4713 | 0 | 51 | 0.732 | custom |
|
||||
| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 294 | 0 | 51 | 4.012 | custom |
|
||||
| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 294 | 0 | 51 | 3.763 | custom |
|
||||
| 10k | read 10k | middle | 5000 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.051 | custom |
|
||||
| 10k | read 10k | last | 9900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.165 | generic |
|
||||
| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.150 | custom |
|
||||
| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.174 | generic |
|
||||
| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.056 | custom |
|
||||
| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.061 | generic |
|
||||
| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 514 | 0 | 51 | 0.125 | custom |
|
||||
| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 294 | 0 | 51 | 0.708 | custom |
|
||||
| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 285 | 0 | 51 | 0.484 | custom |
|
||||
| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.055 | custom |
|
||||
| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.136 | generic |
|
||||
| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.182 | custom |
|
||||
| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.063 | custom |
|
||||
| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.064 | generic |
|
||||
| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 51 | 0.403 | custom |
|
||||
| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 85 | 0 | 51 | 0.129 | custom |
|
||||
| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.055 | custom |
|
||||
| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.086 | custom |
|
||||
| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.028 | custom |
|
||||
| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.024 | generic |
|
||||
| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 10 | 0.329 | custom |
|
||||
| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.027 | custom |
|
||||
| 10k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.019 | custom |
|
||||
|
||||
## Стоимость записи по вариантам индекса
|
||||
|
||||
Вставка порции сообщений во все чаты в пропорции наполнения одной командой, в транзакции, которая откатывается; индекс истории построен заново, перед вставкой `CHECKPOINT`. Значения — медиана (min–max) повторов. «4000 символов» — вставка сообщения максимальной длины из несжимаемого текста.
|
||||
|
||||
| Размер | Вариант | Строк вставки | Индекс, МиБ | Байт индекса на сообщение | мкс на сообщение | WAL байт на сообщение | FPI на 1000 | 4000 символов |
|
||||
|---|---|---|---|---|---|---|---|---|
|
||||
| 1k | app | 5000 | 0.5 | 60.9 | 5.80 (5.07–5.86) | 490 (490–501) | 21.2 (12.0–21.2) | ok |
|
||||
| 1k | chat_only | 5000 | 0.1 | 9.5 | 4.97 (4.89–5.17) | 402 (402–403) | 18.6 (18.6–18.6) | ok |
|
||||
| 1k | covering | 5000 | 1.2 | 159.6 | 5.55 (5.38–6.05) | 695 (695–695) | 25.0 (25.0–25.0) | index row requires 12072 bytes, maximum size is 8191 |
|
||||
| 1k | none | 5000 | 0.0 | 0.0 | 4.38 (4.35–4.38) | 314 (314–314) | 17.2 (17.2–17.2) | ok |
|
||||
| 5k | app | 5000 | 0.7 | 60.4 | 5.91 (4.98–6.52) | 506 (501–506) | 22.0 (17.6–22.0) | ok |
|
||||
| 5k | chat_only | 5000 | 0.1 | 9.0 | 5.02 (4.87–5.05) | 423 (422–424) | 19.8 (19.2–19.8) | ok |
|
||||
| 5k | covering | 5000 | 1.8 | 160.4 | 5.61 (5.55–5.77) | 711 (711–712) | 25.6 (25.4–25.6) | index row requires 12072 bytes, maximum size is 8191 |
|
||||
| 5k | none | 5000 | 0.0 | 0.0 | 4.32 (4.26–4.35) | 334 (334–334) | 18.2 (18.0–18.2) | ok |
|
||||
| 10k | app | 5000 | 1.0 | 59.5 | 5.21 (5.11–7.05) | 543 (543–556) | 31.2 (19.2–31.2) | ok |
|
||||
| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.83 (4.80–4.90) | 454 (454–458) | 28.8 (27.6–29.0) | ok |
|
||||
| 10k | covering | 5000 | 2.6 | 160.4 | 5.72 (5.64–5.88) | 754 (753–755) | 35.6 (35.0–35.6) | index row requires 12072 bytes, maximum size is 8191 |
|
||||
| 10k | none | 5000 | 0.0 | 0.0 | 4.42 (4.34–4.79) | 368 (368–370) | 27.6 (27.4–27.6) | ok |
|
||||
|
||||
## Кривая наполнения 10k: запись при росте хранилища, 32 клиента
|
||||
|
||||
| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 1 | 13500 | 496 | 56.805 | 132.984 | 180.953 | 321.418 | 0.999 | 0.189 | 127.6 | — |
|
||||
Reference in New Issue
Block a user