docs: record unit-of-work evidence and report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 00:34:03 +03:00
co-authored by Claude Opus 5.5
parent 6ba74b18f3
commit 952c16350e
127 changed files with 16540 additions and 414 deletions
+5 -3
View File
@@ -638,14 +638,14 @@ config_example.toml, .env.example
evidence/broker/ # change async-attachments: stand.md (driver.py broker-check), isolated.md (очередь временной базы) evidence/broker/ # change async-attachments: stand.md (driver.py broker-check), isolated.md (очередь временной базы)
evidence/worker/ # change async-attachments: process.md (driver.py worker-process), logs.md (журнал задания) evidence/worker/ # change async-attachments: process.md (driver.py worker-process), logs.md (журнал задания)
evidence/attachments/ # change async-attachments: defense.md (driver.py defense-scenario); change attachments: smoke.md, failover.md (driver.py attachment-failover stop и kill), storage.md (driver.py attachment-storage), slow-transfer.md (10 MiB через LB дольше 6 с); change upload-consistency: consistency.md (driver.py upload-consistency и журналы API и уборщика), cleaner-process.md (старт, отказ конфигурации, остановка, окно 0, рестарт хранилищ, отказ S3 во время прохода); по замечанию ревьюера: jpeg-structure.md (варианты JPEG — прежняя и новая проверка, Pillow, djpeg; регрессия на 301 JPEG; время; красный и зелёный прогоны test_undecodable_jpeg) evidence/attachments/ # change async-attachments: defense.md (driver.py defense-scenario); change attachments: smoke.md, failover.md (driver.py attachment-failover stop и kill), storage.md (driver.py attachment-storage), slow-transfer.md (10 MiB через LB дольше 6 с); change upload-consistency: consistency.md (driver.py upload-consistency и журналы API и уборщика), cleaner-process.md (старт, отказ конфигурации, остановка, окно 0, рестарт хранилищ, отказ S3 во время прохода); по замечанию ревьюера: jpeg-structure.md (варианты JPEG — прежняя и новая проверка, Pillow, djpeg; регрессия на 301 JPEG; время; красный и зелёный прогоны test_undecodable_jpeg)
evidence/s3/ # change s3-storage: bootstrap.md (первый запуск, повтор, смена секрета, ошибка шага, до bootstrap), privacy.md (make s3_check, нарушение и исправление, порты, секреты по сервисам), grpc-admin.md (gRPC шлюза без токена), restart.md (restart.sh и SIGKILL S3), client.md (операции, pause/stop, неверный секрет, журнал), memory.md (20 × 10 MiB PUT); change upload-consistency: cleaner-key.md (пользователь уборщика в bootstrap, смена секрета, make s3_check с ключом уборщика, секреты по сервисам); change track2-reconciler: cleaner-list.md (bootstrap с политикой списка по префиксу, неверный префикс, make s3_check со строками списка уборщика, окружение s3-bootstrap) evidence/s3/ # privacy.md — make s3_check на текущем коде; change s3-storage: bootstrap.md (первый запуск, повтор, смена секрета, ошибка шага, до bootstrap), privacy.md (make s3_check, нарушение и исправление, порты, секреты по сервисам), grpc-admin.md (gRPC шлюза без токена), restart.md (restart.sh и SIGKILL S3), client.md (операции, pause/stop, неверный секрет, журнал), memory.md (20 × 10 MiB PUT); change upload-consistency: cleaner-key.md (пользователь уборщика в bootstrap, смена секрета, make s3_check с ключом уборщика, секреты по сервисам); change track2-reconciler: cleaner-list.md (bootstrap с политикой списка по префиксу, неверный префикс, make s3_check со строками списка уборщика, окружение s3-bootstrap)
evidence/reconcile/ # change track2-reconciler: cycle.md (driver.py reconcile-cycle), stress.md (driver.py reconcile-stress), service.md (Started cleaner с параметрами сверки, плановая сверка при старте, docker stop во время сверки при pause s3, код 1 разового прохода по сигналу — driver.py reconcile-signal, отказ старта на RECONCILER__*, коды 3 и 0; с change track2-reconcile-cost — остановка во время паузы предела скорости, driver.py reconcile-signal --pace) evidence/reconcile/ # change track2-reconciler: cycle.md (driver.py reconcile-cycle), stress.md (driver.py reconcile-stress), service.md (Started cleaner с параметрами сверки, плановая сверка при старте, docker stop во время сверки при pause s3, код 1 разового прохода по сигналу — driver.py reconcile-signal, отказ старта на RECONCILER__*, коды 3 и 0; с change track2-reconcile-cost — остановка во время паузы предела скорости, driver.py reconcile-signal --pace)
evidence/reconcile/<метка>/ # результаты make bench_reconcile (change track2-reconcile-cost): meta.json (раздел reconcile: план, этапы и модели, commit и образы «до», аргументы S3), passes.csv, windows.csv, summary.md (H1–H4 и S4), cost-by-n.svg, requests-by-n.svg, background-p95.svg, raw/ (записи уборщика по проходам, итог k6 блока H4) evidence/reconcile/<метка>/ # результаты make bench_reconcile (change track2-reconcile-cost): meta.json (раздел reconcile: план, этапы и модели, commit и образы «до», аргументы S3), passes.csv, windows.csv, summary.md (H1–H4 и S4), cost-by-n.svg, requests-by-n.svg, background-p95.svg, raw/ (записи уборщика по проходам, итог k6 блока H4)
evidence/storage/ # отказы БД, пул, statement_timeout, рестарт, порты Postgres, свежий clone; connection-cost.md — цена нового соединения и пинга evidence/storage/ # отказы БД, пул, statement_timeout, рестарт, порты Postgres, свежий clone; connection-cost.md — цена нового соединения и пинга
evidence/migrations/ # миграции с нуля и повторно, ошибка миграции; лаба 4: pending-index.md (ревизия 739b8f04d5fb с нуля, повтор, откат, EXPLAIN общего плана кандидатов уборщика на рабочей базе с откатом, rollout_quick), lost-at.md (ревизия 5c3e1f0a9b7d колонки lost_at: с нуля, повтор, откат, --sql с lock_timeout, make rolling_update с ревизией до и после) evidence/migrations/ # миграции с нуля и повторно, ошибка миграции; лаба 4: pending-index.md (ревизия 739b8f04d5fb с нуля, повтор, откат, EXPLAIN общего плана кандидатов уборщика на рабочей базе с откатом, rollout_quick), lost-at.md (ревизия 5c3e1f0a9b7d колонки lost_at: с нуля, повтор, откат, --sql с lock_timeout, make rolling_update с ревизией до и после)
evidence/auth/ # passwords-and-tokens.md — driver.py auth-storage на стенде текущей лабы: Argon2id в users, SHA-256 токена в sessions, ни токена, ни пароля в pg_dump (исключения сверки покрытия) evidence/auth/ # passwords-and-tokens.md — driver.py auth-storage на стенде текущей лабы: Argon2id в users, SHA-256 токена в sessions, ни токена, ни пароля в pg_dump (исключения сверки покрытия)
evidence/cache/ # hits.md — make test_isolated + driver.py cache-check на стенде текущей лабы: одно чтение chats на 50 через LB, TTL, ключи двух баз (исключения сверки покрытия) evidence/cache/ # hits.md — make test_isolated + driver.py cache-check на стенде текущей лабы: одно чтение chats на 50 через LB, TTL, ключи двух баз (исключения сверки покрытия)
evidence/tests/ # выводы make test_isolated (test-isolated.md), make student_test через LB (student-test-lb.md) и make failure_checks (failure-checks.md) для REPORT.md, secrets.md; файлы этих проверок лаб 3 и 4 — в их репозиториях evidence/tests/ # change unit-of-work: service-tests.md (make service_test и service_test_db, таблица регрессий); выводы make test_isolated (test-isolated.md), make student_test через LB (student-test-lb.md) и make failure_checks (failure-checks.md) для REPORT.md, secrets.md; файлы этих проверок лаб 3 и 4 — в их репозиториях
evidence/idempotency/ # повтор, 409, гонка, таблица ключей, X-Instance-Id evidence/idempotency/ # повтор, 409, гонка, таблица ключей, X-Instance-Id
evidence/replicas/ # стенд с LB: порты, лимиты и их цена для Argon2id, окружение, распределение, ответы LB (нет реплик, зависшая, без PostgreSQL), test-persistence, чистый clone на нестандартных портах evidence/replicas/ # стенд с LB: порты, лимиты и их цена для Argon2id, окружение, распределение, ответы LB (нет реплик, зависшая, без PostgreSQL), test-persistence, чистый clone на нестандартных портах
evidence/failover/ # make test-failover для каждой реплики (stop и kill), отказы stop-one.sh; замер обнаружения, keep-alive, зависшая реплика и ключ; stop-at-start.md — docker stop стартующей реплики «до/после» раннего обработчика и ветка сбоя rolling-update.sh evidence/failover/ # make test-failover для каждой реплики (stop и kill), отказы stop-one.sh; замер обнаружения, keep-alive, зависшая реплика и ключ; stop-at-start.md — docker stop стартующей реплики «до/после» раннего обработчика и ветка сбоя rolling-update.sh
@@ -657,7 +657,9 @@ evidence/bench/scaling-*/ # серии трека 1 (a, b, pool, A/A scaling-
evidence/plots/scaling/ # make bench_plots по сериям a и b: графики SVG и summary.md (R*, эффективность, точка насыщения, цена запроса, память) evidence/plots/scaling/ # make bench_plots по сериям a и b: графики SVG и summary.md (R*, эффективность, точка насыщения, цена запроса, память)
evidence/plots/scaling-db/ # make bench_plots по серии db: R* по лимитам PostgreSQL и раздел «Насыщение PostgreSQL» evidence/plots/scaling-db/ # make bench_plots по серии db: R* по лимитам PostgreSQL и раздел «Насыщение PostgreSQL»
evidence/uploads/ # change upload-memory: <метка>/ — make bench_uploads (meta.json, runs.csv, summary.md, raw/), lb-timeouts.md — driver.py lb-upload-timeouts, rollout-upload.md — медленная загрузка во время make rolling_update evidence/uploads/ # change upload-memory: <метка>/ — make bench_uploads (meta.json, runs.csv, summary.md, raw/), lb-timeouts.md — driver.py lb-upload-timeouts, rollout-upload.md — медленная загрузка во время make rolling_update
evidence/compare/ # таблицы make bench_compare: <до>__<после>.md evidence/bench/unit-of-work-*/ # change unit-of-work, профиль quick с именной меткой (идёт в git): before и aa на b2fb88f, after на 6ba74b1
evidence/rollout/unit-of-work*/ # change unit-of-work: unit-of-work (замена с Profile.rollout_from), unit-of-work-previous (--from b2fb88f: CPU на запрос старых и новых реплик)
evidence/compare/ # таблицы make bench_compare: <до>__<после>.md; unit-of-work-before__unit-of-work-after.md — цена шага
.github/workflows/application.yml # свой CI job (CONTRIBUTING.md, «CI»; contracts.yml — skeleton): checkout commit прогона (адрес Gitea литералом: github.server_url — внутренний http://gitea:3000, из job не резолвится; по той же причине contracts.yml на этом раннере падает на actions/checkout), сборка и стенд под проектом mtusi-lab5-safronov-ci-<run_id>, job подключается к сети стенда, готовность — обе реплики через LB, make check / test, аноним в S3 — 403, make validate, make student_test, test-persistence, test-failover stop и kill, уборка при любом исходе; без s3_check, test_isolated и failure_checks (порты хоста). Раннер Gitea (act_runner) запускает job в контейнере на том же Docker, что стенд .github/workflows/application.yml # свой CI job (CONTRIBUTING.md, «CI»; contracts.yml — skeleton): checkout commit прогона (адрес Gitea литералом: github.server_url — внутренний http://gitea:3000, из job не резолвится; по той же причине contracts.yml на этом раннере падает на actions/checkout), сборка и стенд под проектом mtusi-lab5-safronov-ci-<run_id>, job подключается к сети стенда, готовность — обе реплики через LB, make check / test, аноним в S3 — 403, make validate, make student_test, test-persistence, test-failover stop и kill, уборка при любом исходе; без s3_check, test_isolated и failure_checks (порты хоста). Раннер Gitea (act_runner) запускает job в контейнере на том же Docker, что стенд
.github/ci/compose.yml # override стенда в CI: конфиги — configs из переменных окружения вместо bind mount (файлов job нет на хосте раннера), без портов на хосте, образ API с тегом прогона .github/ci/compose.yml # override стенда в CI: конфиги — configs из переменных окружения вместо bind mount (файлов job нет на хосте раннера), без портов на хосте, образ API с тегом прогона
.github/ci/stand-env.sh # «.» в шагах job: содержимое конфигов в CI_* для configs (с переводом строки в конце: без него HAProxy конфиг не принимает), wait_replicas — /health/ready 200 от API_REPLICAS разных реплик через LB за 60 с .github/ci/stand-env.sh # «.» в шагах job: содержимое конфигов в CI_* для configs (с переводом строки в конце: без него HAProxy конфиг не принимает), wait_replicas — /health/ready 200 от API_REPLICAS разных реплик через LB за 60 с
+48 -10
View File
@@ -3,7 +3,7 @@
- Автор, группа: Сафронов Роман Николаевич, БВТ2301 - Автор, группа: Сафронов Роман Николаевич, БВТ2301
- Целевая оценка; выбранный трек 5: оценка 5, трек 1 «Очередь под перегрузкой» - Целевая оценка; выбранный трек 5: оценка 5, трек 1 «Очередь под перегрузкой»
- Состояние отчёта: закрыты **уровень 3** (change `async-attachments`) и **уровень 4** (change `pipeline-reliability`). Раздел уровня 5 закрывает `track1-queue-overload` - Состояние отчёта: закрыты **уровень 3** (change `async-attachments`) и **уровень 4** (change `pipeline-reliability`). Раздел уровня 5 закрывает `track1-queue-overload`
- Commit/PR: измеренное состояние — `399da05` (ветка `feat/pipeline-reliability`); снятое на прежних `e2a6427` и `ff1a83b` названо в разделе доказательств; PR — TODO после публикации - Commit/PR: измеренное состояние — `6ba74b1` (ветка `feat/unit-of-work`, перенос на единицу работы без изменения поведения); снятое на прежних `399da05`, `e2a6427` и `ff1a83b` названо в разделе доказательств; PR — TODO после публикации
- Источники, библиотеки и помощь ИИ — последний раздел - Источники, библиотеки и помощь ИИ — последний раздел
## Запуск из чистого clone ## Запуск из чистого clone
@@ -159,7 +159,33 @@ sequenceDiagram
Быстрые тесты сервисов — каталог `service-tests/` вне образа и вне `student-tests/`: `make service_test` гоняет ветки всех сервисов на фейках без хранилищ и docker, `make service_test_db` на временной базе проверяет настоящую единицу работы, общий срок запроса и тот же набор условий repo, что и на фейке (`service-tests/repo_contract.py`). Блокировки и поведение под конкуренцией фейк не воспроизводит: это по-прежнему `make failure_checks`. Быстрые тесты сервисов — каталог `service-tests/` вне образа и вне `student-tests/`: `make service_test` гоняет ветки всех сервисов на фейках без хранилищ и docker, `make service_test_db` на временной базе проверяет настоящую единицу работы, общий срок запроса и тот же набор условий repo, что и на фейке (`service-tests/repo_contract.py`). Блокировки и поведение под конкуренцией фейк не воспроизводит: это по-прежнему `make failure_checks`.
Цена шага — вторая выдача соединения на двухшаговой ручке, новых соединений нет. Её снижает проверка соединения при выдаче одним запросом `;` вместо трёх (`_ping_once`, опирается на внутренние имена адаптера, смену имён ловит `make service_test_db`). Таблица «до и после» с уровнем шума, команды, commit и пути к меткам: раздел добавляется снятием evidence на закоммиченном коде (`openspec/changes/unit-of-work/tasks.md`, группа 13). Цена шага — вторая выдача соединения на двухшаговой ручке, новых соединений нет. Её снижает проверка соединения при выдаче одним запросом `;` вместо трёх (`_ping_once`, опирается на внутренние имена адаптера, смену имён ловит `make service_test_db`). Осталось то, что в таблицах ниже: цену приняли, готовые меры (чтение без транзакции, соединение Core вместо сессии) не применялись (`design.md`, решение 7).
Обмены с PostgreSQL на запрос (журнал `log_statement = all`, проба до кода, `design.md`, Context; на commit не переснимались: выражения те же):
| Ручка | До | На шаг без меры | С мерой (`_ping_once`) |
|---|---|---|---|
| `GET /users/me` | 6 | 6 | 4 |
| `GET …/messages` | 7 | 12 | 8 |
| `POST …/messages` | 8 | 13 | 9 |
Потолок и CPU реплики до и после, закрытая модель, 1 реплика 1 CPU, один повтор на ячейку: `caffeinate -isu uv run python bench/run.py --profile quick --label unit-of-work-before` и `unit-of-work-aa` на `b2fb88f` (`src` как на `9efab79`, временный `git worktree`), `--label unit-of-work-after` на `6ba74b1`; `make bench_compare BEFORE=unit-of-work-before AFTER=unit-of-work-after AA=unit-of-work-aa`. Метки — `evidence/bench/unit-of-work-*/`, сравнение — `evidence/compare/unit-of-work-before__unit-of-work-after.md`. У всех трёх `git.dirty` false, `host_warnings` пусты, `swapouts_delta` 0; посторонние контейнеры на хосте — `domains-api-1`, `domains-bot-1`, `domains-postgres-1` (названы в паспортах). Первая съёмка `unit-of-work-before` дала предупреждение о выгрузке 27708 страниц в swap и переснята (`bench.md`): порядок меток — aa, after, rollout, затем before, в той же сессии хоста; отброшенная метка в git не идёт.
| Сценарий | Шум A/A, наибольшее Δ RPS | Δ RPS по 9 ячейкам: медиана (мин…макс) | Вывод `bench_compare` | p50 при 1 клиенте, мс |
|---|---|---|---|---|
| история | 14,8 % (5k × 1) | −6,6 % (−18,8…−3,2) | эффект — 1k × 1 (−16,2 %) и 1k × 16 (−18,8 %), остальные в пределах шума | 1,86 → 2,22; 1,95 → 2,16; 1,85 → 2,22 |
| отправка | 34,8 % (5k × 16) | −4,3 % (−23,5…+37,5) | в пределах шума, кроме 5k × 16: +37,5 % — выброс ячейки «до» (383 RPS) | 2,05 → 2,40; 2,07 → 2,33; 1,89 → 2,41 |
CPU реплики на запрос, мкс, история: 1646 → 1811, 1520 → 1606, 1434 → 1767 (1k × 1, 4, 16); отправка: 1860 → 2009, 1618 → 1682, 1687 → 1954. Остальные ячейки и p95 — там же в `evidence/compare/`. По сравнению с оценкой `design.md` (потолок −1…−22 %, p50 при 150/с +0,2…0,5 мс): медианы и почти все ячейки внутри, вне её одна ячейка отправки, 10k × 1, −23,5 % при шуме 34,8 %; p50 здесь при 1 клиенте закрытой модели, а не при 150/с, прирост +0,21…+0,52 мс. Шум меток большой (один повтор на ячейку), поэтому точное число — порядок, а не доказанная величина.
CPU на успешный запрос при постоянных 200 запросах в секунду (100 записей, 100 чтений; две реплики разных версий в одном прогоне): `bench/run.py --profile rollout --from b2fb88f --label unit-of-work-previous` на `6ba74b1`, `evidence/rollout/unit-of-work-previous/summary.md`, `git.dirty` false, `host_warnings` пусты:
| Компонент | До замены, мкс | После замены, мкс |
|---|---|---|
| API всего | 3066 | 3398 |
| PostgreSQL | 478 | 560 |
Замена с `b2fb88f` на `6ba74b1`: 10,2 с, ошибок 0 / 0 / 0, 12001 сообщение = 12001 ключ. Удержание соединения на запрос по пробе `design.md` (Context) ниже на 20–36 %; на commit отдельно не измерялось.
**Транзакционные границы.** Ключ эффекта — первичный ключ `attachment_variants (attachment_id, pipeline_version, variant)`, логическая работа — `UNIQUE (attachment_id, pipeline_version)` в `attachment_jobs`. Вызовов S3 и брокера внутри блоков единицы работы нет, кроме двух осознанных исключений с коротким сроком: публикация relay (2 с < срока блока 6 с < простоя транзакции 10 с: блокировка строки и есть признак «публикует другой relay») и DELETE уборщика под блокировкой строки. Намеренные особенности перенесены без изменения порядка: уборка зависшей загрузки — два блока (пометка, затем объект и строка), вход закрывает блок чтения до KDF, занятый ключ идемпотентности снимает блокировку фиксацией до ответа, а компенсация загрузки различает сбой выражения и сбой на самой фиксации флагом перед явным `commit()`: автокоммит при выходе этого бы не дал (`design.md`, решение 10). **Транзакционные границы.** Ключ эффекта — первичный ключ `attachment_variants (attachment_id, pipeline_version, variant)`, логическая работа — `UNIQUE (attachment_id, pipeline_version)` в `attachment_jobs`. Вызовов S3 и брокера внутри блоков единицы работы нет, кроме двух осознанных исключений с коротким сроком: публикация relay (2 с < срока блока 6 с < простоя транзакции 10 с: блокировка строки и есть признак «публикует другой relay») и DELETE уборщика под блокировкой строки. Намеренные особенности перенесены без изменения порядка: уборка зависшей загрузки — два блока (пометка, затем объект и строка), вход закрывает блок чтения до KDF, занятый ключ идемпотентности снимает блокировку фиксацией до ответа, а компенсация загрузки различает сбой выражения и сбой на самой фиксации флагом перед явным `commit()`: автокоммит при выходе этого бы не дал (`design.md`, решение 10).
@@ -313,16 +339,17 @@ sequenceDiagram
## Доказательства критериев ## Доказательства критериев
В шапке каждого файла — команда, дата, commit и стенд. На `399da05` (правки по проверке: `_prepared`, тесты, драйвер) сняты `evidence/worker/memory.md`, `evidence/worker/process.md`, `evidence/relay/process.md`, `evidence/attachments/defense-faults.md`, `evidence/tests/failure-checks.md`. Остальные файлы уровня 4 и `evidence/tests/student-test-lb.md`, `evidence/tests/test-isolated.md` сняты на `e2a6427`: из кода приложения `399da05` меняет только `src/utils/image_variants.py`, одну ветку перевода в RGBA, поэтому `test_pixel_limit_png_modes` в этих прогонах набора ещё нет, его сценарий на `399da05` доказывает `evidence/worker/memory.md`. Остались снятыми на прежнем коде `ff1a83b` и названы так в шапках: метка `evidence/uploads/baseline/`, `evidence/rollout/async-attachments/`, `evidence/migrations/async-attachments.md`, `evidence/s3/worker-key.md`: это доказательства перехода уровня 3, их поведение уровень 4 не менял. В шапке каждого файла — команда, дата, commit и стенд. На `6ba74b1` (единица работы, поведение то же) сняты `evidence/tests/student-test-lb.md`, `evidence/tests/test-isolated.md`, `evidence/tests/failure-checks.md`, `evidence/tests/service-tests.md`, `evidence/replicas/test-persistence.md`, `evidence/failover/test-failover.md`, `evidence/attachments/defense-faults.md`, `evidence/s3/privacy.md`, `evidence/worker/process.md`, `evidence/relay/process.md`. На `399da05` сняты `evidence/worker/memory.md` и таблица «Красные прогоны» в `failure-checks.md`. Остальные файлы уровня 4 сняты на `e2a6427`: из кода приложения `399da05` меняет только `src/utils/image_variants.py`, одну ветку перевода в RGBA, а `6ba74b1` поведения не меняет. Остались снятыми на прежнем коде `ff1a83b` и названы так в шапках: метка `evidence/uploads/baseline/`, `evidence/rollout/async-attachments/`, `evidence/migrations/async-attachments.md`, `evidence/s3/worker-key.md`: это доказательства перехода уровня 3, их поведение уровень 4 не менял.
### Уровень 3 ### Уровень 3
| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства | | Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| Публичный smoke | `make test` | `PASS: lab5 public API scenario` | `evidence/tests/test-isolated.md` | | Публичный smoke | `make test` | `PASS: lab5 public API scenario` | `evidence/tests/test-isolated.md` |
| Минимум лаб 1–4 сохранён с переходом 201 → 202 | `make student_test` через LB | 218 passed, 1 failed (`test_exclusion_evidence_exists`: только файлы последнего шага прогона), реплики выполнены; сверка: 370 сценариев, 348 проверены, 22 исключения | `evidence/tests/student-test-lb.md` | | Минимум лаб 1–4 сохранён с переходом 201 → 202 | `make student_test` через LB | 223 passed, 1 failed (`test_exclusion_evidence_exists`: только файлы последнего шага прогона), реплики выполнены; сверка: 371 сценарий, 349 проверены, 22 исключения | `evidence/tests/student-test-lb.md` |
| Тот же набор на временной базе | `make test_isolated` | smoke PASS; 212 passed, 6 skipped (реплики), 1 failed — то же; уборка полная | `evidence/tests/test-isolated.md` | | Тот же набор на временной базе | `make test_isolated` | smoke PASS; 217 passed, 6 skipped (реплики), 1 failed — то же; уборка полная | `evidence/tests/test-isolated.md` |
| Отказы | `make failure_checks` (`399da05`) | 141 passed, pytest 2302 с, `crash markers 0` | `evidence/tests/failure-checks.md` | | Отказы | `make failure_checks` (`6ba74b1`) | 141 passed, pytest 2449 с, `crash markers 0` | `evidence/tests/failure-checks.md` |
| Ветки сервисов и настоящая единица работы | `make service_test`, `make service_test_db` (`6ba74b1`) | 200 passed за 1,48 с без хранилищ; 71 passed за 21,51 с на временной базе; 13 регрессий дают названный красный | `evidence/tests/service-tests.md` |
| 202 только после устойчивого приёма и сохранения задания | `test_durable_state_at_202`, `test_upload_with_broker_stopped`, `test_upload_with_broker_paused` | к 202 объект в staging, строка и намерение в одной транзакции; брокер остановлен или заморожен — по-прежнему 202, намерение ждёт (на уровне 3 было 503) | `evidence/tests/failure-checks.md` | | 202 только после устойчивого приёма и сохранения задания | `test_durable_state_at_202`, `test_upload_with_broker_stopped`, `test_upload_with_broker_paused` | к 202 объект в staging, строка и намерение в одной транзакции; брокер остановлен или заморожен — по-прежнему 202, намерение ждёт (на уровне 3 было 503) | `evidence/tests/failure-checks.md` |
| Остановка API после ответа не теряет работу | `test_api_killed_after_202` | реплика убита после 202, вложение становится `ready` | `evidence/tests/failure-checks.md` | | Остановка API после ответа не теряет работу | `test_api_killed_after_202` | реплика убита после 202, вложение становится `ready` | `evidence/tests/failure-checks.md` |
| Отдельные broker и worker в общем compose | `driver.py broker-check`, `driver.py worker-process` | образ с тегом и digest, volume, AMQP только на loopback; PID 1 `python -m src.worker`, лимиты 1 CPU / 1 ГБ | `evidence/broker/stand.md`, `evidence/worker/process.md` | | Отдельные broker и worker в общем compose | `driver.py broker-check`, `driver.py worker-process` | образ с тегом и digest, volume, AMQP только на loopback; PID 1 `python -m src.worker`, лимиты 1 CPU / 1 ГБ | `evidence/broker/stand.md`, `evidence/worker/process.md` |
@@ -339,15 +366,15 @@ sequenceDiagram
| Демонстрация: worker остановлен → … → `ready` | `driver.py --port 8080 defense-scenario` | все строки `expected` = `got`, `StartedAt` API и брокера новые, у relay прежний; thumbnail 256 × 160, crop 128 × 128, optimized 320 × 200 | `evidence/attachments/defense.md` | | Демонстрация: worker остановлен → … → `ready` | `driver.py --port 8080 defense-scenario` | все строки `expected` = `got`, `StartedAt` API и брокера новые, у relay прежний; thumbnail 256 × 160, crop 128 × 128, optimized 320 × 200 | `evidence/attachments/defense.md` |
| Принятое задание переживает рестарт брокера с volume | `test_broker_restart_keeps_job`, `test_broker_kill_keeps_confirmed`, `test_broker_recreated` | сообщения на месте после `stop`, `KILL` и `up --force-recreate` | `evidence/tests/failure-checks.md` | | Принятое задание переживает рестарт брокера с volume | `test_broker_restart_keeps_job`, `test_broker_kill_keeps_confirmed`, `test_broker_recreated` | сообщения на месте после `stop`, `KILL` и `up --force-recreate` | `evidence/tests/failure-checks.md` |
| Очереди разных баз разделены | `make test_isolated KEEP_TEST_DB=1`, `broker-check --require-test-queue`, `make test_isolated` | очередь временной базы есть после первого и нет после второго | `evidence/broker/isolated.md` | | Очереди разных баз разделены | `make test_isolated KEEP_TEST_DB=1`, `broker-check --require-test-queue`, `make test_isolated` | очередь временной базы есть после первого и нет после второго | `evidence/broker/isolated.md` |
| Сохранность и hook | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | `PASS`; `api`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — те же ID и новый `StartedAt`, `relay`, `worker` и `cleaner` прежние | `evidence/replicas/test-persistence.md` | | Сохранность и hook | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | `PASS`; `api`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — те же контейнеры и новый `StartedAt`, `relay`, `worker` и `cleaner` прежние | `evidence/replicas/test-persistence.md` |
| Отказ реплики | `make test-failover` `stop` и `kill` | `failed_attempts` 0, восстановление 1,07 и 0,87 с | `evidence/failover/test-failover.md` | | Отказ реплики | `make test-failover` `stop` и `kill` | `failed_attempts` 0, восстановление 1,72 и 0,85 с | `evidence/failover/test-failover.md` |
| Принявшая реплика остановлена | `driver.py attachment-failover --mode stop\|kill` | файл отдаёт другая реплика, SHA-256 тот же, постороннему 404 | `evidence/attachments/failover.md` | | Принявшая реплика остановлена | `driver.py attachment-failover --mode stop\|kill` | файл отдаёт другая реплика, SHA-256 тот же, постороннему 404 | `evidence/attachments/failover.md` |
| Согласованность БД и S3 | `driver.py upload-consistency` | 503, строки `pending` не видны, уборщик убрал по ключу staging, объектов без строки 0 | `evidence/attachments/consistency.md` | | Согласованность БД и S3 | `driver.py upload-consistency` | 503, строки `pending` не видны, уборщик убрал по ключу staging, объектов без строки 0 | `evidence/attachments/consistency.md` |
| Приватность S3, права worker | `make s3_check` | `PASS: 90 checks`; worker: запись и чтение — да, удаление, список, админ — 403 | `evidence/s3/cleaner-staging.md` (и `evidence/s3/worker-key.md`, `ff1a83b`) | | Приватность S3, права worker | `make s3_check` | `PASS: 90 checks`; worker: запись и чтение — да, удаление, список, админ — 403 | `evidence/s3/cleaner-staging.md` (и `evidence/s3/worker-key.md`, `ff1a83b`) |
| Журнал worker | проба на стенде | общий `request_id` записей задания, `filename` 0 раз, сообщение не по схеме — `error` без содержимого | `evidence/worker/logs.md` | | Журнал worker | проба на стенде | общий `request_id` записей задания, `filename` 0 раз, сообщение не по схеме — `error` без содержимого | `evidence/worker/logs.md` |
| Миграция только расширяет, откат без отката схемы | проба на временной базе, `make rolling_update COMMIT=cc33a03 MIGRATE=0` и возврат (`ff1a83b`) | CHECK `NOT VALID`, по `lock_timeout` — без изменений; прежний образ работает, чтение нового статуса — 500 | `evidence/migrations/async-attachments.md` | | Миграция только расширяет, откат без отката схемы | проба на временной базе, `make rolling_update COMMIT=cc33a03 MIGRATE=0` и возврат (`ff1a83b`) | CHECK `NOT VALID`, по `lock_timeout` — без изменений; прежний образ работает, чтение нового статуса — 500 | `evidence/migrations/async-attachments.md` |
| Сроки LB пути загрузки | `driver.py lb-upload-timeouts` | 202 после 12 с молчания, 504 через 10 и 30 с, 400 в формате контракта | `evidence/uploads/lb-timeouts.md` | | Сроки LB пути загрузки | `driver.py lb-upload-timeouts` | 202 после 12 с молчания, 504 через 10 и 30 с, 400 в формате контракта | `evidence/uploads/lb-timeouts.md` |
| Замена реплик под нагрузкой | `make bench_rollout ROLLOUT_LABEL=async-attachments` (`ff1a83b`), `ROLLOUT_LABEL=pipeline-reliability` (`e2a6427`) | 8,52 и 8,67 с, ошибок 0, новые миграции, записей 12000 = ключей 12000 | `evidence/rollout/async-attachments/summary.md`, `evidence/rollout/pipeline-reliability/summary.md` | | Замена реплик под нагрузкой | `make bench_rollout ROLLOUT_LABEL=async-attachments` (`ff1a83b`), `ROLLOUT_LABEL=pipeline-reliability` (`e2a6427`), `ROLLOUT_LABEL=unit-of-work` (`6ba74b1`) | 8,52, 8,67 и 8,68 с, ошибок 0, новые миграции, записей столько же, сколько ключей (12000 и 12001) | `evidence/rollout/async-attachments/summary.md`, `evidence/rollout/pipeline-reliability/summary.md`, `evidence/rollout/unit-of-work/summary.md` |
| Память реплики при загрузках | `make bench_uploads` (`ff1a83b`) | «с лимитом» 10 MiB: пик 172,9 / 180,1 / 185,6 MiB при 10 / 20 / 40 клиентах, OOM 0, 5xx 0 | `evidence/uploads/baseline/summary.md` | | Память реплики при загрузках | `make bench_uploads` (`ff1a83b`) | «с лимитом» 10 MiB: пик 172,9 / 180,1 / 185,6 MiB при 10 / 20 / 40 клиентах, OOM 0, 5xx 0 | `evidence/uploads/baseline/summary.md` |
| Секретов в доказательствах нет | поиск значений из `.env` по `evidence/` | 17 значений, 0 совпадений | `evidence/tests/secrets.md` | | Секретов в доказательствах нет | поиск значений из `.env` по `evidence/` | 17 значений, 0 совпадений | `evidence/tests/secrets.md` |
@@ -410,6 +437,17 @@ CPU API всего: 0,54 ядра до и 0,55 после, 0,78 во время.
CPU API всего: 0,61 ядра до, 0,95 во время, 0,62 после. Гипотеза подтверждена. Сырые данные — `evidence/rollout/pipeline-reliability/`. CPU API всего: 0,61 ядра до, 0,95 во время, 0,62 после. Гипотеза подтверждена. Сырые данные — `evidence/rollout/pipeline-reliability/`.
### Поочерёдная замена на единицу работы: метки `unit-of-work` и `unit-of-work-previous`
Гипотеза: API, схема и настройки те же, поэтому замена на `6ba74b1` идёт без ошибок клиента и с версии до `pipeline-reliability`, и с предыдущего commit. Методика та же: `git.dirty` false, `swapouts_delta` 0, `host_warnings` пусты, питание от сети; посторонние контейнеры на хосте — `domains-api-1`, `domains-bot-1`, `domains-postgres-1` (названы в паспортах).
| Метка, откуда | Замена | Сборка / миграция | Ревизия | Ошибки до / во время / после | Успешных в секунду | p95 до / макс. во время | Записи |
|---|---|---|---|---|---|---|---|
| `unit-of-work`, `7f38948` (`make bench_rollout ROLLOUT_LABEL=unit-of-work`) | 8,68 с | 0 / 2 с | `a1d4c7e90b23` → `d3f9a6b2c1e7` | 0 / 0 / 0 | 200 / мин. 200 | 6 / 161 мс | 12001 сообщение = 12001 ключ |
| `unit-of-work-previous`, `b2fb88f` (`bench/run.py --profile rollout --from b2fb88f`) | 10,2 с | 1 / 3 с | `d3f9a6b2c1e7` → `d3f9a6b2c1e7` | 0 / 0 / 0 | 200 / мин. 200 | 7 / 180 мс | 12001 сообщение = 12001 ключ |
CPU API на запрос до и после замены у `unit-of-work`: 3089 и 3113 мкс, PostgreSQL 493 и 524 мкс; у `unit-of-work-previous` — раздел «Единица работы» выше. Гипотеза подтверждена. Сырые данные — `evidence/rollout/unit-of-work/`, `evidence/rollout/unit-of-work-previous/`.
### Память реплики при загрузках: метка `baseline` ### Память реплики при загрузках: метка `baseline`
Снята на `ff1a83b`, потому что на неё ссылаются исключения сверки лабы 4; с этой меткой новые не сравниваются (с уровня 4 профиль не запускает брокер). Методика — `make bench_uploads`: одна реплика 1 CPU / 512 МБ без swap, 72 прогона, 50 мин, медиана из 3 повторов; worker не запущен, задания ждут в очереди. Поправки к чтению — `evidence/uploads/README.md`. Снята на `ff1a83b`, потому что на неё ссылаются исключения сверки лабы 4; с этой меткой новые не сравниваются (с уровня 4 профиль не запускает брокер). Методика — `make bench_uploads`: одна реплика 1 CPU / 512 МБ без swap, 72 прогона, 50 мин, медиана из 3 повторов; worker не запущен, задания ждут в очереди. Поправки к чтению — `evidence/uploads/README.md`.
@@ -440,7 +478,7 @@ H1 (пик ограничен местами) и H4 (нет 503 по сроку
| S3 недоступен при очистке staging | проход прерван, сообщения не ждут | так (`test_staging_cleanup_survives_outage`) | следующий проход повторяет | | S3 недоступен при очистке staging | проход прерван, сообщения не ждут | так (`test_staging_cleanup_survives_outage`) | следующий проход повторяет |
| PostgreSQL недоступен при обработке | задание ждёт, попытка не считается | так (`test_database_outage_during_processing`) | потерь нет | | PostgreSQL недоступен при обработке | задание ждёт, попытка не считается | так (`test_database_outage_during_processing`) | потерь нет |
| Сообщение не по схеме | отброшено, `error` без содержимого | так (`test_malformed_message_dropped`, `logs.md`) | следующие задания идут | | Сообщение не по схеме | отброшено, `error` без содержимого | так (`test_malformed_message_dropped`, `logs.md`) | следующие задания идут |
| Реплика API остановлена или убита | запись через другую | `failed_attempts` 0 (`test-failover.md`) | 1,09 и 0,74 с, потерь нет | | Реплика API остановлена или убита | запись через другую | `failed_attempts` 0 (`test-failover.md`) | 1,72 и 0,85 с, потерь нет |
## Ограничения и следующие шаги ## Ограничения и следующие шаги
+83 -114
View File
@@ -1,136 +1,105 @@
# Шаг 4 сценария защиты: окна отказа # Шаг 4 сценария защиты: окна отказа
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 defense-faults` - Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 defense-faults`
- Дата: 2026-10-31, 16:01:59–16:04:03 UTC; код выхода 0, итог `PASS` - Дата: 2026-10-31, 20:42:18–20:44:28 UTC; код выхода 0, итог `PASS`
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`: HAProxy, две реплики API, relay, worker, cleaner, PostgreSQL, Valkey, S3, RabbitMQ - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`: HAProxy, две реплики API, relay, worker, cleaner, PostgreSQL, Valkey, S3, RabbitMQ
- Спек: `student-tests`, «Шаг 4 на рабочем стенде»; решения 1, 3, 5, 14, 17 design change `pipeline-reliability`. Тем же порядком на стенде отказов — `test_defense_faults` (`evidence/tests/failure-checks.md`) - Спек: `student-tests`, «Шаг 4 на рабочем стенде»; решения 1, 3, 5, 14, 17 design change `pipeline-reliability`. Особенности транзакций перенесены на единицу работы без изменения порядка (design change `unit-of-work`, решение 10)
- Точек сбоя в коде нет: окна держат триггеры `driver_df_*` только на уникальный `filename` прогона, `docker kill` снаружи. Токенов и секретов в выводе нет, пользователи и чат синтетические - Точек сбоя в коде нет: окна держат триггеры `driver_df_*` только на уникальный `filename` прогона, `docker kill` снаружи. Токенов и секретов в выводе нет
- Вывод сокращён: внутри окна строки скачивания вариантов свёрнуты в одну (каждый вариант проверен: 200, тип, размеры по байтам, SHA-256 = метаданным), итоговая таблица «проверка → ожидаемо → получено» без расхождений заменена её итогом - Вывод сокращён: оставлена итоговая таблица «ожидаемо → получено»; строки скачивания вариантов свёрнуты (в каждом окне и у каждого варианта: 200, тип, размеры по байтам, SHA-256 = метаданным: `thumbnail` 256×160 JPEG, `crop` 128×128 JPEG, `optimized` 320×200 WebP), значения SHA-256 и id сокращены до совпало. Все строки совпали, расхождений нет
```text ```text
window: after writing objects, before COMMIT window: after writing objects, before COMMIT
upload: 202 queue empty before the window expected 0 got 0
attachment id 2cccff8d-6ce9-448f-9d58-7506b6e39aa1 upload expected 202 got 202
COMMIT of ready waits in the trigger: yes COMMIT of ready waits in the trigger expected yes got yes
action: docker kill worker docker kill worker expected 0 got 0
job state after kill: processing job state after kill expected processing got processing
attempt after kill: 1 attempt after kill expected 1 got 1
job id 181f8092-211d-482d-981b-c15e6e74e70a thumbnail, crop, optimized object written expected yes got yes
thumbnail sha256 before the crash b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546 docker start worker expected 0 got 0
crop sha256 before the crash fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f
optimized sha256 before the crash 1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb
action: start worker, lease expires in 69 s
attachment status: ready
ready 70 s after the kill ready 70 s after the kill
next attempt not before the lease expired: yes attachment status expected ready got ready
variants in metadata: crop,optimized,thumbnail next attempt not before the lease expired expected yes got yes
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) variants in metadata expected crop,optimized,thumbnail got crop,optimized,thumbnail
thumbnail same sha256 in S3 and metadata: b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546 variants: same sha256 in S3 and in metadata совпало у трёх
crop same sha256 in S3 and metadata: fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f attempt expected 2 got 2
optimized same sha256 in S3 and metadata: 1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb job state expected succeeded got succeeded
attempt: 2 queue empty expected 0 got 0
job state: succeeded
queue empty: 0
window: after COMMIT, before ack window: after COMMIT, before ack
upload: 202 queue empty before the window expected 0 got 0
attachment id 63163c48-95f9-4e41-ae36-4746f241bad5 upload expected 202 got 202
COMMIT waits in the deferred trigger: yes COMMIT waits in the deferred trigger expected yes got yes
action: docker kill -s STOP worker freeze worker expected 0 got 0
job state while frozen: succeeded job state while frozen expected succeeded got succeeded
job id c14b31e6-2e3c-4453-8a55-76c8d4881b7c docker kill worker expected 0 got 0
action: docker kill worker message returned to the queue (no ack) expected 1 got 1
message returned to the queue (no ack): 1 docker start worker expected 0 got 0
action: start worker redelivered: 'Skipped job message', finished expected yes got yes
redelivered: 'Skipped job message', finished: yes new attempts expected 0 got 0
new attempts: 0 queue empty expected 0 got 0
queue empty: 0 same updated_at совпало
same updated_at: 2026-10-31T16:03:16.515863+00:00 attempt expected 1 got 1
attempt: 1 metadata unchanged expected yes got yes
metadata unchanged: yes
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200)
window: after COMMIT queued, before publish window: after COMMIT queued, before publish
action: docker kill relay queue empty before the window expected 0 got 0
relay stays down: no docker kill relay expected 0 got 0
upload: 202 relay stays down expected no got no
attachment id 2776eb1b-9c3e-429e-9acc-bd2d010eee9c upload expected 202 got 202
job id a50fc32c-e511-4789-8973-29073584414d job state expected queued got queued
job state: queued published_at expected None got None
published_at: None messages in the queue expected 0 got 0
messages in the queue: 0 docker start relay expected 0 got 0
action: start relay attachment status expected ready got ready
attachment status: ready attempt expected 1 got 1
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200)
attempt: 1
window: after broker confirm, before the mark window: after broker confirm, before the mark
action: docker compose stop worker queue empty before the window expected 0 got 0
upload: 202 upload expected 202 got 202
attachment id ef8d3438-e3bd-4849-8375-79cccd92f29e the mark waits in the trigger expected yes got yes
the mark waits in the trigger: yes docker kill relay expected 0 got 0
action: docker kill relay message in the queue expected 1 got 1
message in the queue: 1 published_at expected None got None
job id 61c712cf-5a6e-4f5c-b9b7-c042bc7e9202 docker start relay expected 0 got 0
published_at: None two messages with the worker stopped expected 2 got 2
action: start relay docker start worker expected 0 got 0
two messages with the worker stopped: 2 attachment status expected ready got ready
action: start worker queue empty expected 0 got 0
attachment status: ready attempt expected 1 got 1
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200)
queue empty: 0
attempt: 1
window: replay of a failed job window: replay of a failed job
action: docker compose stop worker queue empty before the window expected 0 got 0
upload: 202 upload expected 202 got 202
attachment id 899a3ef4-f0d9-4d0c-8b75-49e0fe7ccf7d put other bytes expected 0 got 0
action: staging object replaced with other bytes of the same size docker start worker expected 0 got 0
action: start worker attachment status expected failed got failed
attachment status: failed error_code expected processing_failed got processing_failed
error_code: processing_failed reason expected source_corrupted got source_corrupted
job id 0ef49bb7-fda7-4555-a82a-9693e265820a registry names the job expected yes got yes
reason: source_corrupted registry changes nothing совпало
action: replay --error-code processing_failed (registry, dry-run) put original bytes expected 0 got 0
registry: exit 0 replay exit code expected 0 got 0
registry names the job: yes 'Replayed job' record expected yes got yes
registry changes nothing: state failed, attempt 1, attempt_base 0, last_error_code source_corrupted attachment status expected ready got ready
action: original bytes returned to staging download original expected 200 got 200
action: replay --attachment-id 899a3ef4-f0d9-4d0c-8b75-49e0fe7ccf7d --apply original sha256 = uploaded совпало
replay exit code: 0 same job совпало
'Replayed job' record: yes attempt expected 2 got 2
attachment status: ready attempt_base expected 1 got 1
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200) audit совпало (operator driver-defense-faults, processing_failed, source_corrupted)
download original: 200
original sha256 = uploaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
same job: 0ef49bb7-fda7-4555-a82a-9693e265820a
attempt: 2
attempt_base: 1
audit: [{'operator': 'driver-defense-faults', 'error_code': 'processing_failed', 'reason': 'source_corrupted', 'attempt': 1}]
window: replay of a ready job window: replay of a ready job
upload: 202 upload expected 202 got 202
attachment id 5158f6e9-c59a-46f1-bfb9-d16cf502aa7c attachment status expected ready got ready
attachment status: ready replay exit code expected 3 got 3
job id f6eeaf22-4374-4880-99d1-c2b54ecb2bd3 refusal expected already_ready got already_ready
action: replay --attachment-id 5158f6e9-c59a-46f1-bfb9-d16cf502aa7c --apply metadata unchanged expected yes got yes
replay exit code: 3 job unchanged совпало
refusal: already_ready audit records expected 0 got 0
metadata unchanged: yes
job unchanged: 2026-10-31T16:03:55.015651+00:00
audit records: 0
driver triggers left: 0
window -> action -> job id -> attempts started -> result end: driver triggers left expected 0 got 0
after writing objects, before COMMIT -> kill worker, wait for the lease -> 181f8092-211d-482d-981b-c15e6e74e70a -> 2 -> ready
after COMMIT, before ack -> freeze and kill worker after COMMIT -> c14b31e6-2e3c-4453-8a55-76c8d4881b7c -> 1 -> ready, no-op
after COMMIT queued, before publish -> kill relay, upload, start relay -> a50fc32c-e511-4789-8973-29073584414d -> 1 -> ready
after broker confirm, before the mark -> kill relay after confirm, duplicate -> 61c712cf-5a6e-4f5c-b9b7-c042bc7e9202 -> 1 -> ready
replay of a failed job -> failed, registry, replay -> 0ef49bb7-fda7-4555-a82a-9693e265820a -> 2 -> ready
replay of a ready job -> replay ready -> f6eeaf22-4374-4880-99d1-c2b54ecb2bd3 -> 1 -> refused, exit 3
all rows of the check table: expected = got
PASS: every window finished with the same result, no duplicate effect PASS: every window finished with the same result, no duplicate effect
worker and relay running at the end: yes worker and relay running at the end: yes
``` ```
@@ -0,0 +1,673 @@
# План запроса истории: размер 10k
Commit b2fb88f
Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 10k: first, после 0
duration: 0.184 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '51'
Limit (cost=0.29..9.59 rows=51 width=153) (actual time=0.042..0.140 rows=51.00 loops=1)
Buffers: shared hit=17
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1825.36 rows=10000 width=153) (actual time=0.040..0.135 rows=51.00 loops=1)
Index Cond: (chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid)
Index Searches: 1
Buffers: shared hit=17
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 10k: middle, после 5000
duration: 0.146 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '2026-10-31 20:22:09.184908+00', $3 = 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.032..0.107 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.030..0.103 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 10k: last, после 9900
duration: 0.144 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee', $2 = '2026-10-31 20:22:20.445692+00', $3 = 'ff794cf6-13c4-4816-a97e-ef0fc4ef4326', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.031..0.113 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.030..0.109 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.150 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '51'
Limit (cost=0.29..54.04 rows=51 width=153) (actual time=0.033..0.117 rows=51.00 loops=1)
Buffers: shared hit=46
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1054.25 rows=1000 width=153) (actual time=0.033..0.114 rows=51.00 loops=1)
Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Index Searches: 1
Buffers: shared hit=46
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.185 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '2026-10-31 20:22:09.183192+00', $3 = '6c079c72-956b-4d22-902d-50525cd17715', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.023..0.140 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.022..0.137 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.126 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '8b619ecf-de9e-4043-8b20-40346656f7ba', $2 = '2026-10-31 20:22:18.306084+00', $3 = '20861ffc-3d7f-413e-a417-26cec0b4dcb3', $4 = '51'
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.016..0.096 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.016..0.093 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.165 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '2c89c970-25a2-4db8-be56-14a7e9aa8283', $2 = '51'
Limit (cost=0.29..151.02 rows=51 width=153) (actual time=0.013..0.134 rows=51.00 loops=1)
Buffers: shared hit=48
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.85 rows=100 width=153) (actual time=0.013..0.131 rows=51.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Index Searches: 1
Buffers: shared hit=48
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 10: first, после 0
duration: 0.073 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5', $2 = '51'
Limit (cost=0.29..38.25 rows=10 width=153) (actual time=0.028..0.065 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.25 rows=10 width=153) (actual time=0.027..0.064 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.002..0.002 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
## Страницы сравнения в psql: варианты
Тот же текст запроса и те же параметры, что у плана приложения этой
страницы, в одной транзакции, которая откатывается: индексы базы
после неё те же. Каждый вариант выполнен дважды, здесь — второе
выполнение. `psql` — индекс приложения, custom plan; `generic` — он
же с force_generic_plan; `or-cursor` — условие курсора через OR;
`no-index` — без индекса приложения; варианты индекса вместо него:
`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text).
### read 10k: middle, после 5000
#### psql
Limit (cost=0.29..14.64 rows=51 width=153) (actual time=0.006..0.057 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1408.11 rows=5000 width=153) (actual time=0.005..0.053 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.065 ms
#### generic
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.014..0.065 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.014..0.062 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.011 ms
Execution Time: 0.077 ms
#### or-cursor
Limit (cost=0.29..18.90 rows=51 width=153) (actual time=0.720..0.763 rows=51.00 loops=1)
Buffers: shared hit=5063
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1825.36 rows=5000 width=153) (actual time=0.720..0.760 rows=51.00 loops=1)
Index Cond: (chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid)
Filter: ((created_at > '2026-10-31 20:22:09.184908+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:22:09.184908+00'::timestamp with time zone) AND (id > 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Rows Removed by Filter: 5000
Index Searches: 1
Buffers: shared hit=5063
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.061 ms
Execution Time: 0.779 ms
#### no-index
Limit (cost=771.06..771.19 rows=51 width=153) (actual time=3.982..3.986 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=771.06..783.56 rows=5000 width=153) (actual time=3.982..3.984 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 44kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..604.25 rows=5000 width=153) (actual time=0.224..3.444 rows=5000.00 loops=1)
Filter: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Rows Removed by Filter: 8500
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.069 ms
Execution Time: 3.995 ms
#### chat_only
Limit (cost=771.06..771.19 rows=51 width=153) (actual time=3.710..3.713 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=771.06..783.56 rows=5000 width=153) (actual time=3.710..3.711 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 44kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..604.25 rows=5000 width=153) (actual time=0.208..3.168 rows=5000.00 loops=1)
Filter: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Rows Removed by Filter: 8500
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=5000)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 3.719 ms
#### covering
Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.007..0.044 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..567.41 rows=5000 width=153) (actual time=0.006..0.041 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e7f0a7ce-371e-41c8-8b8c-182d863d4eee'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.184908+00'::timestamp with time zone, 'e12757c1-c860-44ed-8d49-05bd9ef9ed8a'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.052 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.29..95.89 rows=51 width=153) (actual time=0.006..0.049 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..937.55 rows=500 width=153) (actual time=0.006..0.046 rows=51.00 loops=1)
Index Cond: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.041 ms
Execution Time: 0.057 ms
#### generic
Limit (cost=0.29..21.79 rows=7 width=153) (actual time=0.012..0.061 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.45 rows=71 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.009 ms
Execution Time: 0.072 ms
#### or-cursor
Limit (cost=0.29..107.79 rows=51 width=153) (actual time=0.083..0.121 rows=51.00 loops=1)
Buffers: shared hit=502
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1054.25 rows=500 width=153) (actual time=0.083..0.119 rows=51.00 loops=1)
Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Filter: ((created_at > '2026-10-31 20:22:09.183192+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:22:09.183192+00'::timestamp with time zone) AND (id > '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=502
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.076 ms
Execution Time: 0.129 ms
#### no-index
Limit (cost=553.43..553.56 rows=51 width=153) (actual time=0.666..0.669 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=553.43..554.68 rows=500 width=153) (actual time=0.666..0.667 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..536.75 rows=500 width=153) (actual time=0.192..0.613 rows=500.00 loops=1)
Filter: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Rows Removed by Filter: 13000
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.066 ms
Execution Time: 0.676 ms
#### chat_only
Limit (cost=350.59..350.72 rows=51 width=153) (actual time=0.507..0.511 rows=51.00 loops=1)
Buffers: shared hit=281
-> Sort (cost=350.59..351.84 rows=500 width=153) (actual time=0.507..0.509 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=281
-> Bitmap Heap Scan on messages (cost=15.91..333.91 rows=500 width=153) (actual time=0.094..0.442 rows=500.00 loops=1)
Recheck Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=278
Buffers: shared hit=281
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.022..0.022 rows=1000.00 loops=1)
Index Cond: (chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.042 ms
Execution Time: 0.517 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.007..0.046 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.006..0.044 rows=51.00 loops=1)
Index Cond: ((chat_id = '8b619ecf-de9e-4043-8b20-40346656f7ba'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:22:09.183192+00'::timestamp with time zone, '6c079c72-956b-4d22-902d-50525cd17715'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.063 ms
Execution Time: 0.054 ms
### bg 100: first, после 0
#### psql
Limit (cost=0.29..151.02 rows=51 width=153) (actual time=0.005..0.050 rows=51.00 loops=1)
Buffers: shared hit=48
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.85 rows=100 width=153) (actual time=0.005..0.047 rows=51.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Index Searches: 1
Buffers: shared hit=48
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.055 ms
#### generic
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.012..0.061 rows=51.00 loops=1)
Buffers: shared hit=48
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.76 rows=214 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=48
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.005 ms
Execution Time: 0.069 ms
#### no-index
Limit (cost=466.57..466.70 rows=51 width=153) (actual time=0.394..0.397 rows=51.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=466.57..466.82 rows=100 width=153) (actual time=0.393..0.395 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..463.25 rows=100 width=153) (actual time=0.007..0.376 rows=100.00 loops=1)
Filter: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Rows Removed by Filter: 13400
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.402 ms
#### chat_only
Limit (cost=215.36..215.48 rows=51 width=153) (actual time=0.110..0.114 rows=51.00 loops=1)
Buffers: shared hit=91
-> Sort (cost=215.36..215.61 rows=100 width=153) (actual time=0.110..0.112 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=91
-> Bitmap Heap Scan on messages (cost=5.06..212.03 rows=100 width=153) (actual time=0.011..0.097 rows=100.00 loops=1)
Recheck Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Heap Blocks: exact=89
Buffers: shared hit=91
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.120 ms
#### covering
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.042 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.040 rows=51.00 loops=1)
Index Cond: (chat_id = '2c89c970-25a2-4db8-be56-14a7e9aa8283'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.038 ms
Execution Time: 0.049 ms
### bg 10: first, после 0
#### psql
Limit (cost=0.29..38.25 rows=10 width=153) (actual time=0.008..0.018 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.25 rows=10 width=153) (actual time=0.008..0.017 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.061 ms
Execution Time: 0.026 ms
#### generic
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.013..0.026 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.76 rows=214 width=153) (actual time=0.013..0.024 rows=10.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning Time: 0.006 ms
Execution Time: 0.035 ms
#### no-index
Limit (cost=462.07..462.09 rows=10 width=153) (actual time=0.307..0.308 rows=10.00 loops=1)
Buffers: shared hit=293
-> Sort (cost=462.07..462.09 rows=10 width=153) (actual time=0.307..0.307 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=293
-> Seq Scan on messages (cost=0.00..461.90 rows=10 width=153) (actual time=0.017..0.294 rows=10.00 loops=1)
Filter: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Rows Removed by Filter: 13490
Buffers: shared hit=293
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.050 ms
Execution Time: 0.313 ms
#### chat_only
Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.021 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Index Scan using bench_variant on messages (cost=0.29..33.31 rows=10 width=153) (actual time=0.006..0.017 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.066 ms
Execution Time: 0.030 ms
#### covering
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.005..0.012 rows=10.00 loops=1)
Index Cond: (chat_id = 'd96f0cdc-62d0-4949-b4e8-9f94e470ece5'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.017 ms
@@ -0,0 +1,731 @@
# План запроса истории: размер 1k
Commit b2fb88f
Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 1k: first, после 0
duration: 0.147 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '51'
Limit (cost=0.28..24.74 rows=51 width=153) (actual time=0.040..0.113 rows=51.00 loops=1)
Buffers: shared hit=32
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.84 rows=1000 width=153) (actual time=0.039..0.109 rows=51.00 loops=1)
Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Index Searches: 1
Buffers: shared hit=32
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 1k: middle, после 500
duration: 0.121 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '2026-10-31 20:19:42.570021+00', $3 = 'cb5ad463-2531-42b3-8858-75d9f4d51aa0', $4 = '51'
Limit (cost=0.28..45.12 rows=51 width=153) (actual time=0.016..0.085 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.73 rows=501 width=153) (actual time=0.016..0.082 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 1k: last, после 900
duration: 0.240 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = 'e89c392b-46c2-4a1d-a798-2ca1f4787398', $2 = '2026-10-31 20:19:45.708241+00', $3 = '10ad2de8-b01a-4b52-a049-d90b26b5aa5b', $4 = '51'
Limit (cost=120.17..120.30 rows=51 width=153) (actual time=0.193..0.198 rows=51.00 loops=1)
Buffers: shared hit=28
-> Sort (cost=120.17..120.42 rows=100 width=153) (actual time=0.193..0.195 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=28
-> Bitmap Heap Scan on messages (cost=9.31..116.85 rows=100 width=153) (actual time=0.029..0.144 rows=100.00 loops=1)
Recheck Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.708241+00'::timestamp with time zone, '10ad2de8-b01a-4b52-a049-d90b26b5aa5b'::uuid)))
Heap Blocks: exact=20
Buffers: shared hit=22
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.28 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.708241+00'::timestamp with time zone, '10ad2de8-b01a-4b52-a049-d90b26b5aa5b'::uuid)))
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.106 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '51'
Limit (cost=0.28..24.74 rows=51 width=153) (actual time=0.010..0.078 rows=51.00 loops=1)
Buffers: shared hit=37
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.84 rows=1000 width=153) (actual time=0.009..0.075 rows=51.00 loops=1)
Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Index Searches: 1
Buffers: shared hit=37
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.105 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '2026-10-31 20:19:42.593379+00', $3 = '41e10366-ac36-468e-965e-54b7bd0290ce', $4 = '51'
Limit (cost=0.28..45.38 rows=51 width=153) (actual time=0.012..0.075 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.63 rows=498 width=153) (actual time=0.011..0.072 rows=51.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.156 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3', $2 = '2026-10-31 20:19:45.714312+00', $3 = '630019db-1266-44cc-b5d6-fcb3edda0b30', $4 = '51'
Limit (cost=120.09..120.21 rows=51 width=153) (actual time=0.125..0.130 rows=51.00 loops=1)
Buffers: shared hit=18
-> Sort (cost=120.09..120.33 rows=99 width=153) (actual time=0.125..0.127 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=18
-> Bitmap Heap Scan on messages (cost=9.30..116.81 rows=99 width=153) (actual time=0.019..0.104 rows=100.00 loops=1)
Recheck Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.714312+00'::timestamp with time zone, '630019db-1266-44cc-b5d6-fcb3edda0b30'::uuid)))
Heap Blocks: exact=16
Buffers: shared hit=18
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.27 rows=99 width=0) (actual time=0.009..0.009 rows=100.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:45.714312+00'::timestamp with time zone, '630019db-1266-44cc-b5d6-fcb3edda0b30'::uuid)))
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.231 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '3694cad0-8739-4553-ba44-604daaaa3382', $2 = '51'
Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.197..0.201 rows=51.00 loops=1)
Buffers: shared hit=64
-> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.197..0.199 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=64
-> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.033..0.175 rows=100.00 loops=1)
Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Blocks: exact=62
Buffers: shared hit=64
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
### bg 10: first, после 0
duration: 0.041 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '173df049-0e59-461f-afe3-8a15542fa0c5', $2 = '51'
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.036..0.037 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.036..0.036 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.014..0.032 rows=10.00 loops=1)
Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
## Страницы сравнения в psql: варианты
Тот же текст запроса и те же параметры, что у плана приложения этой
страницы, в одной транзакции, которая откатывается: индексы базы
после неё те же. Каждый вариант выполнен дважды, здесь — второе
выполнение. `psql` — индекс приложения, custom plan; `generic` — он
же с force_generic_plan; `or-cursor` — условие курсора через OR;
`no-index` — без индекса приложения; варианты индекса вместо него:
`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text).
### read 1k: middle, после 500
#### psql
Limit (cost=0.28..45.12 rows=51 width=153) (actual time=0.009..0.057 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.73 rows=501 width=153) (actual time=0.009..0.054 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.065 ms
#### generic
Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.009..0.064 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.02 rows=24 width=153) (actual time=0.009..0.061 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.006 ms
Execution Time: 0.072 ms
#### or-cursor
Limit (cost=0.28..49.10 rows=51 width=153) (actual time=0.085..0.131 rows=51.00 loops=1)
Buffers: shared hit=525
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.86 rows=501 width=153) (actual time=0.085..0.128 rows=51.00 loops=1)
Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Filter: ((created_at > '2026-10-31 20:19:42.570021+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:19:42.570021+00'::timestamp with time zone) AND (id > 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=525
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.046 ms
Execution Time: 0.136 ms
#### no-index
Limit (cost=203.98..204.11 rows=51 width=153) (actual time=0.545..0.550 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=203.98..205.23 rows=501 width=153) (actual time=0.545..0.547 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..187.27 rows=501 width=153) (actual time=0.077..0.485 rows=500.00 loops=1)
Filter: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Rows Removed by Filter: 4000
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.073 ms
Execution Time: 0.560 ms
#### chat_only
Limit (cost=158.64..158.76 rows=51 width=153) (actual time=0.507..0.512 rows=51.00 loops=1)
Buffers: shared hit=103
-> Sort (cost=158.64..159.89 rows=501 width=153) (actual time=0.507..0.509 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=103
-> Bitmap Heap Scan on messages (cost=15.91..141.92 rows=501 width=153) (actual time=0.053..0.431 rows=500.00 loops=1)
Recheck Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=101
Buffers: shared hit=103
-> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.011..0.012 rows=1000.00 loops=1)
Index Cond: (chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.045 ms
Execution Time: 0.519 ms
#### covering
Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.006..0.048 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..57.82 rows=501 width=153) (actual time=0.006..0.045 rows=51.00 loops=1)
Index Cond: ((chat_id = 'e89c392b-46c2-4a1d-a798-2ca1f4787398'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.570021+00'::timestamp with time zone, 'cb5ad463-2531-42b3-8858-75d9f4d51aa0'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.055 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.28..45.38 rows=51 width=153) (actual time=0.011..0.072 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..440.63 rows=498 width=153) (actual time=0.010..0.070 rows=51.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.067 ms
Execution Time: 0.084 ms
#### generic
Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.010..0.060 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.02 rows=24 width=153) (actual time=0.010..0.057 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.007 ms
Execution Time: 0.069 ms
#### or-cursor
Limit (cost=0.28..49.39 rows=51 width=153) (actual time=0.082..0.139 rows=51.00 loops=1)
Buffers: shared hit=528
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..479.81 rows=498 width=153) (actual time=0.082..0.137 rows=51.00 loops=1)
Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Filter: ((created_at > '2026-10-31 20:19:42.593379+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:19:42.593379+00'::timestamp with time zone) AND (id > '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=528
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.055 ms
Execution Time: 0.146 ms
#### no-index
Limit (cost=203.83..203.96 rows=51 width=153) (actual time=0.602..0.605 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=203.83..205.08 rows=498 width=153) (actual time=0.602..0.603 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..187.22 rows=498 width=153) (actual time=0.076..0.544 rows=500.00 loops=1)
Filter: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Rows Removed by Filter: 4000
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.050 ms
Execution Time: 0.612 ms
#### chat_only
Limit (cost=158.49..158.62 rows=51 width=153) (actual time=0.442..0.446 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=158.49..159.74 rows=498 width=153) (actual time=0.442..0.443 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=101
-> Bitmap Heap Scan on messages (cost=15.91..141.88 rows=498 width=153) (actual time=0.053..0.390 rows=500.00 loops=1)
Recheck Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=99
Buffers: shared hit=101
-> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.014..0.014 rows=1000.00 loops=1)
Index Cond: (chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.453 ms
#### covering
Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.007..0.042 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..57.71 rows=498 width=153) (actual time=0.007..0.040 rows=51.00 loops=1)
Index Cond: ((chat_id = '1c02e8d5-8fbd-4500-9374-1e4e3f22f2e3'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:19:42.593379+00'::timestamp with time zone, '41e10366-ac36-468e-965e-54b7bd0290ce'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.056 ms
Execution Time: 0.051 ms
### bg 100: first, после 0
#### psql
Limit (cost=119.42..119.55 rows=51 width=153) (actual time=0.106..0.110 rows=51.00 loops=1)
Buffers: shared hit=64
-> Sort (cost=119.42..119.67 rows=100 width=153) (actual time=0.106..0.108 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=64
-> Bitmap Heap Scan on messages (cost=9.06..116.10 rows=100 width=153) (actual time=0.014..0.093 rows=100.00 loops=1)
Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Blocks: exact=62
Buffers: shared hit=64
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.007..0.007 rows=100.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.127 ms
#### generic
Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.008..0.058 rows=51.00 loops=1)
Buffers: shared hit=50
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.88 rows=71 width=153) (actual time=0.008..0.055 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=50
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.003 ms
Execution Time: 0.063 ms
#### no-index
Limit (cost=162.07..162.20 rows=51 width=153) (actual time=0.196..0.200 rows=51.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=162.07..162.32 rows=100 width=153) (actual time=0.196..0.197 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..158.75 rows=100 width=153) (actual time=0.005..0.182 rows=100.00 loops=1)
Filter: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Rows Removed by Filter: 4400
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.207 ms
#### chat_only
Limit (cost=115.42..115.55 rows=51 width=153) (actual time=0.116..0.120 rows=51.00 loops=1)
Buffers: shared hit=64
-> Sort (cost=115.42..115.67 rows=100 width=153) (actual time=0.116..0.118 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=64
-> Bitmap Heap Scan on messages (cost=5.06..112.10 rows=100 width=153) (actual time=0.010..0.103 rows=100.00 loops=1)
Recheck Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Blocks: exact=62
Buffers: shared hit=64
-> Bitmap Index Scan on bench_variant (cost=0.00..5.03 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.038 ms
Execution Time: 0.127 ms
#### covering
Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.007..0.042 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..11.53 rows=100 width=153) (actual time=0.007..0.040 rows=51.00 loops=1)
Index Cond: (chat_id = '3694cad0-8739-4553-ba44-604daaaa3382'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.053 ms
Execution Time: 0.052 ms
### bg 10: first, после 0
#### psql
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.024 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.022..0.023 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1)
Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.032 ms
#### generic
Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.007..0.017 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.88 rows=71 width=153) (actual time=0.007..0.016 rows=10.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning Time: 0.003 ms
Execution Time: 0.023 ms
#### no-index
Limit (cost=157.57..157.59 rows=10 width=153) (actual time=0.121..0.123 rows=10.00 loops=1)
Buffers: shared hit=101
-> Sort (cost=157.57..157.59 rows=10 width=153) (actual time=0.121..0.122 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=101
-> Seq Scan on messages (cost=0.00..157.40 rows=10 width=153) (actual time=0.019..0.118 rows=10.00 loops=1)
Filter: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Rows Removed by Filter: 4490
Buffers: shared hit=101
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.051 ms
Execution Time: 0.130 ms
#### chat_only
Limit (cost=35.36..35.39 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.36..35.39 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..35.20 rows=10 width=153) (actual time=0.008..0.018 rows=10.00 loops=1)
Recheck Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.026 ms
#### covering
Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.011 rows=10.00 loops=1)
Buffers: shared hit=3
-> Index Only Scan using bench_variant on messages (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.011 rows=10.00 loops=1)
Index Cond: (chat_id = '173df049-0e59-461f-afe3-8a15542fa0c5'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.017 ms
@@ -0,0 +1,693 @@
# План запроса истории: размер 5k
Commit b2fb88f
Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 5k: first, после 0
duration: 0.100 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '51'
Limit (cost=0.29..11.51 rows=51 width=153) (actual time=0.018..0.071 rows=51.00 loops=1)
Buffers: shared hit=25
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1100.82 rows=5000 width=153) (actual time=0.018..0.068 rows=51.00 loops=1)
Index Cond: (chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid)
Index Searches: 1
Buffers: shared hit=25
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 5k: middle, после 2500
duration: 0.113 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '2026-10-31 20:20:52.094182+00', $3 = '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.022..0.080 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.021..0.076 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 5k: last, после 4900
duration: 0.112 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '80b7184b-2dce-467f-80f1-54ef9f806be7', $2 = '2026-10-31 20:20:59.127167+00', $3 = 'd29a2234-a752-4b15-97ca-bc3a5fe16f81', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.022..0.079 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.021..0.075 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.253 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '51'
Limit (cost=0.29..39.63 rows=51 width=153) (actual time=0.033..0.158 rows=51.00 loops=1)
Buffers: shared hit=45
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..771.85 rows=1000 width=153) (actual time=0.032..0.152 rows=51.00 loops=1)
Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Index Searches: 1
Buffers: shared hit=45
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.109 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '2026-10-31 20:20:52.084497+00', $3 = '9087eb30-8899-4c5d-8728-7327affbc2a1', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.018..0.078 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.017..0.075 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.114 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008', $2 = '2026-10-31 20:20:57.953096+00', $3 = 'aa061a11-d99b-430e-8d57-8956f75927c3', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.019..0.080 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.018..0.077 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.124 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '6c3ce1eb-20ca-48e7-af3c-920956940be7', $2 = '51'
Limit (cost=0.29..154.66 rows=51 width=153) (actual time=0.012..0.077 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.012..0.074 rows=51.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 10: first, после 0
duration: 0.042 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '90a36fb9-ae42-4016-a663-65307e1e1e19', $2 = '51'
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.037..0.038 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.036..0.037 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.017..0.033 rows=10.00 loops=1)
Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.006..0.006 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
## Страницы сравнения в psql: варианты
Тот же текст запроса и те же параметры, что у плана приложения этой
страницы, в одной транзакции, которая откатывается: индексы базы
после неё те же. Каждый вариант выполнен дважды, здесь — второе
выполнение. `psql` — индекс приложения, custom plan; `generic` — он
же с force_generic_plan; `or-cursor` — условие курсора через OR;
`no-index` — без индекса приложения; варианты индекса вместо него:
`chat_only` (chat_id), `covering` (chat_id, created_at, id) INCLUDE (sender_id, text).
### read 5k: middle, после 2500
#### psql
Limit (cost=0.29..18.68 rows=51 width=153) (actual time=0.011..0.061 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..901.43 rows=2499 width=153) (actual time=0.011..0.058 rows=51.00 loops=1)
Index Cond: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.060 ms
Execution Time: 0.070 ms
#### generic
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.014..0.070 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.013..0.064 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.011 ms
Execution Time: 0.081 ms
#### or-cursor
Limit (cost=0.29..22.74 rows=51 width=153) (actual time=0.376..0.420 rows=51.00 loops=1)
Buffers: shared hit=2541
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1100.80 rows=2499 width=153) (actual time=0.376..0.417 rows=51.00 loops=1)
Index Cond: (chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid)
Filter: ((created_at > '2026-10-31 20:20:52.094182+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:20:52.094182+00'::timestamp with time zone) AND (id > '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Rows Removed by Filter: 2500
Index Searches: 1
Buffers: shared hit=2541
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.083 ms
Execution Time: 0.431 ms
#### no-index
Limit (cost=455.61..455.73 rows=51 width=153) (actual time=2.173..2.177 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=455.61..461.85 rows=2499 width=153) (actual time=2.173..2.175 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..372.24 rows=2499 width=153) (actual time=0.165..1.896 rows=2500.00 loops=1)
Filter: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Rows Removed by Filter: 6000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.061 ms
Execution Time: 2.186 ms
#### chat_only
Limit (cost=455.61..455.73 rows=51 width=153) (actual time=2.048..2.052 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=455.61..461.85 rows=2499 width=153) (actual time=2.047..2.049 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..372.24 rows=2499 width=153) (actual time=0.140..1.778 rows=2500.00 loops=1)
Filter: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Rows Removed by Filter: 6000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 2.057 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.009..0.097 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..287.88 rows=2499 width=153) (actual time=0.009..0.093 rows=51.00 loops=1)
Index Cond: ((chat_id = '80b7184b-2dce-467f-80f1-54ef9f806be7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.094182+00'::timestamp with time zone, '451aa0da-83f8-4f73-ac9d-8a4efcc8ecd3'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.086 ms
Execution Time: 0.108 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.29..74.92 rows=51 width=153) (actual time=0.009..0.069 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..731.98 rows=500 width=153) (actual time=0.008..0.066 rows=51.00 loops=1)
Index Cond: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.050 ms
Execution Time: 0.076 ms
#### generic
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.010..0.066 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.009..0.064 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.007 ms
Execution Time: 0.076 ms
#### or-cursor
Limit (cost=0.29..78.98 rows=51 width=153) (actual time=0.100..0.138 rows=51.00 loops=1)
Buffers: shared hit=530
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..771.85 rows=500 width=153) (actual time=0.100..0.136 rows=51.00 loops=1)
Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Filter: ((created_at > '2026-10-31 20:20:52.084497+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:20:52.084497+00'::timestamp with time zone) AND (id > '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=530
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.048 ms
Execution Time: 0.143 ms
#### no-index
Limit (cost=358.93..359.06 rows=51 width=153) (actual time=0.633..0.637 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=358.93..360.18 rows=500 width=153) (actual time=0.633..0.635 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..342.25 rows=500 width=153) (actual time=0.143..0.576 rows=500.00 loops=1)
Filter: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Rows Removed by Filter: 8000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.041 ms
Execution Time: 0.643 ms
#### chat_only
Limit (cost=243.59..243.72 rows=51 width=153) (actual time=0.472..0.476 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=243.59..244.84 rows=500 width=153) (actual time=0.472..0.474 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 40kB
Buffers: shared hit=186
-> Bitmap Heap Scan on messages (cost=15.91..226.91 rows=500 width=153) (actual time=0.092..0.416 rows=500.00 loops=1)
Recheck Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=183
Buffers: shared hit=186
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.019..0.019 rows=1000.00 loops=1)
Index Cond: (chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.483 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.004..0.052 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.004..0.050 rows=51.00 loops=1)
Index Cond: ((chat_id = '6ae81a0d-d05a-4b3b-b7f6-2013260aa008'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:20:52.084497+00'::timestamp with time zone, '9087eb30-8899-4c5d-8728-7327affbc2a1'::uuid)))
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.028 ms
Execution Time: 0.058 ms
### bg 100: first, после 0
#### psql
Limit (cost=0.29..154.66 rows=51 width=153) (actual time=0.007..0.064 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.007..0.062 rows=51.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.072 ms
#### generic
Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.009..0.062 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.47 rows=135 width=153) (actual time=0.009..0.059 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.003 ms
Execution Time: 0.067 ms
#### no-index
Limit (cost=297.07..297.20 rows=51 width=153) (actual time=0.281..0.284 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=297.07..297.32 rows=100 width=153) (actual time=0.281..0.282 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..293.75 rows=100 width=153) (actual time=0.010..0.266 rows=100.00 loops=1)
Filter: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Rows Removed by Filter: 8400
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.035 ms
Execution Time: 0.290 ms
#### chat_only
Limit (cost=172.68..172.80 rows=51 width=153) (actual time=0.133..0.136 rows=51.00 loops=1)
Buffers: shared hit=79
-> Sort (cost=172.68..172.93 rows=100 width=153) (actual time=0.133..0.134 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=79
-> Bitmap Heap Scan on messages (cost=5.06..169.35 rows=100 width=153) (actual time=0.013..0.120 rows=100.00 loops=1)
Recheck Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Heap Blocks: exact=77
Buffers: shared hit=79
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.143 ms
#### covering
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.005..0.055 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.005..0.052 rows=51.00 loops=1)
Index Cond: (chat_id = '6c3ce1eb-20ca-48e7-af3c-920956940be7'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=5
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.035 ms
Execution Time: 0.062 ms
### bg 10: first, после 0
#### psql
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.026..0.027 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.026..0.026 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.013..0.023 rows=10.00 loops=1)
Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.039 ms
Execution Time: 0.040 ms
#### generic
Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.011..0.023 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.47 rows=135 width=153) (actual time=0.011..0.022 rows=10.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=12
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning Time: 0.005 ms
Execution Time: 0.032 ms
#### no-index
Limit (cost=292.57..292.59 rows=10 width=153) (actual time=0.214..0.215 rows=10.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=292.57..292.59 rows=10 width=153) (actual time=0.214..0.214 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..292.40 rows=10 width=153) (actual time=0.016..0.212 rows=10.00 loops=1)
Filter: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Rows Removed by Filter: 8490
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.032 ms
Execution Time: 0.220 ms
#### chat_only
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.023..0.025 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.023..0.024 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.009..0.020 rows=10.00 loops=1)
Recheck Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on bench_variant (cost=0.00..4.36 rows=10 width=0) (actual time=0.003..0.003 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Index Searches: 1
Buffers: shared hit=2
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.052 ms
Execution Time: 0.033 ms
#### covering
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.015 rows=10.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.014 rows=10.00 loops=1)
Index Cond: (chat_id = '90a36fb9-ae42-4016-a663-65307e1e1e19'::uuid)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.038 ms
Execution Time: 0.021 ms
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,4 @@
size,chunk,messages_before,messages_after,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_end_mib,mem_cgroup_end_mib,generator_cpu_cores,flags,db_cpu_cores,cell,attempt
1000,1,0,4500,7.804,4500,0,576.6,0.0,51.614,108.971,151.826,222.608,0.999,125.0,116.1,0.119,,0.203,,
5000,1,0,8500,14.658,8500,0,579.9,0.0,51.796,112.909,148.343,224.403,0.999,125.2,115.5,0.11,,0.2,,
10000,1,0,13500,23.029,13500,0,586.2,0.0,51.517,104.946,144.711,250.139,0.999,125.1,118.1,0.109,,0.202,,
1 size chunk messages_before messages_after duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_end_mib mem_cgroup_end_mib generator_cpu_cores flags db_cpu_cores cell attempt
2 1000 1 0 4500 7.804 4500 0 576.6 0.0 51.614 108.971 151.826 222.608 0.999 125.0 116.1 0.119 0.203
3 5000 1 0 8500 14.658 8500 0 579.9 0.0 51.796 112.909 148.343 224.403 0.999 125.2 115.5 0.11 0.2
4 10000 1 0 13500 23.029 13500 0 586.2 0.0 51.517 104.946 144.711 250.139 0.999 125.1 118.1 0.109 0.202
@@ -0,0 +1,12 @@
{
"label": "unit-of-work-aa",
"profile": "quick",
"stage": "done",
"size": 10000,
"runs_done": 18,
"runs_total": 18,
"elapsed_s": 224,
"eta_s": 0,
"warnings": [],
"updated_at": "2026-10-31T20:23:06+00:00"
}
@@ -0,0 +1 @@
{"metrics":{"checks":{"contains":"default","values":{"passes":13500,"fails":0,"rate":1},"type":"rate"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":144.76235140999998,"max":250.22325,"avg":54.54204372888884,"min":11.426459,"med":51.578166499999995,"p(50)":51.578166499999995,"p(95)":104.99915444999999}},"http_req_duration":{"contains":"time","values":{"p(50)":51.517271,"p(95)":104.94581249999997,"p(99)":144.71090033,"max":250.138834,"avg":54.476573535036856,"min":11.378083,"med":51.517271},"type":"trend"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.339042,"avg":0.0004472439999999999,"min":0}},"data_received":{"type":"counter","contains":"data","values":{"count":6615000,"rate":287252.68865780847}},"iterations":{"type":"counter","contains":"default","values":{"count":13500,"rate":586.2299768526703}},"vus_max":{"contains":"default","values":{"max":32,"value":32,"min":32},"type":"gauge"},"http_req_sending":{"values":{"max":0.49325,"avg":0.005056908518518449,"min":0.001958,"med":0.003792,"p(50)":0.003792,"p(95)":0.010083,"p(99)":0.020041009999999998},"type":"trend","contains":"time"},"http_reqs":{"contains":"default","values":{"count":13500,"rate":586.2299768526703},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.016185549777777898,"min":0.004666,"med":0.013917,"p(50)":0.013917,"p(95)":0.03204404999999998,"p(99)":0.051001249999999984,"max":0.396084}},"data_sent":{"type":"counter","contains":"data","values":{"rate":220422.47129660405,"count":5076000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002083,"p(99)":0.003708,"max":1.04975,"avg":0.002860772888888782}},"vus":{"type":"gauge","contains":"default","values":{"value":30,"min":30,"max":32}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":11.378083,"med":51.517271,"p(50)":51.517271,"p(95)":104.94581249999997,"p(99)":144.71090033,"max":250.138834,"avg":54.476573535036856},"thresholds":{"max>=0":{"ok":true}}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":51.493958,"p(95)":104.92815829999999,"p(99)":144.69301542,"max":250.105042,"avg":54.45533107674069,"min":11.361542,"med":51.493958}},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":13500},"type":"rate"}},"root_group":{"groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":23028.50508}}
@@ -0,0 +1 @@
{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":4500,"fails":0}],"name":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":7804.259545},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4500,"fails":0}},"http_req_duration":{"contains":"time","values":{"min":11.5215,"med":51.614146,"p(50)":51.614146,"p(95)":108.97147644999998,"p(99)":151.82628041,"max":222.607834,"avg":55.30293323288895},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":4500}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0006185642222222222,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.276958}},"http_req_receiving":{"contains":"time","values":{"p(50)":0.014166,"p(95)":0.03429404999999999,"p(99)":0.05739041999999994,"max":0.412167,"avg":0.016828069555555564,"min":0.004625,"med":0.014166},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"contains":"default","values":{"min":32,"max":32,"value":32},"type":"gauge"},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.000959,"p(50)":0.000959,"p(95)":0.002125,"p(99)":0.007750419999999998,"max":0.906167,"avg":0.0033415228888889355,"min":0.0005}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"data_received":{"type":"counter","contains":"data","values":{"count":2205000,"rate":282538.0149501422}},"http_req_sending":{"values":{"p(95)":0.010459,"p(99)":0.01895801,"max":0.2155,"avg":0.005030362666666664,"min":0.002125,"med":0.003958,"p(50)":0.003958},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"rate":576.6081937758004,"count":4500}},"iteration_duration":{"contains":"time","values":{"p(99)":151.91362333,"max":222.664875,"avg":55.37190353111107,"min":11.580458,"med":51.66479150000001,"p(50)":51.66479150000001,"p(95)":109.01507884999998},"type":"trend"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":11.5215,"med":51.614146,"p(50)":51.614146,"p(95)":108.97147644999998,"p(99)":151.82628041,"max":222.607834,"avg":55.30293323288895},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"values":{"count":4500,"rate":576.6081937758004},"type":"counter","contains":"default"},"data_sent":{"contains":"data","values":{"count":1692000,"rate":216804.68085970095},"type":"counter"},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":51.5932295,"p(50)":51.5932295,"p(95)":108.95620064999999,"p(99)":151.80782051,"max":222.588416,"avg":55.2810748006667,"min":11.507208}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":8500,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":14657.63784,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":284152.1973365935}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.032960099999999985,"p(99)":0.05421175999999997,"max":0.301458,"avg":0.016481440823529543,"min":0.004417,"med":0.014,"p(50)":0.014}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":8500}},"http_req_waiting":{"values":{"p(50)":51.780333,"p(95)":112.89164854999999,"p(99)":148.32381375,"max":224.371292,"avg":55.03091433164729,"min":10.888125,"med":51.780333},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"max":32,"value":32,"min":32}},"vus_max":{"contains":"default","values":{"value":32,"min":32,"max":32},"type":"gauge"},"http_reqs":{"values":{"count":8500,"rate":579.9024435440683},"type":"counter","contains":"default"},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"iteration_duration":{"contains":"time","values":{"med":51.8613955,"p(50)":51.8613955,"p(95)":112.95544794999998,"p(99)":148.40809108,"max":224.47075,"avg":55.11979060494095,"min":10.95575},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003792,"p(95)":0.010084,"p(99)":0.018791419999999996,"max":0.267417,"avg":0.004890888588235243,"min":0.001791,"med":0.003792}},"checks":{"contains":"default","values":{"rate":1,"passes":8500,"fails":0},"type":"rate"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"avg":55.052286661058716,"min":10.902833,"med":51.795646000000005,"p(50)":51.795646000000005,"p(95)":112.90908569999999,"p(99)":148.34328125999997,"max":224.402542},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_duration":{"values":{"avg":55.052286661058716,"min":10.902833,"med":51.795646000000005,"p(50)":51.795646000000005,"p(95)":112.90908569999999,"p(99)":148.34328125999997,"max":224.402542},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":1.013542,"avg":0.004023293411764744,"min":0.000458,"med":0.001,"p(50)":0.001,"p(95)":0.002083,"p(99)":0.0046254099999999965}},"http_req_connecting":{"values":{"avg":0.0007623968235294118,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.350917},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":3196000,"rate":218043.3187725697}},"iterations":{"type":"counter","contains":"default","values":{"count":8500,"rate":579.9024435440683}}}}
@@ -0,0 +1 @@
{"metrics":{"http_req_receiving":{"contains":"time","values":{"med":0.020792,"p(50)":0.020792,"p(95)":0.053574599999999986,"p(99)":0.08314983999999999,"max":0.184625,"avg":0.02564272890338361,"min":0.012291},"type":"trend"},"checks":{"contains":"default","values":{"rate":1,"passes":4906,"fails":0},"type":"rate"},"data_sent":{"type":"counter","contains":"data","values":{"count":1025354,"rate":204990.90979468572}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":3.6188283599999997,"max":85.096792,"avg":2.0356424728903417,"min":1.551791,"med":1.895666,"p(50)":1.895666,"p(95)":2.7046919999999997}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":1.9329760978393826,"min":1.486833,"med":1.807208,"p(50)":1.807208,"p(95)":2.504284,"p(99)":3.4146998399999995,"max":84.908542}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":84.977166,"avg":1.962735408887078,"min":1.50225,"med":1.83075,"p(50)":1.83075,"p(95)":2.5664751999999993,"p(99)":3.4802585199999996}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003,"p(95)":0.008766399999999995,"p(99)":0.017405319999999988,"max":0.155417,"avg":0.004116582144313109,"min":0.001666,"med":0.003}},"iterations":{"values":{"count":2453,"rate":490.4088751069036},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":3.4802585199999996,"max":84.977166,"avg":1.962735408887078,"min":1.50225,"med":1.83075,"p(50)":1.83075,"p(95)":2.5664751999999993},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"values":{"count":2453,"rate":490.4088751069036},"type":"counter","contains":"default"},"http_req_connecting":{"contains":"time","values":{"avg":0.00004835915205870362,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.118625},"type":"trend"},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000542,"med":0.001041,"p(50)":0.001041,"p(95)":0.002333,"p(99)":0.0034148399999999984,"max":0.486958,"avg":0.0014451271911944483}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2453}},"data_received":{"values":{"count":35713227,"rate":7139862.8126814095},"type":"counter","contains":"data"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2453},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2453,"fails":0}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.948628}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":5019.671711,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_received":{"values":{"count":47243955,"rate":9411761.907949204},"type":"counter","contains":"data"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"values":{"avg":0.024742592295839763,"min":0.008459,"med":0.019292,"p(50)":0.019292,"p(95)":0.05186679999999999,"p(99)":0.10284651999999997,"max":0.438125},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":646.4566184455803,"count":3245}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":46.18396639999993,"p(99)":71.60269499999998,"max":114.556125,"avg":24.59960431093986,"min":8.968417,"med":21.929209,"p(50)":21.929209}},"http_req_sending":{"values":{"min":0.001792,"med":0.003,"p(50)":0.003,"p(95)":0.008458,"p(99)":0.018902999999999996,"max":0.130666,"avg":0.0039610767334360975},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3245,"rate":646.4566184455803}},"http_req_blocked":{"contains":"time","values":{"avg":0.003439970724191103,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002167,"p(99)":0.0061485199999999985,"max":0.585125},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6490,"fails":0}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iteration_duration":{"type":"trend","contains":"time","values":{"max":114.636042,"avg":24.702842439753418,"min":9.031625,"med":22.034792,"p(50)":22.034792,"p(95)":46.357516799999914,"p(99)":71.70724799999998}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":3245,"rate":0}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"min":8.984208,"med":21.958834,"p(50)":21.958834,"p(95)":46.24320819999993,"p(99)":71.63251995999998,"max":114.57775,"avg":24.628307979969204},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":71.63251995999998,"max":114.57775,"avg":24.628307979969204,"min":8.984208,"med":21.958834,"p(50)":21.958834,"p(95)":46.24320819999993}},"data_sent":{"values":{"count":1356410,"rate":270218.8665102525},"type":"counter","contains":"data"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.1645,"avg":0.000370775654853621}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3245,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3245}]}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5011.529779},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":45.538875,"avg":5.689445096292062,"min":3.606375,"med":5.338625,"p(50)":5.338625,"p(95)":7.03525,"p(99)":9.824547999999993},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":3479,"rate":0,"passes":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1454222,"rate":290175.26865622564}},"data_received":{"type":"counter","contains":"data","values":{"count":50650761,"rate":10106846.259248776}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.399542,"p(95)":7.147579499999998,"p(99)":9.941798519999988,"max":45.592625,"avg":5.756671475998839,"min":3.661667,"med":5.399542}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.002792,"p(50)":0.002792,"p(95)":0.00675,"p(99)":0.017477259999999998,"max":0.241125,"avg":0.003896505605058975,"min":0.001666}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"iterations":{"type":"counter","contains":"default","values":{"count":3479,"rate":694.1992073115446}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.0865657599999999,"max":0.3295,"avg":0.022590152917505008,"min":0.007375,"med":0.018333,"p(50)":0.018333,"p(95)":0.04400409999999999}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":5.689445096292062,"min":3.606375,"med":5.338625,"p(50)":5.338625,"p(95)":7.03525,"p(99)":9.824547999999993,"max":45.538875}},"vus_max":{"values":{"value":4,"min":4,"max":4},"type":"gauge","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.001916,"p(99)":0.0031340199999999986,"max":0.700708,"avg":0.001768398102903145,"min":0.000541,"med":0.000875,"p(50)":0.000875}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":5.662958437769487,"min":3.582459,"med":5.316708,"p(50)":5.316708,"p(95)":6.996358,"p(99)":9.792100979999994,"max":45.517916}},"http_req_connecting":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.190542,"avg":0.00017812848519689565,"min":0,"med":0},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3479,"rate":694.1992073115446}},"checks":{"contains":"default","values":{"rate":1,"passes":6958,"fails":0},"type":"rate"}},"root_group":{"groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3479,"fails":0,"name":"status 200"},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3479,"fails":0,"name":"full page"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"}}
@@ -0,0 +1 @@
{"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"fails":2644,"rate":0,"passes":0}},"http_reqs":{"values":{"count":2644,"rate":528.76398207808},"type":"counter","contains":"default"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.113167,"avg":0.000042801437216338884}},"http_req_blocked":{"type":"trend","contains":"time","values":{"min":0.000541,"med":0.000958,"p(50)":0.000958,"p(95)":0.001875,"p(99)":0.0028153699999999993,"max":0.481166,"avg":0.0012639568835098244}},"http_req_tls_handshaking":{"contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":2.1086411999999997,"p(99)":2.48973644,"max":5.192542,"avg":1.7930774803328309,"min":1.51975,"med":1.757021,"p(50)":1.757021}},"data_sent":{"type":"counter","contains":"data","values":{"count":1105192,"rate":221023.34450863744}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":2.156706249999999,"p(99)":2.54961031,"max":5.288125,"avg":1.820558904689867,"min":1.551166,"med":1.7807705,"p(50)":1.7807705}},"http_req_sending":{"values":{"avg":0.0038285355521936824,"min":0.001708,"med":0.002792,"p(50)":0.002792,"p(95)":0.006660699999999995,"p(99)":0.018350939999999986,"max":0.41575},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":5288,"fails":0,"rate":1}},"iteration_duration":{"values":{"p(95)":2.24451065,"p(99)":2.6700183699999998,"max":5.453458,"avg":1.8878566168683786,"min":1.600708,"med":1.8409165,"p(50)":1.8409165},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.06927338,"max":0.384875,"avg":0.02365288880484111,"min":0.010208,"med":0.019333,"p(50)":0.019333,"p(95)":0.046493849999999996}},"data_received":{"type":"counter","contains":"data","values":{"count":38493996,"rate":7698274.815074766}},"iterations":{"type":"counter","contains":"default","values":{"count":2644,"rate":528.76398207808}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":1.7807705,"p(50)":1.7807705,"p(95)":2.156706249999999,"p(99)":2.54961031,"max":5.288125,"avg":1.820558904689867,"min":1.551166},"thresholds":{"max>=0":{"ok":true}}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2644,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2644,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5000.340586,"isStdOutTTY":false}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5048.659086},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"values":{"count":3344,"rate":662.3540910640921},"type":"counter","contains":"default"},"http_req_sending":{"values":{"p(99)":0.024581619999999967,"max":1.013667,"avg":0.004336318480861308,"min":0.001792,"med":0.003,"p(50)":0.003,"p(95)":0.00795885},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":6688,"fails":0,"rate":1}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3344}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.019208,"p(95)":0.048071399999999986,"p(99)":0.08819443999999996,"max":0.42,"avg":0.02350889324162677,"min":0.007875,"med":0.019208}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.280458,"avg":0.000769337619617225,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":8.014208,"med":22.0177085,"p(50)":22.0177085,"p(95)":42.995177749999975,"p(99)":63.08671443999999,"max":81.39475,"avg":24.016956552631573}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3344,"rate":662.3540910640921}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":24.116835040669816,"min":8.11925,"med":22.106292,"p(50)":22.106292,"p(95)":43.11353919999997,"p(99)":63.17906324999999,"max":81.4895}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":24.04480176435406,"min":8.041584,"med":22.049291500000002,"p(50)":22.049291500000002,"p(95)":43.02531069999998,"p(99)":63.11551587999999,"max":81.416208}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.0037237036483254104,"min":0.0005,"med":0.000916,"p(50)":0.000916,"p(95)":0.002041,"p(99)":0.0065775599999999945,"max":0.65575}},"http_req_tls_handshaking":{"contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":48685296,"rate":9643213.211802118}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"avg":24.04480176435406,"min":8.041584,"med":22.049291500000002,"p(50)":22.049291500000002,"p(95)":43.02531069999998,"p(99)":63.11551587999999,"max":81.416208}},"data_sent":{"type":"counter","contains":"data","values":{"count":1397792,"rate":276864.0100647905}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3344},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3344,"fails":0}],"name":""}}
@@ -0,0 +1 @@
{"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":51291357,"rate":10248825.252492458}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3523,"rate":703.9511815710184}},"http_req_sending":{"values":{"max":0.157125,"avg":0.003812594379789994,"min":0.0015,"med":0.002792,"p(50)":0.002792,"p(95)":0.0074957999999999934,"p(99)":0.02257901999999999},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"contains":"time","values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"iteration_duration":{"contains":"time","values":{"avg":5.676752529946061,"min":3.619625,"med":5.395125,"p(50)":5.395125,"p(95)":6.776379799999997,"p(99)":8.692119999999996,"max":48.706125},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.165125,"avg":0.00014973034345728073,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3523,"rate":703.9511815710184}},"http_req_blocked":{"values":{"avg":0.002050076923076931,"min":0.0005,"med":0.000875,"p(50)":0.000875,"p(95)":0.001917,"p(99)":0.0034869999999999923,"max":0.758208},"type":"trend","contains":"time"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3523}},"data_sent":{"contains":"data","values":{"count":1472614,"rate":294251.5938966857},"type":"counter"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":5.610329624183942,"min":3.567292,"med":5.331666,"p(50)":5.331666,"p(95)":6.672999999999999,"p(99)":8.570651519999997,"max":48.642916},"thresholds":{"max>=0":{"ok":true}}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.375833,"avg":0.02323795061027531,"min":0.008334,"med":0.018667,"p(50)":0.018667,"p(95)":0.0461669,"p(99)":0.08783427999999999}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7046,"fails":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":3.545,"med":5.30575,"p(50)":5.30575,"p(95)":6.6194956000000005,"p(99)":8.493257499999999,"max":48.619125,"avg":5.583279079193863}},"http_req_duration":{"contains":"time","values":{"p(99)":8.570651519999997,"max":48.642916,"avg":5.610329624183942,"min":3.567292,"med":5.331666,"p(50)":5.331666,"p(95)":6.672999999999999},"type":"trend"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3523,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3523,"fails":0}],"name":"","path":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5004.608405}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2614},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2614,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"testRunDurationMs":5000.092127,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"data_sent":{"contains":"data","values":{"count":1092652,"rate":218526.37356415653},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"count":2614,"rate":522.7903673783649}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":2.7415035399999996,"max":5.22225,"avg":1.8430075065034452,"min":1.563875,"med":1.789688,"p(50)":1.789688,"p(95)":2.23730175}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.003416129686304529,"min":0.001541,"med":0.002709,"p(50)":0.002709,"p(95)":0.006431699999999995,"p(99)":0.012875,"max":0.059167}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":5228,"fails":0}},"http_req_tls_handshaking":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.023220708110175934,"min":0.01175,"med":0.019292,"p(50)":0.019292,"p(95)":0.044362049999999986,"p(99)":0.06488078999999998,"max":0.240833}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":1.8163706687069614,"min":1.530416,"med":1.766729,"p(50)":1.766729,"p(95)":2.1934084499999993,"p(99)":2.67899904,"max":4.935333}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.124125,"avg":0.00004748469778117827,"min":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":2.23730175,"p(99)":2.7415035399999996,"max":5.22225,"avg":1.8430075065034452,"min":1.563875,"med":1.789688,"p(50)":1.789688},"thresholds":{"max>=0":{"ok":true}}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001,"p(95)":0.0019583499999999998,"p(99)":0.003203539999999999,"max":0.54375,"avg":0.001391233741392495,"min":0.000541,"med":0.001}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":522.7903673783649,"count":2614}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":1.9095807157612832,"min":1.615583,"med":1.850167,"p(50)":1.850167,"p(95)":2.3316375999999996,"p(99)":2.8422507899999996,"max":6.042708}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2614}},"data_received":{"values":{"count":38057226,"rate":7611304.958661614},"type":"counter","contains":"data"}}}
@@ -0,0 +1 @@
{"state":{"isStdErrTTY":false,"testRunDurationMs":5014.521253,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02380628,"max":0.219875,"avg":0.004594586503473429,"min":0.001584,"med":0.003333,"p(50)":0.003333,"p(95)":0.009916900000000001}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":26.500153423089635,"min":7.866458,"med":23.110541,"p(50)":23.110541,"p(95)":54.84152049999996,"p(99)":88.09617749999998,"max":120.399417}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":120.224667,"avg":26.387985808799147,"min":7.779291,"med":23.019416,"p(50)":23.019416,"p(95)":54.72934559999996,"p(99)":87.95581326}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.96975,"avg":0.005644528283162502,"min":0.0005,"med":0.001042,"p(50)":0.001042,"p(95)":0.002375,"p(99)":0.007509739999999991}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":0.323459,"avg":0.001172897122064175,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":44011857,"rate":8776881.137689736}},"data_sent":{"contains":"data","values":{"rate":251990.9551174057,"count":1263614},"type":"counter"},"iterations":{"contains":"default","values":{"count":3023,"rate":602.8491749220233},"type":"counter"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"max":120.281458,"avg":26.419748478994347,"min":7.805542,"med":23.041,"p(50)":23.041,"p(95)":54.76722919999996,"p(99)":88.00283373999999},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3023,"rate":602.8491749220233}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3023}},"vus_max":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"checks":{"values":{"rate":1,"passes":6046,"fails":0},"type":"rate","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.05807469999999999,"p(99)":0.11203276,"max":0.827417,"avg":0.027168083691697036,"min":0.007375,"med":0.0205,"p(50)":0.0205}},"http_req_duration":{"contains":"time","values":{"p(50)":23.041,"p(95)":54.76722919999996,"p(99)":88.00283373999999,"max":120.281458,"avg":26.419748478994347,"min":7.805542,"med":23.041},"type":"trend"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0}}},"root_group":{"groups":[],"checks":[{"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3023},{"path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3023,"fails":0,"name":"full page"}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e"},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5003.234544,"isStdOutTTY":false},"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":1487244,"rate":297256.5021529001}},"http_req_waiting":{"type":"trend","contains":"time","values":{"max":47.142292,"avg":5.52966184710512,"min":3.569583,"med":5.294499999999999,"p(50)":5.294499999999999,"p(95)":6.43459815,"p(99)":8.00445143}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.002667,"p(95)":0.006125,"p(99)":0.01716069,"max":0.191708,"avg":0.003529186059584083,"min":0.001625,"med":0.002667}},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.000875,"p(50)":0.000875,"p(95)":0.00175,"p(99)":0.00375,"max":0.691958,"avg":0.0017067211916807312,"min":0.0005}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":5.5551518057897535,"min":3.591375,"med":5.31875,"p(50)":5.31875,"p(95)":6.47629555,"p(99)":8.04724588,"max":47.174583},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":6.47629555,"p(99)":8.04724588,"max":47.174583,"avg":5.5551518057897535,"min":3.591375,"med":5.31875,"p(50)":5.31875}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3558,"rate":711.1399573035887}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"contains":"time","values":{"p(99)":0,"max":0.148709,"avg":0.00013642973580663294,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.021960772625070294,"min":0.008708,"med":0.018125,"p(50)":0.018125,"p(95)":0.04152504999999997,"p(99)":0.08883999999999997,"max":0.253625}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3558}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7116,"fails":0}},"data_received":{"type":"counter","contains":"data","values":{"count":51800922,"rate":10353486.638382949}},"iteration_duration":{"values":{"p(99)":8.12663325,"max":47.25275,"avg":5.619875662169743,"min":3.641292,"med":5.377583,"p(50)":5.377583,"p(95)":6.563735799999999},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":3558,"rate":711.1399573035887}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3558,"fails":0,"name":"status 200","path":"::status 200"},{"passes":3558,"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed"}]}}
@@ -0,0 +1 @@
{"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":433.00895844180155}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.0040625,"p(50)":0.0040625,"p(95)":0.011920199999999995,"p(99)":0.023254589999999995,"max":0.455875,"avg":0.005743883999999999,"min":0.00225}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":5.3019307399999995,"max":15.476708,"avg":2.2201656080000007,"min":1.780708,"med":2.0443119999999997,"p(50)":2.0443119999999997,"p(95)":3.1018523999999994}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":433.00895844180155}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_blocked":{"values":{"p(95)":0.002416,"p(99)":0.004516659999999985,"max":0.473958,"avg":0.0019196249999999927,"min":0.000584,"med":0.001083,"p(50)":0.001083},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":2.12425,"p(95)":3.2528919499999995,"p(99)":5.5812415799999995,"max":15.692167,"avg":2.3058623410000023,"min":1.833125,"med":2.12425}},"http_req_connecting":{"type":"trend","contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.112209,"avg":0.00011220900000000001,"min":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":162811.3683741174}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":2.243771140999998,"min":1.794375,"med":2.0628745,"p(50)":2.0628745,"p(95)":3.1475441,"p(99)":5.442005829999999,"max":15.536875},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"passes":0,"fails":1000,"rate":0}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":212174.38963648275}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_duration":{"values":{"p(95)":3.1475441,"p(99)":5.442005829999999,"max":15.536875,"avg":2.243771140999998,"min":1.794375,"med":2.0628745,"p(50)":2.0628745},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.014375,"p(50)":0.014375,"p(95)":0.037335099999999996,"p(99)":0.06266208999999996,"max":0.161583,"avg":0.017861648999999973,"min":0.009583}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2309.421042}}
@@ -0,0 +1 @@
{"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1641.939751},"metrics":{"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.0777412499999999,"max":0.71725,"avg":0.0036357499999999992,"min":0,"med":0}},"iterations":{"type":"counter","contains":"default","values":{"rate":609.0357453073198,"count":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.056186335000017,"min":11.624417,"med":24.996354500000002,"p(50)":24.996354500000002,"p(95)":37.32970655,"p(99)":68.02312758,"max":78.769333}},"data_sent":{"type":"counter","contains":"data","values":{"rate":228997.44023555223,"count":376000}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":298427.5152005867}},"iteration_duration":{"values":{"avg":26.15557987400002,"min":11.70125,"med":25.074292,"p(50)":25.074292,"p(95)":37.47407325,"p(99)":68.08472457999999,"max":78.8375},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":26.08076150099999,"min":11.64675,"med":25.024167,"p(50)":25.024167,"p(95)":37.351916349999996,"p(99)":68.03714858000001,"max":78.784208},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_reqs":{"values":{"count":1000,"rate":609.0357453073198},"type":"counter","contains":"default"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.109958,"avg":0.01590642599999998,"min":0.00475,"med":0.0137915,"p(50)":0.0137915,"p(95)":0.030137499999999987,"p(99)":0.04887792}},"http_req_sending":{"values":{"avg":0.008668740000000003,"min":0.002375,"med":0.003875,"p(50)":0.003875,"p(95)":0.009877049999999998,"p(99)":0.1565754999999997,"max":0.739583},"type":"trend","contains":"time"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_duration":{"contains":"time","values":{"p(99)":68.03714858000001,"max":78.784208,"avg":26.08076150099999,"min":11.64675,"med":25.024167,"p(50)":25.024167,"p(95)":37.351916349999996},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.013573354000000048,"min":0.000458,"med":0.000959,"p(50)":0.000959,"p(95)":0.002,"p(99)":0.6113774199999998,"max":1.501709}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1619.940084},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_reqs":{"contains":"default","values":{"count":1000,"rate":617.3067818229257},"type":"counter"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.015791837999999985,"min":0.004833,"med":0.012833,"p(50)":0.012833,"p(95)":0.033309749999999985,"p(99)":0.05079532999999999,"max":0.246583}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.0021690499999999983,"p(99)":0.004086069999999998,"max":1.045334,"avg":0.005220708000000031,"min":0.0005,"med":0.001,"p(50)":0.001}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":56.553375,"avg":6.405489956000002,"min":3.001041,"med":5.936813,"p(50)":5.936813,"p(95)":8.140912499999999,"p(99)":11.29438774999999},"thresholds":{"max>=0":{"ok":true}}},"data_sent":{"contains":"data","values":{"count":376000,"rate":232107.3499654201},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"rate":617.3067818229257,"count":1000}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"contains":"time","values":{"avg":6.384549774999999,"min":2.987291,"med":5.919207999999999,"p(50)":5.919207999999999,"p(95)":8.063758349999999,"p(99)":11.255386579999989,"max":56.530417},"type":"trend"},"checks":{"contains":"default","values":{"rate":1,"passes":1000,"fails":0},"type":"rate"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":302480.32309323363}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":56.553375,"avg":6.405489956000002,"min":3.001041,"med":5.936813,"p(50)":5.936813,"p(95)":8.140912499999999,"p(99)":11.29438774999999}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000983918,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.25525}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.001916,"med":0.00375,"p(50)":0.00375,"p(95)":0.010711049999999998,"p(99)":0.02201041999999999,"max":0.190375,"avg":0.005148342999999997}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":3.041292,"med":5.990083,"p(50)":5.990083,"p(95)":8.2630048,"p(99)":11.43236907999999,"max":56.638166,"avg":6.469330499999993}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2163.683751},"metrics":{"vus":{"type":"gauge","contains":"default","values":{"max":1,"value":1,"min":1}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_sent":{"values":{"count":376000,"rate":173777.70657390307},"type":"counter","contains":"data"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":462.17475152633796}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.705,"med":2.0068539999999997,"p(50)":2.0068539999999997,"p(95)":2.6988586499999996,"p(99)":3.51352959,"max":5.30425,"avg":2.101649129999998},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":462.17475152633796}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":226465.6282479056}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.0797107400000012,"min":1.690209,"med":1.9869585,"p(50)":1.9869585,"p(95)":2.6669768,"p(99)":3.46678375,"max":5.193375}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":2.0068539999999997,"p(50)":2.0068539999999997,"p(95)":2.6988586499999996,"p(99)":3.51352959,"max":5.30425,"avg":2.101649129999998,"min":1.705}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":2.7850895499999995,"p(99)":3.5957780899999996,"max":5.510958,"avg":2.160288035000002,"min":1.751625,"med":2.054042,"p(50)":2.054042}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.001,"p(95)":0.002044049999999998,"p(99)":0.003,"max":0.429042,"avg":0.0015876289999999917,"min":0.000542,"med":0.001}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003875,"p(95)":0.009462199999999995,"p(99)":0.020298239999999995,"max":0.105958,"avg":0.004893426999999993,"min":0.002084,"med":0.003875}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.099833,"avg":0.000099833,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.04704184,"max":0.113375,"avg":0.017044963,"min":0.009333,"med":0.014437499999999999,"p(50)":0.014437499999999999,"p(95)":0.031713099999999994}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":1640.780209,"isStdOutTTY":false},"metrics":{"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":298638.41440325417}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_receiving":{"contains":"time","values":{"max":0.142792,"avg":0.016537924999999988,"min":0.004708,"med":0.0141875,"p(50)":0.0141875,"p(95)":0.03200205,"p(99)":0.05542558999999999},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":40.06294794999998,"p(99)":69.202682,"max":78.869084,"avg":26.132035742,"min":11.154875,"med":25.0128125,"p(50)":25.0128125}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.03107947000002,"min":11.043875,"med":24.907958999999998,"p(50)":24.907958999999998,"p(95)":40.00222464999998,"p(99)":69.10328408,"max":78.803375}},"http_req_duration{expected_response:true}":{"values":{"avg":26.05335018599999,"min":11.061334,"med":24.9315625,"p(50)":24.9315625,"p(95)":40.01309999999998,"p(99)":69.13171032999999,"max":78.820375},"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":229159.2730931093}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.002043099999999998,"p(99)":0.6220609199999997,"max":1.177708,"avg":0.01313667800000005,"min":0.0005,"med":0.000958,"p(50)":0.000958}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.04519907999999997,"max":0.123667,"avg":0.005732790999999992,"min":0.002083,"med":0.003958,"p(50)":0.003958,"p(95)":0.011083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":69.13171032999999,"max":78.820375,"avg":26.05335018599999,"min":11.061334,"med":24.9315625,"p(50)":24.9315625,"p(95)":40.01309999999998}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":609.4661518433759,"count":1000}},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_connecting":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0.12758323999999996,"max":0.255375,"avg":0.0023912500000000006,"min":0},"type":"trend","contains":"time"},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iterations":{"contains":"default","values":{"count":1000,"rate":609.4661518433759},"type":"counter"}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1672.543709},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":5.9296665,"p(95)":9.039264249999997,"p(99)":20.011489579999996,"max":59.028666,"avg":6.612037893000003,"min":4.708042,"med":5.9296665}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":1000,"rate":0,"passes":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.612037893000003,"min":4.708042,"med":5.9296665,"p(50)":5.9296665,"p(95)":9.039264249999997,"p(99)":20.011489579999996,"max":59.028666},"thresholds":{"max>=0":{"ok":true}}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":224807.27886316783}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_req_tls_handshaking":{"values":{"max":0,"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":597.8916991041698}},"iteration_duration":{"values":{"min":4.757791,"med":5.984916500000001,"p(50)":5.984916500000001,"p(95)":9.186197899999994,"p(99)":20.17459816,"max":59.110667,"avg":6.680733336999996},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":597.8916991041698}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":1000}},"data_received":{"contains":"data","values":{"count":490000,"rate":292966.9325610432},"type":"counter"},"http_req_sending":{"values":{"p(95)":0.013849699999999986,"p(99)":0.026933249999999985,"max":0.178125,"avg":0.005683878999999994,"min":0.002083,"med":0.003959,"p(50)":0.003959},"type":"trend","contains":"time"},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(99)":19.933702169999997,"max":59.005083,"avg":6.588747367000007,"min":4.691125,"med":5.9102705,"p(50)":5.9102705,"p(95)":8.996960749999996}},"http_req_blocked":{"values":{"max":0.612292,"avg":0.003701035999999989,"min":0.000583,"med":0.000959,"p(50)":0.000959,"p(95)":0.0025440499999999982,"p(99)":0.006561159999999983},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.154291,"avg":0.0005304580000000001,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.017606646999999996,"min":0.005208,"med":0.01275,"p(50)":0.01275,"p(95)":0.0412941,"p(99)":0.09343823999999998,"max":0.25175}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2327.550376},"metrics":{"http_req_connecting":{"values":{"p(99)":0,"max":0.109417,"avg":0.000109417,"min":0,"med":0,"p(50)":0,"p(95)":0},"type":"trend","contains":"time"},"http_req_sending":{"values":{"p(95)":0.013216349999999991,"p(99)":0.024268749999999985,"max":0.209459,"avg":0.005603398000000001,"min":0.002292,"med":0.003958,"p(50)":0.003958},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.3239004549999986,"min":1.764875,"med":2.11125,"p(50)":2.11125,"p(95)":3.3807003,"p(99)":5.19731083,"max":19.04}},"http_req_duration":{"contains":"time","values":{"max":18.280416,"avg":2.259913190999999,"min":1.728292,"med":2.0561455,"p(50)":2.0561455,"p(95)":3.27103335,"p(99)":4.831108829999998},"type":"trend"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.235650339000002,"min":1.714916,"med":2.0361875,"p(50)":2.0361875,"p(95)":3.223722599999999,"p(99)":4.774236249999999,"max":18.209875}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.218208,"avg":0.01865945399999998,"min":0.009458,"med":0.0145205,"p(50)":0.0145205,"p(95)":0.039417,"p(99)":0.07346241999999996}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":210521.75929359993}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"vus_max":{"type":"gauge","contains":"default","values":{"min":1,"max":1,"value":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":18.280416,"avg":2.259913190999999,"min":1.728292,"med":2.0561455,"p(50)":2.0561455,"p(95)":3.27103335,"p(99)":4.831108829999998},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"rate":429.6362434563264,"count":1000}},"data_sent":{"type":"counter","contains":"data","values":{"rate":161543.22753957871,"count":376000}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":429.6362434563264}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.466042,"avg":0.0018335679999999929,"min":0.000625,"med":0.001125,"p(50)":0.001125,"p(95)":0.002377049999999998,"p(99)":0.004589249999999994}}}}
@@ -0,0 +1 @@
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1699.896126},"metrics":{"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0,"p(50)":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":27.017318861000003,"min":12.295583,"med":25.5844795,"p(50)":25.5844795,"p(95)":40.35386454999999,"p(99)":73.69158466999998,"max":90.147},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":40.35386454999999,"p(99)":73.69158466999998,"max":90.147,"avg":27.017318861000003,"min":12.295583,"med":25.5844795,"p(50)":25.5844795}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_receiving":{"contains":"time","values":{"med":0.014417,"p(50)":0.014417,"p(95)":0.036181549999999986,"p(99)":0.06034383999999999,"max":0.096625,"avg":0.016866206999999998,"min":0.004667},"type":"trend"},"data_sent":{"type":"counter","contains":"data","values":{"rate":221189.98581681572,"count":376000}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":26.994032220000012,"min":12.28325,"med":25.568834000000003,"p(50)":25.568834000000003,"p(95)":40.336578499999995,"p(99)":73.67144041999998,"max":90.0965}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":25.6364585,"p(95)":40.40026729999999,"p(99)":73.74738834,"max":90.233458,"avg":27.095294938000006,"min":12.344084,"med":25.6364585}},"http_req_sending":{"values":{"p(95)":0.011679499999999989,"p(99)":0.055858919999999604,"max":0.253875,"avg":0.006420433999999992,"min":0.001875,"med":0.003875,"p(50)":0.003875},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":588.2712388745099}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":588.2712388745099}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":288252.90704850986}},"http_req_blocked":{"contains":"time","values":{"avg":0.013805569000000044,"min":0.000458,"med":0.000959,"p(50)":0.000959,"p(95)":0.002377099999999998,"p(99)":0.6511208399999993,"max":1.073667},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.1504150799999998,"max":0.428084,"avg":0.003984211,"min":0,"med":0}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1494.866334},"metrics":{"http_req_blocked":{"values":{"avg":0.003952613999999986,"min":0.000541,"med":0.000875,"p(50)":0.000875,"p(95)":0.001875,"p(99)":0.003880409999999995,"max":0.781375},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.014153164999999987,"min":0.005333,"med":0.0118545,"p(50)":0.0118545,"p(95)":0.029768749999999983,"p(99)":0.04425624999999999,"max":0.1545}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":5.846854,"p(50)":5.846854,"p(95)":7.029823549999999,"p(99)":8.48984851,"max":10.031167,"avg":5.9711622539999984,"min":4.399042}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.003333,"p(50)":0.003333,"p(95)":0.008462199999999996,"p(99)":0.027675829999999957,"max":0.134125,"avg":0.0044882939999999994,"min":0.002}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":251527.50546859263}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":668.9561315654059}},"checks":{"contains":"default","values":{"passes":1000,"fails":0,"rate":1},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":5.796041499999999,"p(50)":5.796041499999999,"p(95)":6.9658181,"p(99)":8.44333217,"max":9.192083,"avg":5.913922664000003,"min":4.358916}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.199125,"avg":0.000645541,"min":0,"med":0,"p(50)":0}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":6.940322899999999,"p(99)":8.42800324,"max":9.14775,"avg":5.895281205000001,"min":4.342583,"med":5.778063,"p(50)":5.778063}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":327788.5044670489}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"iterations":{"values":{"count":1000,"rate":668.9561315654059},"type":"counter","contains":"default"},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":9.192083,"avg":5.913922664000003,"min":4.358916,"med":5.796041499999999,"p(50)":5.796041499999999,"p(95)":6.9658181,"p(99)":8.44333217},"thresholds":{"max>=0":{"ok":true}}},"vus":{"values":{"max":4,"value":4,"min":4},"type":"gauge","contains":"default"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":1000,"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882"}]}}
+19
View File
@@ -0,0 +1,19 @@
run,scenario,size,concurrency,repeat,duration_s,requests_ok,requests_failed,rps,error_ratio,p50_ms,p95_ms,p99_ms,max_ms,app_cpu_cores,rss_start_mib,rss_end_mib,rss_max_mib,mem_cgroup_end_mib,store_messages_start,store_messages_end,generator_cpu_cores,flags,check_failed,db_cpu_cores,series,cell,attempt,config,replicas,replica_cpus,replica_memory,db_max_connections,step,step_kind,target_rps,sent,missing,dropped_iterations,slo_error_ratio,slo_pass,fail_reason,read_p95_ms,write_p95_ms,me_p95_ms,read_errors,write_errors,me_errors,short_pages,vus_max,generator_throttled_ratio,generator_mem_peak_mib,app_cpu_replica_max,app_cpu_second_max,app_throttled_ratio,app_throttled_ms,app_mem_peak_mib,app_us_per_request,db_throttled_ratio,db_mem_peak_mib,db_us_per_request,lb_cpu_cores,lb_throttled_ratio,cache_cpu_cores,vm_busy_cores,vm_cpu_pressure,db_commits_per_s,db_rollbacks_per_s,db_wal_mib_per_s,db_wal_fsyncs_per_s,db_sessions_new,db_conn_max,db_conn_replica_max,db_aas_cpu,db_aas_wal,db_aas_lock,db_aas_lwlock,db_aas_io,db_aas_other,db_idle_in_tx_mean,pool_busy_share,db_too_many_clients,lb_qtime_ms,lb_ctime_ms,lb_rtime_ms,lb_ttime_ms,lb_scur_max,lb_qcur_max,lb_retries,lb_redispatches,lb_econ,lb_eresp,lb_chkdown,lb_5xx,instances,instance_share_min,instance_share_max,host_swapouts,signs,error_codes,level
1,read,1000,1,1,5.0,2644,0,528.8,0.0,1.781,2.157,2.55,5.288,0.817,125.0,125.0,125.0,118.0,4500,4500,0.118,,0,0.138,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,read,1000,4,1,5.005,3523,0,704.0,0.0,5.332,6.673,8.571,48.643,1.005,125.0,125.0,125.0,114.0,4500,4500,0.151,,0,0.181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3,read,1000,16,1,5.049,3344,0,662.4,0.0,22.049,43.025,63.116,81.416,1.005,125.0,125.0,125.1,115.8,4500,4500,0.151,,0,0.181,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4,write,1000,1,1,2.164,1000,0,462.2,0.0,2.007,2.699,3.514,5.304,0.775,125.0,125.0,125.0,115.9,4600,5600,0.102,,0,0.131,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5,write,1000,4,1,1.673,1000,0,597.9,0.0,5.93,9.039,20.011,59.029,0.99,125.0,125.1,125.1,114.0,5700,6700,0.142,,0,0.209,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,write,1000,16,1,1.641,1000,0,609.5,0.0,24.932,40.013,69.132,78.82,1.008,125.1,125.3,125.3,114.5,6800,7800,0.142,,0,0.223,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7,read,5000,1,1,5.0,2614,0,522.8,0.0,1.79,2.237,2.742,5.222,0.819,125.2,125.2,125.2,117.9,8500,8500,0.115,,0,0.138,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
8,read,5000,4,1,5.003,3558,0,711.1,0.0,5.319,6.476,8.047,47.175,1.004,125.2,125.2,125.2,116.4,8500,8500,0.149,,0,0.178,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
9,read,5000,16,1,5.015,3023,0,602.8,0.0,23.041,54.767,88.003,120.281,1.0,125.2,125.2,125.3,116.5,8500,8500,0.152,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
10,write,5000,1,1,2.328,1000,0,429.6,0.0,2.056,3.271,4.831,18.28,0.765,125.2,125.2,125.2,114.4,8600,9600,0.102,,0,0.145,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
11,write,5000,4,1,1.495,1000,0,669.0,0.0,5.796,6.966,8.443,9.192,0.998,125.2,125.2,125.2,115.8,9700,10700,0.138,,0,0.187,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12,write,5000,16,1,1.7,1000,0,588.3,0.0,25.584,40.354,73.692,90.147,1.008,125.4,125.4,125.5,117.7,10800,11800,0.147,,0,0.206,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
13,read,10000,1,1,5.002,2453,0,490.4,0.0,1.831,2.566,3.48,84.977,0.821,125.2,125.2,125.2,115.8,13500,13500,0.118,,0,0.137,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
14,read,10000,4,1,5.012,3479,0,694.2,0.0,5.339,7.035,9.825,45.539,1.004,125.2,125.2,125.2,115.6,13500,13500,0.152,,0,0.178,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
15,read,10000,16,1,5.02,3245,0,646.5,0.0,21.959,46.243,71.633,114.578,1.005,125.2,125.2,125.3,114.4,13500,13500,0.154,,0,0.182,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
16,write,10000,1,1,2.309,1000,0,433.0,0.0,2.063,3.148,5.442,15.537,0.764,125.2,125.2,125.2,113.7,13600,14600,0.1,,0,0.132,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
17,write,10000,4,1,1.62,1000,0,617.3,0.0,5.937,8.141,11.294,56.553,0.996,125.2,125.3,125.3,115.6,14700,15700,0.13,,0,0.209,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
18,write,10000,16,1,1.642,1000,0,609.0,0.0,25.024,37.352,68.037,78.784,1.008,125.3,125.4,125.4,116.3,15800,16800,0.143,,0,0.212,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1 run scenario size concurrency repeat duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_start_mib rss_end_mib rss_max_mib mem_cgroup_end_mib store_messages_start store_messages_end generator_cpu_cores flags check_failed db_cpu_cores series cell attempt config replicas replica_cpus replica_memory db_max_connections step step_kind target_rps sent missing dropped_iterations slo_error_ratio slo_pass fail_reason read_p95_ms write_p95_ms me_p95_ms read_errors write_errors me_errors short_pages vus_max generator_throttled_ratio generator_mem_peak_mib app_cpu_replica_max app_cpu_second_max app_throttled_ratio app_throttled_ms app_mem_peak_mib app_us_per_request db_throttled_ratio db_mem_peak_mib db_us_per_request lb_cpu_cores lb_throttled_ratio cache_cpu_cores vm_busy_cores vm_cpu_pressure db_commits_per_s db_rollbacks_per_s db_wal_mib_per_s db_wal_fsyncs_per_s db_sessions_new db_conn_max db_conn_replica_max db_aas_cpu db_aas_wal db_aas_lock db_aas_lwlock db_aas_io db_aas_other db_idle_in_tx_mean pool_busy_share db_too_many_clients lb_qtime_ms lb_ctime_ms lb_rtime_ms lb_ttime_ms lb_scur_max lb_qcur_max lb_retries lb_redispatches lb_econ lb_eresp lb_chkdown lb_5xx instances instance_share_min instance_share_max host_swapouts signs error_codes level
2 1 read 1000 1 1 5.0 2644 0 528.8 0.0 1.781 2.157 2.55 5.288 0.817 125.0 125.0 125.0 118.0 4500 4500 0.118 0 0.138
3 2 read 1000 4 1 5.005 3523 0 704.0 0.0 5.332 6.673 8.571 48.643 1.005 125.0 125.0 125.0 114.0 4500 4500 0.151 0 0.181
4 3 read 1000 16 1 5.049 3344 0 662.4 0.0 22.049 43.025 63.116 81.416 1.005 125.0 125.0 125.1 115.8 4500 4500 0.151 0 0.181
5 4 write 1000 1 1 2.164 1000 0 462.2 0.0 2.007 2.699 3.514 5.304 0.775 125.0 125.0 125.0 115.9 4600 5600 0.102 0 0.131
6 5 write 1000 4 1 1.673 1000 0 597.9 0.0 5.93 9.039 20.011 59.029 0.99 125.0 125.1 125.1 114.0 5700 6700 0.142 0 0.209
7 6 write 1000 16 1 1.641 1000 0 609.5 0.0 24.932 40.013 69.132 78.82 1.008 125.1 125.3 125.3 114.5 6800 7800 0.142 0 0.223
8 7 read 5000 1 1 5.0 2614 0 522.8 0.0 1.79 2.237 2.742 5.222 0.819 125.2 125.2 125.2 117.9 8500 8500 0.115 0 0.138
9 8 read 5000 4 1 5.003 3558 0 711.1 0.0 5.319 6.476 8.047 47.175 1.004 125.2 125.2 125.2 116.4 8500 8500 0.149 0 0.178
10 9 read 5000 16 1 5.015 3023 0 602.8 0.0 23.041 54.767 88.003 120.281 1.0 125.2 125.2 125.3 116.5 8500 8500 0.152 0 0.18
11 10 write 5000 1 1 2.328 1000 0 429.6 0.0 2.056 3.271 4.831 18.28 0.765 125.2 125.2 125.2 114.4 8600 9600 0.102 0 0.145
12 11 write 5000 4 1 1.495 1000 0 669.0 0.0 5.796 6.966 8.443 9.192 0.998 125.2 125.2 125.2 115.8 9700 10700 0.138 0 0.187
13 12 write 5000 16 1 1.7 1000 0 588.3 0.0 25.584 40.354 73.692 90.147 1.008 125.4 125.4 125.5 117.7 10800 11800 0.147 0 0.206
14 13 read 10000 1 1 5.002 2453 0 490.4 0.0 1.831 2.566 3.48 84.977 0.821 125.2 125.2 125.2 115.8 13500 13500 0.118 0 0.137
15 14 read 10000 4 1 5.012 3479 0 694.2 0.0 5.339 7.035 9.825 45.539 1.004 125.2 125.2 125.2 115.6 13500 13500 0.152 0 0.178
16 15 read 10000 16 1 5.02 3245 0 646.5 0.0 21.959 46.243 71.633 114.578 1.005 125.2 125.2 125.3 114.4 13500 13500 0.154 0 0.182
17 16 write 10000 1 1 2.309 1000 0 433.0 0.0 2.063 3.148 5.442 15.537 0.764 125.2 125.2 125.2 113.7 13600 14600 0.1 0 0.132
18 17 write 10000 4 1 1.62 1000 0 617.3 0.0 5.937 8.141 11.294 56.553 0.996 125.2 125.3 125.3 115.6 14700 15700 0.13 0 0.209
19 18 write 10000 16 1 1.642 1000 0 609.0 0.0 25.024 37.352 68.037 78.784 1.008 125.3 125.4 125.4 116.3 15800 16800 0.143 0 0.212
+167
View File
@@ -0,0 +1,167 @@
# Нагрузочный замер: метка `unit-of-work-aa`
- Статус: **complete**
- Commit: `b2fb88f`
- Профиль `quick`: размеры 1k, 5k, 10k; клиенты 1, 4, 16; повторов 1; чтение 5 с после 2 с прогрева; запись 1000 после 100
- Лимиты без swap: API 1 CPU / 2g × 1 реплик за HAProxy 1 CPU / 256m, PostgreSQL 4 CPU / 3g, Valkey 2 CPU / 512m; CPU и RSS API — сумма по репликам; значения — медиана (min–max) по повторам
- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1
## Сценарий `read`
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 529 | 1.78 | 2.16 | 2.55 | 5.3 | 0.82 | 0.14 | 125.0 | 4500 | — |
| 1k | 4 | 704 | 5.33 | 6.67 | 8.57 | 48.6 | 1.00 | 0.18 | 125.0 | 4500 | — |
| 1k | 16 | 662 | 22.05 | 43.02 | 63.12 | 81.4 | 1.00 | 0.18 | 125.0 | 4500 | — |
| 5k | 1 | 523 | 1.79 | 2.24 | 2.74 | 5.2 | 0.82 | 0.14 | 125.2 | 8500 | — |
| 5k | 4 | 711 | 5.32 | 6.48 | 8.05 | 47.2 | 1.00 | 0.18 | 125.2 | 8500 | — |
| 5k | 16 | 603 | 23.04 | 54.77 | 88.00 | 120.3 | 1.00 | 0.18 | 125.2 | 8500 | — |
| 10k | 1 | 490 | 1.83 | 2.57 | 3.48 | 85.0 | 0.82 | 0.14 | 125.2 | 13500 | — |
| 10k | 4 | 694 | 5.34 | 7.04 | 9.82 | 45.5 | 1.00 | 0.18 | 125.2 | 13500 | — |
| 10k | 16 | 646 | 21.96 | 46.24 | 71.63 | 114.6 | 1.00 | 0.18 | 125.2 | 13500 | — |
## Сценарий `write`
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 462 | 2.01 | 2.70 | 3.51 | 5.3 | 0.78 | 0.13 | 125.0 | 4600 | — |
| 1k | 4 | 598 | 5.93 | 9.04 | 20.01 | 59.0 | 0.99 | 0.21 | 125.1 | 5700 | — |
| 1k | 16 | 610 | 24.93 | 40.01 | 69.13 | 78.8 | 1.01 | 0.22 | 125.3 | 6800 | — |
| 5k | 1 | 430 | 2.06 | 3.27 | 4.83 | 18.3 | 0.77 | 0.14 | 125.2 | 8600 | — |
| 5k | 4 | 669 | 5.80 | 6.97 | 8.44 | 9.2 | 1.00 | 0.19 | 125.2 | 9700 | — |
| 5k | 16 | 588 | 25.58 | 40.35 | 73.69 | 90.1 | 1.01 | 0.21 | 125.4 | 10800 | — |
| 10k | 1 | 433 | 2.06 | 3.15 | 5.44 | 15.5 | 0.76 | 0.13 | 125.2 | 13600 | — |
| 10k | 4 | 617 | 5.94 | 8.14 | 11.29 | 56.6 | 1.00 | 0.21 | 125.3 | 14700 | — |
| 10k | 16 | 609 | 25.02 | 37.35 | 68.04 | 78.8 | 1.01 | 0.21 | 125.4 | 15800 | — |
## Память и наполнение по размерам
Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`).
| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 4500 | 121.0 | 125.0 | 928 | 0.8 | 0.6 | 331 | 577 | 9 | 184.6 |
| 5k | 8500 | 121.0 | 125.2 | 511 | 1.5 | 1.1 | 322 | 580 | 49 | 184.7 |
| 10k | 13500 | 121.1 | 125.1 | 317 | 2.3 | 1.9 | 328 | 586 | 99 | 184.7 |
## Планы запроса истории
Страница (`limit` профиля) читаемого чата и первого чата каждого фонового уровня. `app` — план запроса приложения (auto_explain). Остальное — тот же запрос с теми же параметрами в psql, в откатываемой транзакции: `psql` — индекс приложения, `generic` — он же с generic plan, `or-cursor` — условие курсора через OR, `no-index` — без индекса, дальше — варианты индекса профиля. Буферы — верхнего узла плана, файлы — `explain-<размер>.txt`.
| Размер | Чат | Страница | После сообщений | Вариант | Узел | shared hit | read | Строк | Время, мс | План |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | read 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 32 | 0 | 51 | 0.147 | custom |
| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.121 | custom |
| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.065 | custom |
| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.072 | generic |
| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 525 | 0 | 51 | 0.136 | custom |
| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.560 | custom |
| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.519 | custom |
| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.055 | custom |
| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 28 | 0 | 51 | 0.240 | custom |
| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 37 | 0 | 51 | 0.106 | custom |
| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.105 | custom |
| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.084 | custom |
| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.069 | generic |
| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 528 | 0 | 51 | 0.146 | custom |
| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.612 | custom |
| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 101 | 0 | 51 | 0.453 | custom |
| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom |
| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 18 | 0 | 51 | 0.156 | custom |
| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.231 | custom |
| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.127 | custom |
| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 50 | 0 | 51 | 0.063 | generic |
| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 51 | 0.207 | custom |
| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 64 | 0 | 51 | 0.127 | custom |
| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.052 | custom |
| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.041 | custom |
| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.032 | custom |
| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.023 | generic |
| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 101 | 0 | 10 | 0.130 | custom |
| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.026 | custom |
| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.017 | custom |
| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 25 | 0 | 51 | 0.100 | custom |
| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.113 | generic |
| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.070 | custom |
| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.081 | generic |
| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2541 | 0 | 51 | 0.431 | custom |
| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 2.186 | custom |
| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 186 | 0 | 51 | 2.057 | custom |
| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.108 | custom |
| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.112 | generic |
| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 45 | 0 | 51 | 0.253 | custom |
| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.109 | generic |
| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.076 | custom |
| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.076 | generic |
| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 530 | 0 | 51 | 0.143 | custom |
| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.643 | custom |
| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 186 | 0 | 51 | 0.483 | custom |
| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.058 | custom |
| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.114 | generic |
| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.124 | custom |
| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.072 | custom |
| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.067 | generic |
| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.290 | custom |
| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 79 | 0 | 51 | 0.143 | custom |
| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.062 | custom |
| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.042 | custom |
| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.040 | custom |
| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.032 | generic |
| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 10 | 0.220 | custom |
| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.033 | custom |
| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.021 | custom |
| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 17 | 0 | 51 | 0.184 | custom |
| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.146 | generic |
| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.065 | custom |
| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.077 | generic |
| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 5063 | 0 | 51 | 0.779 | custom |
| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 293 | 0 | 51 | 3.995 | custom |
| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 293 | 0 | 51 | 3.719 | custom |
| 10k | read 10k | middle | 5000 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.052 | custom |
| 10k | read 10k | last | 9900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.144 | generic |
| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.150 | custom |
| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.185 | generic |
| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.057 | custom |
| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.072 | generic |
| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 502 | 0 | 51 | 0.129 | custom |
| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 293 | 0 | 51 | 0.676 | custom |
| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 281 | 0 | 51 | 0.517 | custom |
| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.054 | custom |
| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.126 | generic |
| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.165 | custom |
| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.055 | custom |
| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 48 | 0 | 51 | 0.069 | generic |
| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 293 | 0 | 51 | 0.402 | custom |
| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 91 | 0 | 51 | 0.120 | custom |
| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.049 | custom |
| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.073 | custom |
| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | custom |
| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.035 | generic |
| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 293 | 0 | 10 | 0.313 | custom |
| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.030 | custom |
| 10k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 10 | 0.017 | custom |
## Стоимость записи по вариантам индекса
Вставка порции сообщений во все чаты в пропорции наполнения одной командой, в транзакции, которая откатывается; индекс истории построен заново, перед вставкой `CHECKPOINT`. Значения — медиана (min–max) повторов. «4000 символов» — вставка сообщения максимальной длины из несжимаемого текста.
| Размер | Вариант | Строк вставки | Индекс, МиБ | Байт индекса на сообщение | мкс на сообщение | WAL байт на сообщение | FPI на 1000 | 4000 символов |
|---|---|---|---|---|---|---|---|---|
| 1k | app | 5000 | 0.5 | 60.9 | 5.24 (5.07–6.19) | 488 (488–501) | 20.8 (12.0–20.8) | ok |
| 1k | chat_only | 5000 | 0.1 | 9.5 | 4.97 (4.91–4.97) | 398 (398–399) | 18.2 (18.2–18.2) | ok |
| 1k | covering | 5000 | 1.2 | 159.6 | 5.71 (5.46–6.67) | 689 (689–689) | 24.2 (24.2–24.2) | index row requires 12072 bytes, maximum size is 8191 |
| 1k | none | 5000 | 0.0 | 0.0 | 4.62 (4.47–6.41) | 311 (311–311) | 16.8 (16.8–16.8) | ok |
| 5k | app | 5000 | 0.7 | 60.4 | 5.20 (5.04–5.34) | 512 (510–512) | 22.8 (17.2–22.8) | ok |
| 5k | chat_only | 5000 | 0.1 | 9.0 | 4.92 (4.77–5.05) | 425 (424–425) | 20.2 (19.8–20.6) | ok |
| 5k | covering | 5000 | 1.8 | 160.4 | 5.73 (5.70–8.37) | 719 (718–719) | 26.6 (26.2–26.6) | index row requires 12072 bytes, maximum size is 8191 |
| 5k | none | 5000 | 0.0 | 0.0 | 4.39 (4.28–4.39) | 336 (336–337) | 18.6 (18.4–18.6) | ok |
| 10k | app | 5000 | 1.0 | 59.5 | 5.16 (5.14–5.58) | 536 (536–550) | 30.2 (19.2–30.6) | ok |
| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.93 (4.83–4.96) | 450 (448–452) | 28.0 (26.2–28.6) | ok |
| 10k | covering | 5000 | 2.6 | 160.4 | 5.63 (5.56–8.60) | 748 (747–749) | 34.2 (33.2–34.4) | index row requires 12072 bytes, maximum size is 8191 |
| 10k | none | 5000 | 0.0 | 0.0 | 4.39 (4.36–4.59) | 365 (363–365) | 26.8 (26.2–27.2) | ok |
## Кривая наполнения 10k: запись при росте хранилища, 32 клиента
| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 13500 | 586 | 51.517 | 104.946 | 144.711 | 250.139 | 0.999 | 0.202 | 125.1 | — |
@@ -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,,
1 size chunk messages_before messages_after duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_end_mib mem_cgroup_end_mib generator_cpu_cores flags db_cpu_cores cell attempt
2 1000 1 0 4500 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
3 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
4 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,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1 run scenario size concurrency repeat duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_start_mib rss_end_mib rss_max_mib mem_cgroup_end_mib store_messages_start store_messages_end generator_cpu_cores flags check_failed db_cpu_cores series cell attempt config replicas replica_cpus replica_memory db_max_connections step step_kind target_rps sent missing dropped_iterations slo_error_ratio slo_pass fail_reason read_p95_ms write_p95_ms me_p95_ms read_errors write_errors me_errors short_pages vus_max generator_throttled_ratio generator_mem_peak_mib app_cpu_replica_max app_cpu_second_max app_throttled_ratio app_throttled_ms app_mem_peak_mib app_us_per_request db_throttled_ratio db_mem_peak_mib db_us_per_request lb_cpu_cores lb_throttled_ratio cache_cpu_cores vm_busy_cores vm_cpu_pressure db_commits_per_s db_rollbacks_per_s db_wal_mib_per_s db_wal_fsyncs_per_s db_sessions_new db_conn_max db_conn_replica_max db_aas_cpu db_aas_wal db_aas_lock db_aas_lwlock db_aas_io db_aas_other db_idle_in_tx_mean pool_busy_share db_too_many_clients lb_qtime_ms lb_ctime_ms lb_rtime_ms lb_ttime_ms lb_scur_max lb_qcur_max lb_retries lb_redispatches lb_econ lb_eresp lb_chkdown lb_5xx instances instance_share_min instance_share_max host_swapouts signs error_codes level
2 1 read 1000 1 1 5.0 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
3 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
4 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
5 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
6 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
7 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
8 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
9 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
10 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
11 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
12 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
13 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
14 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
15 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
16 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
17 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
18 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
19 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 | — |
@@ -0,0 +1,673 @@
# План запроса истории: размер 10k
Commit b2fb88f
Читаемый чат — 10000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 10k: first, после 0
duration: 0.166 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 = 'a15252a7-4b4d-4826-b9af-d40b3f396740', $2 = '51'
Limit (cost=0.29..9.63 rows=51 width=153) (actual time=0.040..0.132 rows=51.00 loops=1)
Buffers: shared hit=18
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1832.72 rows=10000 width=153) (actual time=0.038..0.128 rows=51.00 loops=1)
Index Cond: (chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid)
Index Searches: 1
Buffers: shared hit=18
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.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 = 'a15252a7-4b4d-4826-b9af-d40b3f396740', $2 = '2026-10-31 20:35:09.519876+00', $3 = '6819996c-a9b7-49bf-a667-63e22465f335', $4 = '51'
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.038..0.115 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.037..0.112 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 10k: last, после 9900
duration: 0.111 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 = 'a15252a7-4b4d-4826-b9af-d40b3f396740', $2 = '2026-10-31 20:35:21.624448+00', $3 = '11df026f-1d67-40fd-9265-0191805efd2b', $4 = '51'
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.019..0.081 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.019..0.078 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.147 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '7efbb7d2-1786-4de5-9216-ec211d58e49a', $2 = '51'
Limit (cost=0.29..54.21 rows=51 width=153) (actual time=0.024..0.110 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.63 rows=1000 width=153) (actual time=0.024..0.107 rows=51.00 loops=1)
Index Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::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)
### bg 1k: middle, после 500
duration: 0.129 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 = '7efbb7d2-1786-4de5-9216-ec211d58e49a', $2 = '2026-10-31 20:35:09.525761+00', $3 = '34ae19f0-3c97-4690-bc5e-a23eb57bddda', $4 = '51'
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.020..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..218.47 rows=71 width=153) (actual time=0.019..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.131 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 = '7efbb7d2-1786-4de5-9216-ec211d58e49a', $2 = '2026-10-31 20:35:19.321243+00', $3 = 'a8ca10b3-a372-48db-83d1-cb4cab0e70db', $4 = '51'
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.020..0.095 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.47 rows=71 width=153) (actual time=0.020..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=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.157 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 = 'e071a7a6-8832-4ab0-b80e-e5830f099a95', $2 = '51'
Limit (cost=0.29..151.04 rows=51 width=153) (actual time=0.024..0.130 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.88 rows=100 width=153) (actual time=0.024..0.127 rows=51.00 loops=1)
Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::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.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 = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32', $2 = '51'
Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.016..0.040 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.015..0.039 rows=10.00 loops=1)
Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::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)
## Страницы сравнения в 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.72 rows=51 width=153) (actual time=0.007..0.050 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1415.52 rows=5001 width=153) (actual time=0.007..0.047 rows=51.00 loops=1)
Index Cond: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::uuid)))
Index Searches: 1
Buffers: shared hit=54
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.060 ms
Execution Time: 0.056 ms
#### generic
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.009..0.059 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.009..0.056 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.010 ms
Execution Time: 0.069 ms
#### or-cursor
Limit (cost=0.29..18.97 rows=51 width=153) (actual time=0.578..0.614 rows=51.00 loops=1)
Buffers: shared hit=5077
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1832.74 rows=5001 width=153) (actual time=0.578..0.611 rows=51.00 loops=1)
Index Cond: (chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid)
Filter: ((created_at > '2026-10-31 20:35:09.519876+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:35:09.519876+00'::timestamp with time zone) AND (id > '6819996c-a9b7-49bf-a667-63e22465f335'::uuid)))
Rows Removed by Filter: 5000
Index Searches: 1
Buffers: shared hit=5077
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.070 ms
Execution Time: 0.621 ms
#### no-index
Limit (cost=772.11..772.24 rows=51 width=153) (actual time=3.749..3.753 rows=51.00 loops=1)
Buffers: shared hit=294
-> Sort (cost=772.11..784.61 rows=5001 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: 45kB
Buffers: shared hit=294
-> Seq Scan on messages (cost=0.00..605.26 rows=5001 width=153) (actual time=0.248..3.288 rows=5000.00 loops=1)
Filter: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::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.059 ms
Execution Time: 3.760 ms
#### chat_only
Limit (cost=772.11..772.24 rows=51 width=153) (actual time=3.711..3.715 rows=51.00 loops=1)
Buffers: shared hit=294
-> Sort (cost=772.11..784.61 rows=5001 width=153) (actual time=3.710..3.713 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 45kB
Buffers: shared hit=294
-> Seq Scan on messages (cost=0.00..605.26 rows=5001 width=153) (actual time=0.305..3.238 rows=5000.00 loops=1)
Filter: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::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.080 ms
Execution Time: 3.726 ms
#### covering
Limit (cost=0.41..6.19 rows=51 width=153) (actual time=0.005..0.044 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..567.45 rows=5001 width=153) (actual time=0.005..0.041 rows=51.00 loops=1)
Index Cond: ((chat_id = 'a15252a7-4b4d-4826-b9af-d40b3f396740'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.519876+00'::timestamp with time zone, '6819996c-a9b7-49bf-a667-63e22465f335'::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.050 ms
Execution Time: 0.051 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.29..96.23 rows=51 width=153) (actual time=0.007..0.047 rows=51.00 loops=1)
Buffers: shared hit=46
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..940.93 rows=500 width=153) (actual time=0.006..0.045 rows=51.00 loops=1)
Index Cond: ((chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::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.058 ms
Execution Time: 0.054 ms
#### generic
Limit (cost=0.29..21.80 rows=7 width=153) (actual time=0.012..0.054 rows=51.00 loops=1)
Buffers: shared hit=46
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..218.47 rows=71 width=153) (actual time=0.011..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=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 Time: 0.010 ms
Execution Time: 0.066 ms
#### or-cursor
Limit (cost=0.29..108.13 rows=51 width=153) (actual time=0.094..0.135 rows=51.00 loops=1)
Buffers: shared hit=507
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1057.63 rows=500 width=153) (actual time=0.094..0.132 rows=51.00 loops=1)
Index Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid)
Filter: ((created_at > '2026-10-31 20:35:09.525761+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:35:09.525761+00'::timestamp with time zone) AND (id > '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=507
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.141 ms
#### no-index
Limit (cost=554.43..554.56 rows=51 width=153) (actual time=1.044..1.047 rows=51.00 loops=1)
Buffers: shared hit=294
-> Sort (cost=554.43..555.68 rows=500 width=153) (actual time=1.043..1.045 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.75 rows=500 width=153) (actual time=0.530..0.995 rows=500.00 loops=1)
Filter: ((chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::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.104 ms
Execution Time: 1.061 ms
#### chat_only
Limit (cost=351.59..351.72 rows=51 width=153) (actual time=0.456..0.460 rows=51.00 loops=1)
Buffers: shared hit=286
-> Sort (cost=351.59..352.84 rows=500 width=153) (actual time=0.456..0.458 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=286
-> Bitmap Heap Scan on messages (cost=15.91..334.91 rows=500 width=153) (actual time=0.083..0.407 rows=500.00 loops=1)
Recheck Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=283
Buffers: shared hit=286
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.018..0.018 rows=1000.00 loops=1)
Index Cond: (chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.046 ms
Execution Time: 0.467 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.006..0.044 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..57.91 rows=500 width=153) (actual time=0.005..0.041 rows=51.00 loops=1)
Index Cond: ((chat_id = '7efbb7d2-1786-4de5-9216-ec211d58e49a'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:35:09.525761+00'::timestamp with time zone, '34ae19f0-3c97-4690-bc5e-a23eb57bddda'::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.040 ms
Execution Time: 0.051 ms
### bg 100: first, после 0
#### psql
Limit (cost=0.29..151.04 rows=51 width=153) (actual time=0.005..0.053 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..295.88 rows=100 width=153) (actual time=0.005..0.051 rows=51.00 loops=1)
Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid)
Index Searches: 1
Buffers: shared hit=51
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.060 ms
#### generic
Limit (cost=0.29..53.03 rows=21 width=153) (actual time=0.010..0.064 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..537.81 rows=214 width=153) (actual time=0.009..0.061 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.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.004 ms
Execution Time: 0.072 ms
#### no-index
Limit (cost=467.57..467.70 rows=51 width=153) (actual time=0.405..0.409 rows=51.00 loops=1)
Buffers: shared hit=294
-> Sort (cost=467.57..467.82 rows=100 width=153) (actual time=0.405..0.406 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.013..0.390 rows=100.00 loops=1)
Filter: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::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.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.036 ms
Execution Time: 0.415 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=95
-> 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=95
-> Bitmap Heap Scan on messages (cost=5.06..212.27 rows=100 width=153) (actual time=0.014..0.104 rows=100.00 loops=1)
Recheck Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::uuid)
Heap Blocks: exact=93
Buffers: shared hit=95
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::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.056 ms
Execution Time: 0.131 ms
#### covering
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.006..0.045 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.41..11.66 rows=100 width=153) (actual time=0.006..0.041 rows=51.00 loops=1)
Index Cond: (chat_id = 'e071a7a6-8832-4ab0-b80e-e5830f099a95'::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.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.039 ms
Execution Time: 0.051 ms
### bg 10: first, после 0
#### psql
Limit (cost=0.29..38.26 rows=10 width=153) (actual time=0.006..0.017 rows=10.00 loops=1)
Buffers: shared hit=12
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..38.26 rows=10 width=153) (actual time=0.005..0.016 rows=10.00 loops=1)
Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::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.047 ms
Execution Time: 0.022 ms
#### generic
Limit (cost=0.29..53.03 rows=21 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..537.81 rows=214 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.026 ms
#### no-index
Limit (cost=463.07..463.09 rows=10 width=153) (actual time=0.352..0.353 rows=10.00 loops=1)
Buffers: shared hit=294
-> Sort (cost=463.07..463.09 rows=10 width=153) (actual time=0.352..0.352 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.026..0.349 rows=10.00 loops=1)
Filter: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::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.037 ms
Execution Time: 0.358 ms
#### chat_only
Limit (cost=33.48..33.50 rows=10 width=153) (actual time=0.017..0.018 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=33.48..33.50 rows=10 width=153) (actual time=0.017..0.017 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.004..0.015 rows=10.00 loops=1)
Index Cond: (chat_id = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::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.033 ms
Execution Time: 0.023 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 = '1324dcfc-ac5c-4d64-b55b-d9f8febbff32'::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.040 ms
Execution Time: 0.019 ms
@@ -0,0 +1,731 @@
# План запроса истории: размер 1k
Commit b2fb88f
Читаемый чат — 1000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 1k: first, после 0
duration: 0.112 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID ORDER BY messages.created_at, messages.id
LIMIT $2::INTEGER
Query Parameters: $1 = '86fab098-90d6-41f8-8651-e1a1d894b47f', $2 = '51'
Limit (cost=0.28..24.54 rows=51 width=153) (actual time=0.021..0.080 rows=51.00 loops=1)
Buffers: shared hit=38
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.91 rows=1000 width=153) (actual time=0.020..0.076 rows=51.00 loops=1)
Index Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid)
Index Searches: 1
Buffers: shared hit=38
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.109 ms plan:
Query Text: SELECT messages.id, messages.chat_id, messages.sender_id, messages.text, messages.created_at, array((SELECT message_attachments.attachment_id
FROM message_attachments
WHERE message_attachments.message_id = messages.id ORDER BY message_attachments.position)) AS attachment_ids
FROM messages
WHERE messages.chat_id = $1::UUID AND (messages.created_at, messages.id) > ($2::TIMESTAMP WITH TIME ZONE, $3::UUID) ORDER BY messages.created_at, messages.id
LIMIT $4::INTEGER
Query Parameters: $1 = '86fab098-90d6-41f8-8651-e1a1d894b47f', $2 = '2026-10-31 20:32:35.560579+00', $3 = '56b675e9-b197-40df-b5bf-70da08443b02', $4 = '51'
Limit (cost=0.28..44.89 rows=51 width=153) (actual time=0.012..0.073 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.74 rows=499 width=153) (actual time=0.011..0.070 rows=51.00 loops=1)
Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 1k: last, после 900
duration: 0.190 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 = '86fab098-90d6-41f8-8651-e1a1d894b47f', $2 = '2026-10-31 20:32:38.6944+00', $3 = '15f6b21b-4c28-40a8-b298-28397cbf0a2e', $4 = '51'
Limit (cost=119.82..119.95 rows=51 width=153) (actual time=0.153..0.157 rows=51.00 loops=1)
Buffers: shared hit=27
-> Sort (cost=119.82..120.08 rows=102 width=153) (actual time=0.152..0.154 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=27
-> Bitmap Heap Scan on messages (cost=9.33..116.42 rows=102 width=153) (actual time=0.019..0.115 rows=100.00 loops=1)
Recheck Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.6944+00'::timestamp with time zone, '15f6b21b-4c28-40a8-b298-28397cbf0a2e'::uuid)))
Heap Blocks: exact=18
Buffers: shared hit=21
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.30 rows=102 width=0) (actual time=0.009..0.009 rows=100.00 loops=1)
Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.6944+00'::timestamp with time zone, '15f6b21b-4c28-40a8-b298-28397cbf0a2e'::uuid)))
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=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.097 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 = '4a92e036-81de-4387-8577-bca03fd549a7', $2 = '51'
Limit (cost=0.28..24.54 rows=51 width=153) (actual time=0.010..0.068 rows=51.00 loops=1)
Buffers: shared hit=43
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.91 rows=1000 width=153) (actual time=0.010..0.066 rows=51.00 loops=1)
Index Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::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 1k: middle, после 500
duration: 0.096 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 = '4a92e036-81de-4387-8577-bca03fd549a7', $2 = '2026-10-31 20:32:35.544798+00', $3 = 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f', $4 = '51'
Limit (cost=0.28..44.72 rows=51 width=153) (actual time=0.011..0.066 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.81 rows=501 width=153) (actual time=0.010..0.063 rows=51.00 loops=1)
Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: last, после 900
duration: 0.145 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 = '4a92e036-81de-4387-8577-bca03fd549a7', $2 = '2026-10-31 20:32:38.721445+00', $3 = 'a1f7ba6d-d70d-485c-ba73-68124a4f887b', $4 = '51'
Limit (cost=118.86..118.98 rows=51 width=153) (actual time=0.112..0.116 rows=51.00 loops=1)
Buffers: shared hit=19
-> Sort (cost=118.86..119.10 rows=98 width=153) (actual time=0.112..0.114 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.29..115.62 rows=98 width=153) (actual time=0.013..0.093 rows=100.00 loops=1)
Recheck Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.721445+00'::timestamp with time zone, 'a1f7ba6d-d70d-485c-ba73-68124a4f887b'::uuid)))
Heap Blocks: exact=17
Buffers: shared hit=19
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.26 rows=98 width=0) (actual time=0.007..0.007 rows=100.00 loops=1)
Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:38.721445+00'::timestamp with time zone, 'a1f7ba6d-d70d-485c-ba73-68124a4f887b'::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.197 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 = '20a79c04-8e44-4239-98e4-6e42867bb00b', $2 = '51'
Limit (cost=118.60..118.73 rows=51 width=153) (actual time=0.163..0.167 rows=51.00 loops=1)
Buffers: shared hit=73
-> Sort (cost=118.60..118.85 rows=100 width=153) (actual time=0.162..0.164 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=73
-> Bitmap Heap Scan on messages (cost=9.06..115.28 rows=100 width=153) (actual time=0.023..0.141 rows=100.00 loops=1)
Recheck Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid)
Heap Blocks: exact=70
Buffers: shared hit=73
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1)
Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=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.036 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 = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a', $2 = '51'
Limit (cost=35.31..35.34 rows=10 width=153) (actual time=0.031..0.032 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.31..35.34 rows=10 width=153) (actual time=0.031..0.031 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.15 rows=10 width=153) (actual time=0.013..0.028 rows=10.00 loops=1)
Recheck Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1)
Index Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::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..44.89 rows=51 width=153) (actual time=0.007..0.060 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.74 rows=499 width=153) (actual time=0.007..0.056 rows=51.00 loops=1)
Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.057 ms
Execution Time: 0.067 ms
#### generic
Limit (cost=0.28..7.93 rows=2 width=153) (actual time=0.015..0.066 rows=51.00 loops=1)
Buffers: shared hit=52
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..92.03 rows=24 width=153) (actual time=0.014..0.063 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=52
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.010 ms
Execution Time: 0.079 ms
#### or-cursor
Limit (cost=0.28..48.89 rows=51 width=153) (actual time=0.082..0.126 rows=51.00 loops=1)
Buffers: shared hit=533
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.90 rows=499 width=153) (actual time=0.081..0.123 rows=51.00 loops=1)
Index Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid)
Filter: ((created_at > '2026-10-31 20:32:35.560579+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:32:35.560579+00'::timestamp with time zone) AND (id > '56b675e9-b197-40df-b5bf-70da08443b02'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=533
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.132 ms
#### no-index
Limit (cost=202.88..203.01 rows=51 width=153) (actual time=0.572..0.576 rows=51.00 loops=1)
Buffers: shared hit=100
-> Sort (cost=202.88..204.13 rows=499 width=153) (actual time=0.572..0.574 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 42kB
Buffers: shared hit=100
-> Seq Scan on messages (cost=0.00..186.24 rows=499 width=153) (actual time=0.075..0.510 rows=500.00 loops=1)
Filter: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid)))
Rows Removed by Filter: 4000
Buffers: shared hit=100
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.582 ms
#### chat_only
Limit (cost=157.54..157.67 rows=51 width=153) (actual time=0.493..0.497 rows=51.00 loops=1)
Buffers: shared hit=103
-> Sort (cost=157.54..158.79 rows=499 width=153) (actual time=0.493..0.495 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 42kB
Buffers: shared hit=103
-> Bitmap Heap Scan on messages (cost=15.91..140.89 rows=499 width=153) (actual time=0.063..0.432 rows=500.00 loops=1)
Recheck Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=100
Buffers: shared hit=103
-> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.019..0.019 rows=1000.00 loops=1)
Index Cond: (chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.037 ms
Execution Time: 0.503 ms
#### covering
Limit (cost=0.28..6.16 rows=51 width=153) (actual time=0.005..0.045 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.042 rows=51.00 loops=1)
Index Cond: ((chat_id = '86fab098-90d6-41f8-8651-e1a1d894b47f'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.560579+00'::timestamp with time zone, '56b675e9-b197-40df-b5bf-70da08443b02'::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.042 ms
Execution Time: 0.051 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.28..44.72 rows=51 width=153) (actual time=0.012..0.062 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..436.81 rows=501 width=153) (actual time=0.012..0.058 rows=51.00 loops=1)
Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::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.058 ms
Execution Time: 0.072 ms
#### generic
Limit (cost=0.28..7.93 rows=2 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.28..92.03 rows=24 width=153) (actual time=0.009..0.053 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.006 ms
Execution Time: 0.063 ms
#### or-cursor
Limit (cost=0.28..48.70 rows=51 width=153) (actual time=0.076..0.116 rows=51.00 loops=1)
Buffers: shared hit=540
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..475.93 rows=501 width=153) (actual time=0.076..0.114 rows=51.00 loops=1)
Index Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid)
Filter: ((created_at > '2026-10-31 20:32:35.544798+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:32:35.544798+00'::timestamp with time zone) AND (id > 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=540
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.044 ms
Execution Time: 0.121 ms
#### no-index
Limit (cost=202.98..203.11 rows=51 width=153) (actual time=0.486..0.490 rows=51.00 loops=1)
Buffers: shared hit=100
-> Sort (cost=202.98..204.23 rows=501 width=153) (actual time=0.486..0.488 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=100
-> Seq Scan on messages (cost=0.00..186.27 rows=501 width=153) (actual time=0.070..0.431 rows=500.00 loops=1)
Filter: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid)))
Rows Removed by Filter: 4000
Buffers: shared hit=100
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.043 ms
Execution Time: 0.497 ms
#### chat_only
Limit (cost=157.64..157.76 rows=51 width=153) (actual time=0.436..0.440 rows=51.00 loops=1)
Buffers: shared hit=103
-> Sort (cost=157.64..158.89 rows=501 width=153) (actual time=0.436..0.437 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=103
-> Bitmap Heap Scan on messages (cost=15.91..140.92 rows=501 width=153) (actual time=0.053..0.382 rows=500.00 loops=1)
Recheck Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=100
Buffers: shared hit=103
-> Bitmap Index Scan on bench_variant (cost=0.00..15.78 rows=1000 width=0) (actual time=0.012..0.012 rows=1000.00 loops=1)
Index Cond: (chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.045 ms
Execution Time: 0.446 ms
#### covering
Limit (cost=0.28..6.14 rows=51 width=153) (actual time=0.006..0.045 rows=51.00 loops=1)
Buffers: shared hit=4
-> Index Only Scan using bench_variant on messages (cost=0.28..57.82 rows=501 width=153) (actual time=0.006..0.043 rows=51.00 loops=1)
Index Cond: ((chat_id = '4a92e036-81de-4387-8577-bca03fd549a7'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:32:35.544798+00'::timestamp with time zone, 'a727e0c7-e3cb-4ce8-bff7-59e9c11b7c6f'::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.052 ms
### bg 100: first, после 0
#### psql
Limit (cost=118.60..118.73 rows=51 width=153) (actual time=0.118..0.123 rows=51.00 loops=1)
Buffers: shared hit=73
-> Sort (cost=118.60..118.85 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=73
-> Bitmap Heap Scan on messages (cost=9.06..115.28 rows=100 width=153) (actual time=0.022..0.103 rows=100.00 loops=1)
Recheck Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid)
Heap Blocks: exact=70
Buffers: shared hit=73
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..9.03 rows=100 width=0) (actual time=0.010..0.010 rows=100.00 loops=1)
Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=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.064 ms
Execution Time: 0.136 ms
#### generic
Limit (cost=0.28..21.54 rows=7 width=153) (actual time=0.009..0.050 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.28..215.90 rows=71 width=153) (actual time=0.008..0.046 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.004 ms
Execution Time: 0.057 ms
#### no-index
Limit (cost=161.07..161.20 rows=51 width=153) (actual time=0.196..0.200 rows=51.00 loops=1)
Buffers: shared hit=100
-> Sort (cost=161.07..161.32 rows=100 width=153) (actual time=0.196..0.197 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=100
-> Seq Scan on messages (cost=0.00..157.75 rows=100 width=153) (actual time=0.004..0.182 rows=100.00 loops=1)
Filter: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid)
Rows Removed by Filter: 4400
Buffers: shared hit=100
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.206 ms
#### chat_only
Limit (cost=114.60..114.73 rows=51 width=153) (actual time=0.107..0.111 rows=51.00 loops=1)
Buffers: shared hit=72
-> Sort (cost=114.60..114.85 rows=100 width=153) (actual time=0.107..0.109 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=72
-> Bitmap Heap Scan on messages (cost=5.06..111.28 rows=100 width=153) (actual time=0.014..0.093 rows=100.00 loops=1)
Recheck Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::uuid)
Heap Blocks: exact=70
Buffers: shared hit=72
-> Bitmap Index Scan on bench_variant (cost=0.00..5.03 rows=100 width=0) (actual time=0.005..0.005 rows=100.00 loops=1)
Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::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.054 ms
Execution Time: 0.119 ms
#### covering
Limit (cost=0.28..6.02 rows=51 width=153) (actual time=0.005..0.040 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.005..0.038 rows=51.00 loops=1)
Index Cond: (chat_id = '20a79c04-8e44-4239-98e4-6e42867bb00b'::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.038 ms
Execution Time: 0.047 ms
### bg 10: first, после 0
#### psql
Limit (cost=35.31..35.34 rows=10 width=153) (actual time=0.020..0.021 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.31..35.34 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..35.15 rows=10 width=153) (actual time=0.009..0.018 rows=10.00 loops=1)
Recheck Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::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 = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::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.042 ms
Execution Time: 0.031 ms
#### generic
Limit (cost=0.28..21.54 rows=7 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.28..215.90 rows=71 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.004 ms
Execution Time: 0.026 ms
#### no-index
Limit (cost=156.57..156.59 rows=10 width=153) (actual time=0.127..0.128 rows=10.00 loops=1)
Buffers: shared hit=100
-> Sort (cost=156.57..156.59 rows=10 width=153) (actual time=0.126..0.127 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=100
-> Seq Scan on messages (cost=0.00..156.40 rows=10 width=153) (actual time=0.008..0.124 rows=10.00 loops=1)
Filter: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::uuid)
Rows Removed by Filter: 4490
Buffers: shared hit=100
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.132 ms
#### chat_only
Limit (cost=35.31..35.34 rows=10 width=153) (actual time=0.021..0.022 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=35.31..35.34 rows=10 width=153) (actual time=0.020..0.021 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.15 rows=10 width=153) (actual time=0.009..0.018 rows=10.00 loops=1)
Recheck Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::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 = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::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.050 ms
Execution Time: 0.030 ms
#### covering
Limit (cost=0.28..4.61 rows=10 width=153) (actual time=0.005..0.013 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.012 rows=10.00 loops=1)
Index Cond: (chat_id = 'ed5c39bf-15e3-48b5-bb93-a93544b7da4a'::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.035 ms
Execution Time: 0.018 ms
@@ -0,0 +1,693 @@
# План запроса истории: размер 5k
Commit b2fb88f
Читаемый чат — 5000 сообщений; фоновые чаты: 2 × 1k, 10 × 100, 50 × 10.
Страница — `limit` профиля; «после» — сколько сообщений чата до
страницы.
## Планы приложения
auto_explain (ANALYZE, BUFFERS, TIMING): запрос, параметры и план,
с которыми его выполнило приложение (prepared statement asyncpg).
### read 5k: first, после 0
duration: 0.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 = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c', $2 = '51'
Limit (cost=0.29..11.43 rows=51 width=153) (actual time=0.035..0.104 rows=51.00 loops=1)
Buffers: shared hit=27
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1092.83 rows=5000 width=153) (actual time=0.034..0.100 rows=51.00 loops=1)
Index Cond: (chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::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 5k: middle, после 2500
duration: 0.130 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 = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c', $2 = '2026-10-31 20:33:47.697992+00', $3 = 'd0685e16-8d05-433e-94b2-52f7f33fc60d', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.021..0.099 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.020..0.097 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### read 5k: last, после 4900
duration: 0.119 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 = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c', $2 = '2026-10-31 20:33:55.782721+00', $3 = '56aa58ee-98f4-437c-86bd-dc713751a74e', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.024..0.088 rows=51.00 loops=1)
Buffers: shared hit=53
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.023..0.085 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=53
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: first, после 0
duration: 0.118 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 = '32b1f6b8-cb91-4797-90f1-11562fd0d15c', $2 = '51'
Limit (cost=0.29..39.43 rows=51 width=153) (actual time=0.021..0.087 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..767.87 rows=1000 width=153) (actual time=0.021..0.084 rows=51.00 loops=1)
Index Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 1k: middle, после 500
duration: 0.122 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 = '32b1f6b8-cb91-4797-90f1-11562fd0d15c', $2 = '2026-10-31 20:33:47.678256+00', $3 = '5b0bf7b2-94b1-471b-b626-e907cff5d820', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.015..0.094 rows=51.00 loops=1)
Buffers: shared hit=49
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.014..0.091 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)
### 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 = '32b1f6b8-cb91-4797-90f1-11562fd0d15c', $2 = '2026-10-31 20:33:54.608508+00', $3 = 'b1c48e4e-55f2-4bb1-9e3d-6cefb21aca9c', $4 = '51'
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.023..0.104 rows=51.00 loops=1)
Buffers: shared hit=51
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.022..0.101 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=51
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
### bg 100: first, после 0
duration: 0.168 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 = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb', $2 = '51'
Limit (cost=0.29..154.67 rows=51 width=153) (actual time=0.017..0.139 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.016..0.136 rows=51.00 loops=1)
Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::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)
### bg 10: first, после 0
duration: 0.088 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 = '2a802f02-74f4-4937-bd97-9c4045417c5e', $2 = '51'
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.077..0.078 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.077..0.077 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.032..0.071 rows=10.00 loops=1)
Recheck Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::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 = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid)
Index Searches: 1
Buffers: shared hit=2
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 5k: middle, после 2500
#### psql
Limit (cost=0.29..18.59 rows=51 width=153) (actual time=0.007..0.056 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..897.48 rows=2500 width=153) (actual time=0.007..0.053 rows=51.00 loops=1)
Index Cond: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.053 ms
Execution Time: 0.063 ms
#### generic
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.009..0.056 rows=51.00 loops=1)
Buffers: shared hit=54
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.008..0.053 rows=51.00 loops=1)
Index Cond: ((chat_id = $1) AND (ROW(created_at, id) > ROW($2, $3)))
Index Searches: 1
Buffers: shared hit=54
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=51)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=51)
Filter: (message_id = messages.id)
Planning Time: 0.005 ms
Execution Time: 0.064 ms
#### or-cursor
Limit (cost=0.29..22.57 rows=51 width=153) (actual time=0.354..0.397 rows=51.00 loops=1)
Buffers: shared hit=2555
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..1092.83 rows=2500 width=153) (actual time=0.354..0.394 rows=51.00 loops=1)
Index Cond: (chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid)
Filter: ((created_at > '2026-10-31 20:33:47.697992+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:33:47.697992+00'::timestamp with time zone) AND (id > 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid)))
Rows Removed by Filter: 2500
Index Searches: 1
Buffers: shared hit=2555
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.042 ms
Execution Time: 0.402 ms
#### no-index
Limit (cost=455.66..455.78 rows=51 width=153) (actual time=2.231..2.236 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=455.66..461.91 rows=2500 width=153) (actual time=2.231..2.233 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..372.25 rows=2500 width=153) (actual time=0.181..1.941 rows=2500.00 loops=1)
Filter: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid)))
Rows Removed by Filter: 6000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.043 ms
Execution Time: 2.243 ms
#### chat_only
Limit (cost=455.66..455.78 rows=51 width=153) (actual time=2.007..2.011 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=455.66..461.91 rows=2500 width=153) (actual time=2.007..2.009 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 43kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..372.25 rows=2500 width=153) (actual time=0.147..1.756 rows=2500.00 loops=1)
Filter: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::uuid)))
Rows Removed by Filter: 6000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=2500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 2.017 ms
#### covering
Limit (cost=0.41..6.28 rows=51 width=153) (actual time=0.006..0.041 rows=51.00 loops=1)
Buffers: shared hit=5
-> Index Only Scan using bench_variant on messages (cost=0.41..287.91 rows=2500 width=153) (actual time=0.006..0.039 rows=51.00 loops=1)
Index Cond: ((chat_id = 'c5a461fa-1df5-48fc-99f3-07c2b4fc839c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.697992+00'::timestamp with time zone, 'd0685e16-8d05-433e-94b2-52f7f33fc60d'::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.039 ms
Execution Time: 0.047 ms
### bg 1k: middle, после 500
#### psql
Limit (cost=0.29..74.22 rows=51 width=153) (actual time=0.006..0.052 rows=51.00 loops=1)
Buffers: shared hit=49
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..728.07 rows=502 width=153) (actual time=0.006..0.050 rows=51.00 loops=1)
Index Cond: ((chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::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.048 ms
Execution Time: 0.059 ms
#### generic
Limit (cost=0.29..14.23 rows=4 width=153) (actual time=0.013..0.063 rows=51.00 loops=1)
Buffers: shared hit=49
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..157.19 rows=45 width=153) (actual time=0.013..0.060 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.075 ms
#### or-cursor
Limit (cost=0.29..78.27 rows=51 width=153) (actual time=0.083..0.127 rows=51.00 loops=1)
Buffers: shared hit=531
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..767.90 rows=502 width=153) (actual time=0.083..0.125 rows=51.00 loops=1)
Index Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid)
Filter: ((created_at > '2026-10-31 20:33:47.678256+00'::timestamp with time zone) OR ((created_at = '2026-10-31 20:33:47.678256+00'::timestamp with time zone) AND (id > '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid)))
Rows Removed by Filter: 500
Index Searches: 1
Buffers: shared hit=531
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.134 ms
#### no-index
Limit (cost=359.03..359.16 rows=51 width=153) (actual time=0.554..0.558 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=359.03..360.28 rows=502 width=153) (actual time=0.553..0.555 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..342.28 rows=502 width=153) (actual time=0.128..0.504 rows=500.00 loops=1)
Filter: ((chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid)))
Rows Removed by Filter: 8000
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.074 ms
Execution Time: 0.569 ms
#### chat_only
Limit (cost=243.69..243.82 rows=51 width=153) (actual time=0.455..0.459 rows=51.00 loops=1)
Buffers: shared hit=187
-> Sort (cost=243.69..244.94 rows=502 width=153) (actual time=0.455..0.456 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: top-N heapsort Memory: 39kB
Buffers: shared hit=187
-> Bitmap Heap Scan on messages (cost=15.91..226.94 rows=502 width=153) (actual time=0.077..0.404 rows=500.00 loops=1)
Recheck Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid)
Filter: (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::uuid))
Rows Removed by Filter: 500
Heap Blocks: exact=184
Buffers: shared hit=187
-> Bitmap Index Scan on bench_variant (cost=0.00..15.79 rows=1000 width=0) (actual time=0.014..0.014 rows=1000.00 loops=1)
Index Cond: (chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid)
Index Searches: 1
Buffers: shared hit=3
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=500)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.045 ms
Execution Time: 0.467 ms
#### covering
Limit (cost=0.41..6.26 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..57.98 rows=502 width=153) (actual time=0.006..0.045 rows=51.00 loops=1)
Index Cond: ((chat_id = '32b1f6b8-cb91-4797-90f1-11562fd0d15c'::uuid) AND (ROW(created_at, id) > ROW('2026-10-31 20:33:47.678256+00'::timestamp with time zone, '5b0bf7b2-94b1-471b-b626-e907cff5d820'::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.047 ms
Execution Time: 0.055 ms
### bg 100: first, после 0
#### psql
Limit (cost=0.29..154.67 rows=51 width=153) (actual time=0.021..0.072 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..302.99 rows=100 width=153) (actual time=0.021..0.069 rows=51.00 loops=1)
Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::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.069 ms
Execution Time: 0.080 ms
#### generic
Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.024..0.083 rows=51.00 loops=1)
Buffers: shared hit=47
-> Index Scan using ix_messages_chat_id_created_at_id on messages (cost=0.29..381.48 rows=135 width=153) (actual time=0.023..0.080 rows=51.00 loops=1)
Index Cond: (chat_id = $1)
Index Searches: 1
Buffers: shared hit=47
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.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.094 ms
#### no-index
Limit (cost=297.07..297.20 rows=51 width=153) (actual time=0.353..0.356 rows=51.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=297.07..297.32 rows=100 width=153) (actual time=0.353..0.354 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..293.75 rows=100 width=153) (actual time=0.028..0.336 rows=100.00 loops=1)
Filter: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid)
Rows Removed by Filter: 8400
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=100)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=100)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.035 ms
Execution Time: 0.362 ms
#### chat_only
Limit (cost=172.68..172.80 rows=51 width=153) (actual time=0.138..0.142 rows=51.00 loops=1)
Buffers: shared hit=83
-> Sort (cost=172.68..172.93 rows=100 width=153) (actual time=0.138..0.140 rows=51.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 50kB
Buffers: shared hit=83
-> Bitmap Heap Scan on messages (cost=5.06..169.35 rows=100 width=153) (actual time=0.013..0.124 rows=100.00 loops=1)
Recheck Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::uuid)
Heap Blocks: exact=81
Buffers: shared hit=83
-> Bitmap Index Scan on bench_variant (cost=0.00..5.04 rows=100 width=0) (actual time=0.004..0.004 rows=100.00 loops=1)
Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::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.149 ms
#### covering
Limit (cost=0.41..6.15 rows=51 width=153) (actual time=0.004..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.004..0.045 rows=51.00 loops=1)
Index Cond: (chat_id = '31bc7aa7-0ed7-4867-b3f9-6a2f17caa6fb'::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.035 ms
Execution Time: 0.053 ms
### bg 10: first, после 0
#### psql
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.035..0.036 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.034..0.035 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.020..0.031 rows=10.00 loops=1)
Recheck Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid)
Heap Blocks: exact=10
Buffers: shared hit=12
-> Bitmap Index Scan on ix_messages_chat_id_created_at_id (cost=0.00..4.36 rows=10 width=0) (actual time=0.005..0.005 rows=10.00 loops=1)
Index Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::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.053 ms
Execution Time: 0.049 ms
#### generic
Limit (cost=0.29..39.82 rows=14 width=153) (actual time=0.010..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..381.48 rows=135 width=153) (actual time=0.010..0.020 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.029 ms
#### no-index
Limit (cost=292.57..292.59 rows=10 width=153) (actual time=0.199..0.200 rows=10.00 loops=1)
Buffers: shared hit=186
-> Sort (cost=292.57..292.59 rows=10 width=153) (actual time=0.199..0.199 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=186
-> Seq Scan on messages (cost=0.00..292.40 rows=10 width=153) (actual time=0.007..0.196 rows=10.00 loops=1)
Filter: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::uuid)
Rows Removed by Filter: 8490
Buffers: shared hit=186
SubPlan 1
-> Sort (cost=0.01..0.02 rows=1 width=18) (actual time=0.001..0.001 rows=0.00 loops=10)
Sort Key: message_attachments."position"
Sort Method: quicksort Memory: 25kB
-> Seq Scan on message_attachments (cost=0.00..0.00 rows=1 width=18) (actual time=0.000..0.000 rows=0.00 loops=10)
Filter: (message_id = messages.id)
Planning:
Buffers: shared hit=3
Planning Time: 0.040 ms
Execution Time: 0.205 ms
#### chat_only
Limit (cost=37.85..37.87 rows=10 width=153) (actual time=0.019..0.020 rows=10.00 loops=1)
Buffers: shared hit=12
-> Sort (cost=37.85..37.87 rows=10 width=153) (actual time=0.019..0.019 rows=10.00 loops=1)
Sort Key: messages.created_at, messages.id
Sort Method: quicksort Memory: 27kB
Buffers: shared hit=12
-> Bitmap Heap Scan on messages (cost=4.36..37.68 rows=10 width=153) (actual time=0.007..0.016 rows=10.00 loops=1)
Recheck Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::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 = '2a802f02-74f4-4937-bd97-9c4045417c5e'::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.044 ms
Execution Time: 0.026 ms
#### covering
Limit (cost=0.41..4.74 rows=10 width=153) (actual time=0.006..0.014 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.013 rows=10.00 loops=1)
Index Cond: (chat_id = '2a802f02-74f4-4937-bd97-9c4045417c5e'::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.035 ms
Execution Time: 0.020 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,8.129,4500,0,553.5,0.0,53.566,107.997,145.124,203.112,1.001,124.9,118.0,0.125,,0.211,,
5000,1,0,8500,16.609,8500,0,511.8,0.0,54.873,131.129,176.024,367.355,1.0,124.9,115.5,0.12,,0.226,,
10000,1,0,13500,26.218,13500,0,514.9,0.0,56.009,121.243,188.234,417.242,0.996,125.1,113.8,0.119,,0.22,,
1 size chunk messages_before messages_after duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_end_mib mem_cgroup_end_mib generator_cpu_cores flags db_cpu_cores cell attempt
2 1000 1 0 4500 8.129 4500 0 553.5 0.0 53.566 107.997 145.124 203.112 1.001 124.9 118.0 0.125 0.211
3 5000 1 0 8500 16.609 8500 0 511.8 0.0 54.873 131.129 176.024 367.355 1.0 124.9 115.5 0.12 0.226
4 10000 1 0 13500 26.218 13500 0 514.9 0.0 56.009 121.243 188.234 417.242 0.996 125.1 113.8 0.119 0.22
@@ -0,0 +1,12 @@
{
"label": "unit-of-work-before",
"profile": "quick",
"stage": "done",
"size": 10000,
"runs_done": 18,
"runs_total": 18,
"elapsed_s": 232,
"eta_s": 0,
"warnings": [],
"updated_at": "2026-10-31T20:36:08+00:00"
}
@@ -0,0 +1 @@
{"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":26217.897831},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"med":56.0817085,"p(50)":56.0817085,"p(95)":121.36764969999999,"p(99)":188.31833032999998,"max":417.289458,"avg":62.08268073674041,"min":10.908}},"data_sent":{"type":"counter","contains":"data","values":{"count":5076000,"rate":193608.19973896406}},"http_req_blocked":{"values":{"p(95)":0.002958,"p(99)":0.006208,"max":1.231625,"avg":0.0036268236296294123,"min":0.0005,"med":0.001292,"p(50)":0.001292},"type":"trend","contains":"time"},"http_reqs":{"values":{"count":13500,"rate":514.9154248376703},"type":"counter","contains":"default"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":13500,"fails":0}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.405125,"avg":0.00043700940740740743,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.007020301851851752,"min":0.002,"med":0.00525,"p(50)":0.00525,"p(95)":0.015375,"p(99)":0.027752079999999974,"max":0.41175}},"data_received":{"type":"counter","contains":"data","values":{"rate":252308.55817045848,"count":6615000}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":13500}},"iterations":{"type":"counter","contains":"default","values":{"count":13500,"rate":514.9154248376703}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(95)":121.24275384999996,"p(99)":188.23404533,"max":417.241917,"avg":61.99720407022209,"min":10.842917,"med":56.0085415,"p(50)":56.0085415},"thresholds":{"max>=0":{"ok":true}}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"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_receiving":{"type":"trend","contains":"time","values":{"avg":0.021931994296296276,"min":0.004875,"med":0.017292,"p(50)":0.017292,"p(95)":0.04758604999999998,"p(99)":0.07875458999999994,"max":1.298125}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":10.821416,"med":55.973562,"p(50)":55.973562,"p(95)":121.20813124999995,"p(99)":188.21679398999999,"max":417.229417,"avg":61.96825177407398}},"http_req_duration":{"contains":"time","values":{"p(99)":188.23404533,"max":417.241917,"avg":61.99720407022209,"min":10.842917,"med":56.0085415,"p(50)":56.0085415,"p(95)":121.24275384999996},"type":"trend"}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":13500,"fails":0,"name":"message 201"}]}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":8129.394198},"metrics":{"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0,"max":0.238542,"avg":0.000649676,"min":0,"med":0,"p(50)":0}},"iterations":{"type":"counter","contains":"default","values":{"rate":553.5467822568,"count":4500}},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":4500}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":11.12675,"med":53.629854,"p(50)":53.629854,"p(95)":108.05101904999998,"p(99)":145.20654075,"max":203.160667,"avg":57.65925558577789}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"avg":0,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":57.58373600199996,"min":11.06175,"med":53.565521000000004,"p(50)":53.565521000000004,"p(95)":107.99710415,"p(99)":145.12359458,"max":203.112167}},"http_req_blocked":{"contains":"time","values":{"min":0.0005,"med":0.001208,"p(50)":0.001208,"p(95)":0.002542,"p(99)":0.010333839999999997,"max":1.939167,"avg":0.01047257377777748},"type":"trend"},"http_req_sending":{"contains":"time","values":{"med":0.004709,"p(50)":0.004709,"p(95)":0.013417,"p(99)":0.02838749999999995,"max":0.492583,"avg":0.0068133179999999745,"min":0.002167},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":2205000,"rate":271237.923305832}},"data_sent":{"type":"counter","contains":"data","values":{"count":1692000,"rate":208133.59012855683}},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.158708,"avg":0.019934207999999964,"min":0.005,"med":0.016542,"p(50)":0.016542,"p(95)":0.04138544999999996,"p(99)":0.06270925}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":4500}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(50)":53.565521000000004,"p(95)":107.99710415,"p(99)":145.12359458,"max":203.112167,"avg":57.58373600199996,"min":11.06175,"med":53.565521000000004},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":4500,"rate":553.5467822568}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":57.55698847600002,"min":11.042792,"med":53.5413955,"p(50)":53.5413955,"p(95)":107.96220805,"p(99)":145.10563825,"max":203.095375}},"vus_max":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":4500,"fails":0}],"name":"","path":""}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":8500,"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":16608.764133},"metrics":{"http_req_waiting":{"type":"trend","contains":"time","values":{"med":54.8474165,"p(50)":54.8474165,"p(95)":131.10701635,"p(99)":175.99143532999997,"max":367.328875,"avg":62.34265841941195,"min":10.559792}},"iterations":{"values":{"count":8500,"rate":511.7779945535698},"type":"counter","contains":"default"},"vus":{"type":"gauge","contains":"default","values":{"value":32,"min":32,"max":32}},"http_req_receiving":{"values":{"p(99)":0.09283716999999997,"max":1.376042,"avg":0.02192834011764702,"min":0.004625,"med":0.016208,"p(50)":0.016208,"p(95)":0.05},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"min":32,"max":32,"value":32}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.00597289235294084,"min":0.000458,"med":0.001167,"p(50)":0.001167,"p(95)":0.003167,"p(99)":0.0072520799999999845,"max":1.702709}},"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"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":176.02381499999996,"max":367.35525,"avg":62.371295071764656,"min":10.578875,"med":54.872604,"p(50)":54.872604,"p(95)":131.1289899}},"data_sent":{"contains":"data","values":{"count":3196000,"rate":192428.52595214226},"type":"counter"},"http_reqs":{"values":{"count":8500,"rate":511.7779945535698},"type":"counter","contains":"default"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":8500}},"data_received":{"type":"counter","contains":"data","values":{"count":4165000,"rate":250771.2173312492}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.004625,"p(95)":0.016334,"p(99)":0.03304366999999999,"max":0.2145,"avg":0.006708312235294045,"min":0.001875,"med":0.004625}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"min":10.578875,"med":54.872604,"p(50)":54.872604,"p(95)":131.1289899,"p(99)":176.02381499999996,"max":367.35525,"avg":62.371295071764656}},"http_req_connecting":{"values":{"avg":0.0006276516470588236,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.821208},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":8500,"fails":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":176.63479883,"max":367.434584,"avg":62.4581675835293,"min":10.6265,"med":54.941229500000006,"p(50)":54.941229500000006,"p(95)":131.26773605}}}}
@@ -0,0 +1 @@
{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2253,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2253,"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":5000.271503},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":2253,"rate":450.57553347818686}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":2253},"type":"rate","contains":"default"},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.001084,"p(50)":0.001084,"p(95)":0.003083,"p(99)":0.005101999999999997,"max":1.077708,"avg":0.002211543719485143,"min":0.000541}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"max":48.953416,"avg":2.130954683976918,"min":1.450709,"med":1.854375,"p(50)":1.854375,"p(95)":3.1597245999999988,"p(99)":6.159564999999994},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_tls_handshaking":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(50)":1.829334,"p(95)":3.076249599999998,"p(99)":5.8753721599999995,"max":46.974291,"avg":2.093924473146916,"min":1.435209,"med":1.829334}},"data_received":{"type":"counter","contains":"data","values":{"count":32801427,"rate":6559929.191908922}},"http_req_duration":{"type":"trend","contains":"time","values":{"max":48.953416,"avg":2.130954683976918,"min":1.450709,"med":1.854375,"p(50)":1.854375,"p(95)":3.1597245999999988,"p(99)":6.159564999999994}},"data_sent":{"values":{"rate":188340.57299388212,"count":941754},"type":"counter","contains":"data"},"checks":{"type":"rate","contains":"default","values":{"passes":4506,"fails":0,"rate":1}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.133541,"avg":0.00005927252552152685,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02248167999999998,"max":0.838458,"avg":0.005323498890368457,"min":0.001584,"med":0.003125,"p(50)":0.003125,"p(95)":0.013391799999999995}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.12193715999999993,"max":1.96425,"avg":0.03170671193963595,"min":0.011792,"med":0.021958,"p(50)":0.021958,"p(95)":0.07168319999999995}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":3.307266199999999,"p(99)":6.396825319999996,"max":52.15775,"avg":2.2152040532623154,"min":1.500041,"med":1.926208,"p(50)":1.926208}},"vus_max":{"values":{"value":1,"min":1,"max":1},"type":"gauge","contains":"default"},"http_reqs":{"values":{"count":2253,"rate":450.57553347818686},"type":"counter","contains":"default"}}}
@@ -0,0 +1 @@
{"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3053,"fails":0,"name":"status 200","path":"::status 200"},{"id":"736a4affc4111c8285c374c0b4d25aed","passes":3053,"fails":0,"name":"full page","path":"::full page"}],"name":"","path":""},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5020.045753},"metrics":{"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"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3053}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6106,"fails":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0005948110055682934,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.3855}},"data_sent":{"type":"counter","contains":"data","values":{"count":1276154,"rate":254211.6273018757}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_duration":{"contains":"time","values":{"avg":26.181166798886302,"min":7.941916,"med":22.064041,"p(50)":22.064041,"p(95)":56.76235899999999,"p(99)":79.45444183999999,"max":216.868917},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0049047608909270025,"min":0.001625,"med":0.003,"p(50)":0.003,"p(95)":0.013350399999999995,"p(99)":0.028433839999999995,"max":0.291166}},"http_req_blocked":{"contains":"time","values":{"max":0.978125,"avg":0.005365760890927007,"min":0.000458,"med":0.000917,"p(50)":0.000917,"p(95)":0.0036833999999999947,"p(99)":0.00958348},"type":"trend"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"data_received":{"contains":"data","values":{"count":44448627,"rate":8854227.4686316},"type":"counter"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":26.181166798886302,"min":7.941916,"med":22.064041,"p(50)":22.064041,"p(95)":56.76235899999999,"p(99)":79.45444183999999,"max":216.868917},"thresholds":{"max>=0":{"ok":true}}},"iterations":{"type":"counter","contains":"default","values":{"count":3053,"rate":608.1617878035304}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3053,"rate":608.1617878035304}},"http_req_waiting":{"contains":"time","values":{"avg":26.148865134621694,"min":7.918167,"med":22.042416,"p(50)":22.042416,"p(95)":56.74389139999999,"p(99)":79.375535,"max":216.794583},"type":"trend"},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":26.265951053717636,"min":8.001958,"med":22.146833,"p(50)":22.146833,"p(95)":56.88824999999999,"p(99)":79.64376315999999,"max":217.035042}},"http_req_receiving":{"contains":"time","values":{"avg":0.02739690337373078,"min":0.007542,"med":0.019208,"p(50)":0.019208,"p(95)":0.07083299999999991,"p(99)":0.13634999999999997,"max":0.743542},"type":"trend"}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3164,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3164,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5004.397627,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.012910699999999994,"p(99)":0.025209,"max":0.163083,"avg":0.0050704216182048505,"min":0.001542,"med":0.003375,"p(50)":0.003375}},"data_received":{"type":"counter","contains":"data","values":{"rate":9204839.310023915,"count":46064676}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(99)":14.285878459999994,"max":55.594459,"avg":6.2370559108723205,"min":3.327209,"med":5.6359794999999995,"p(50)":5.6359794999999995,"p(95)":8.469265149999998},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.201958,"avg":0.00019118710493046777}},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.002943344500632133,"min":0.0005,"med":0.001042,"p(50)":0.001042,"p(95)":0.003167,"p(99)":0.006640169999999999,"max":1.206834}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.7143125,"p(95)":8.6252608,"p(99)":14.427661249999995,"max":55.678792,"avg":6.320211902338795,"min":3.404083,"med":5.7143125}},"checks":{"type":"rate","contains":"default","values":{"passes":6328,"fails":0,"rate":1}},"http_req_duration":{"values":{"p(99)":14.285878459999994,"max":55.594459,"avg":6.2370559108723205,"min":3.327209,"med":5.6359794999999995,"p(50)":5.6359794999999995,"p(95)":8.469265149999998},"type":"trend","contains":"time"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3164,"rate":632.2439254086074}},"http_req_waiting":{"contains":"time","values":{"min":3.305417,"med":5.605938,"p(50)":5.605938,"p(95)":8.4078536,"p(99)":14.12857749999999,"max":55.554666,"avg":6.202394768963339},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3164}},"data_sent":{"type":"counter","contains":"data","values":{"count":1322552,"rate":264277.9608207979}},"vus_max":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"iterations":{"type":"counter","contains":"default","values":{"rate":632.2439254086074,"count":3164}},"http_req_receiving":{"contains":"time","values":{"p(95)":0.06993379999999998,"p(99)":0.12717124999999999,"max":1.720959,"avg":0.029590720290771172,"min":0.009,"med":0.0203335,"p(50)":0.0203335},"type":"trend"}}}
@@ -0,0 +1 @@
{"root_group":{"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2489,"fails":0},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2489}],"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":5001.461169},"metrics":{"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"max":3.887292,"avg":1.9278422800321393,"min":1.5285,"med":1.855875,"p(50)":1.855875,"p(95)":2.4594664,"p(99)":2.9532430799999996}},"iterations":{"type":"counter","contains":"default","values":{"count":2489,"rate":497.65456851435573}},"vus":{"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}},"data_sent":{"type":"counter","contains":"data","values":{"count":1040402,"rate":208019.6096390007}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.1185,"avg":0.00004760948171956609}},"checks":{"contains":"default","values":{"rate":1,"passes":4978,"fails":0},"type":"rate"},"http_req_duration":{"type":"trend","contains":"time","values":{"p(95)":2.4594664,"p(99)":2.9532430799999996,"max":3.887292,"avg":1.9278422800321393,"min":1.5285,"med":1.855875,"p(50)":1.855875}},"http_req_failed":{"contains":"default","values":{"passes":0,"fails":2489,"rate":0},"type":"rate"},"http_reqs":{"type":"counter","contains":"default","values":{"count":2489,"rate":497.65456851435573}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.004347999999999998,"max":0.4935,"avg":0.0016562591402169465,"min":0.000583,"med":0.001208,"p(50)":0.001208,"p(95)":0.0024835999999999955}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.1295,"avg":0.004578830453997602,"min":0.00175,"med":0.003417,"p(50)":0.003417,"p(95)":0.010566599999999995,"p(99)":0.02178311999999999}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.09022303999999998,"max":0.437791,"avg":0.02939842948975484,"min":0.012542,"med":0.023833,"p(50)":0.023833,"p(95)":0.05711639999999999}},"vus_max":{"values":{"max":1,"value":1,"min":1},"type":"gauge","contains":"default"},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":1.824667,"p(50)":1.824667,"p(95)":2.4054667999999997,"p(99)":2.86957696,"max":3.795709,"avg":1.8938650200883875,"min":1.506584}},"data_received":{"type":"counter","contains":"data","values":{"count":36237351,"rate":7245352.863000505}},"iteration_duration":{"values":{"p(50)":1.928834,"p(95)":2.579233,"p(99)":3.10140196,"max":4.283792,"avg":2.0054184089995983,"min":1.586875,"med":1.928834},"type":"trend","contains":"time"}}}
@@ -0,0 +1 @@
{"root_group":{"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3513,"fails":0,"name":"status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3513,"fails":0}],"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5016.84253},"metrics":{"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.0038652063763165647,"min":0.000458,"med":0.000833,"p(50)":0.000833,"p(95)":0.00175,"p(99)":0.004948039999999997,"max":0.896958}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":0.369333,"avg":0.0005176606888699117,"min":0,"med":0,"p(50)":0,"p(95)":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.081167,"avg":0.0033468306290919824,"min":0.001708,"med":0.002709,"p(50)":0.002709,"p(95)":0.005933399999999994,"p(99)":0.014454999999999989}},"http_req_receiving":{"values":{"med":0.017459,"p(50)":0.017459,"p(95)":0.040733399999999975,"p(99)":0.08879687999999997,"max":0.717167,"avg":0.021207658411614004,"min":0.006875},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":7026,"fails":0}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":8.515959,"med":20.992125,"p(50)":20.992125,"p(95)":39.748124999999995,"p(99)":61.90779,"max":85.8895,"avg":22.743520846569826},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":20.992125,"p(95)":39.748124999999995,"p(99)":61.90779,"max":85.8895,"avg":22.743520846569826,"min":8.515959,"med":20.992125}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3513,"rate":700.2412332045033}},"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}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"type":"counter","contains":"default","values":{"count":3513,"rate":700.2412332045033}},"data_received":{"type":"counter","contains":"data","values":{"count":51145767,"rate":10194812.114224363}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":21.050208,"p(50)":21.050208,"p(95)":39.80692539999999,"p(99)":61.97183496,"max":85.983333,"avg":22.810347667805306,"min":8.574542}},"http_req_waiting":{"type":"trend","contains":"time","values":{"med":20.971459,"p(50)":20.971459,"p(95)":39.728266999999995,"p(99)":61.880613000000004,"max":85.871209,"avg":22.718966357529222,"min":8.490875}},"http_req_failed":{"type":"rate","contains":"default","values":{"fails":3513,"rate":0,"passes":0}},"data_sent":{"values":{"count":1468434,"rate":292700.83547948237},"type":"counter","contains":"data"},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}}}}
@@ -0,0 +1 @@
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5002.932919},"metrics":{"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_connecting":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.301459,"avg":0.00028230925644916535,"min":0,"med":0},"type":"trend"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3295}},"data_sent":{"type":"counter","contains":"data","values":{"count":1377310,"rate":275300.5131788376}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(50)":5.215209,"p(95)":8.5245456,"p(99)":18.93017893999999,"max":62.826125,"avg":5.990473185128973,"min":3.696667,"med":5.215209}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"avg":5.990473185128973,"min":3.696667,"med":5.215209,"p(50)":5.215209,"p(95)":8.5245456,"p(99)":18.93017893999999,"max":62.826125}},"iteration_duration":{"contains":"time","values":{"p(99)":19.375204999999994,"max":62.891458,"avg":6.06830401305007,"min":3.759125,"med":5.277125,"p(50)":5.277125,"p(95)":8.6376252},"type":"trend"},"http_req_tls_handshaking":{"values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend","contains":"time"},"http_req_receiving":{"contains":"time","values":{"max":0.495083,"avg":0.026285457966616056,"min":0.008625,"med":0.018125,"p(50)":0.018125,"p(95)":0.06477519999999999,"p(99)":0.1371625},"type":"trend"},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6590,"fails":0}},"iterations":{"contains":"default","values":{"count":3295,"rate":658.613667891956},"type":"counter"},"http_req_blocked":{"contains":"time","values":{"avg":0.002571095599393056,"min":0.0005,"med":0.000916,"p(50)":0.000916,"p(95)":0.002833,"p(99)":0.006257499999999997,"max":1.104917},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":3295,"rate":658.613667891956}},"http_req_sending":{"type":"trend","contains":"time","values":{"med":0.002791,"p(50)":0.002791,"p(95)":0.012167,"p(99)":0.040491459999999986,"max":0.184,"avg":0.004774410015174558,"min":0.001625}},"http_req_waiting":{"contains":"time","values":{"min":3.673,"med":5.189625,"p(50)":5.189625,"p(95)":8.479216999999998,"p(99)":18.780699959999993,"max":62.797958,"avg":5.959413317147188},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"data_received":{"type":"counter","contains":"data","values":{"rate":9588756.390838988,"count":47971905}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3295,"fails":0,"name":"status 200","path":"::status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3295,"fails":0}]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":2228,"fails":0},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":2228,"fails":0}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5001.965738},"metrics":{"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.03563683258527831,"min":0.011542,"med":0.028167,"p(50)":0.028167,"p(95)":0.07769364999999999,"p(99)":0.1147145,"max":0.309416}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":2228}},"iteration_duration":{"type":"trend","contains":"time","values":{"min":1.626542,"med":2.0358539999999996,"p(50)":2.0358539999999996,"p(95)":3.12250185,"p(99)":4.305317,"max":80.91475,"avg":2.2400195915619383}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.326291,"avg":0.006153988330341136,"min":0.00175,"med":0.0041665,"p(50)":0.0041665,"p(95)":0.014818949999999996,"p(99)":0.025863659999999997}},"http_req_waiting":{"type":"trend","contains":"time","values":{"min":1.533625,"med":1.920375,"p(50)":1.920375,"p(95)":2.9227458499999996,"p(99)":3.9958985,"max":80.612167,"avg":2.107480340664276}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":1.564208,"med":1.9531245,"p(50)":1.9531245,"p(95)":2.99771865,"p(99)":4.121174819999999,"max":80.766334,"avg":2.14927116157989}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":4456,"fails":0}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(95)":2.99771865,"p(99)":4.121174819999999,"max":80.766334,"avg":2.14927116157989,"min":1.564208,"med":1.9531245,"p(50)":1.9531245}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.00529173,"max":0.534208,"avg":0.0019440228904847405,"min":0.000542,"med":0.001292,"p(50)":0.001292,"p(95)":0.00325}},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.124625,"avg":0.00005593581687612208,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":931304,"rate":186187.60079159902}},"data_received":{"type":"counter","contains":"data","values":{"count":32437452,"rate":6484940.861064331}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"iterations":{"type":"counter","contains":"default","values":{"count":2228,"rate":445.4248822765527}},"http_reqs":{"contains":"default","values":{"count":2228,"rate":445.4248822765527},"type":"counter"}}}
@@ -0,0 +1 @@
{"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":5015.283336},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"med":23.878833,"p(50)":23.878833,"p(95)":50.81040819999995,"p(99)":76.99555355999999,"max":128.572042,"avg":26.41199930926477,"min":9.207541}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(95)":50.60700019999997,"p(99)":76.91052544,"max":128.476833,"avg":26.32275204780749,"min":9.137334,"med":23.794334,"p(50)":23.794334}},"http_req_waiting":{"values":{"p(99)":76.86861144,"max":128.426959,"avg":26.28821623244314,"min":9.108375,"med":23.763625,"p(50)":23.763625,"p(95)":50.55655839999997},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.356375,"avg":0.02940985262116716,"min":0.00775,"med":0.022917,"p(50)":0.022917,"p(95)":0.06189999999999995,"p(99)":0.12834543999999976}},"vus":{"values":{"value":16,"min":16,"max":16},"type":"gauge","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"med":23.794334,"p(50)":23.794334,"p(95)":50.60700019999997,"p(99)":76.91052544,"max":128.476833,"avg":26.32275204780749,"min":9.137334}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.0018773775140125289,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.593542}},"data_sent":{"type":"counter","contains":"data","values":{"count":1267794,"rate":252786.1169676496}},"vus_max":{"values":{"min":16,"max":16,"value":16},"type":"gauge","contains":"default"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":604.7514759991617,"count":3033}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":3033}},"http_req_blocked":{"values":{"p(50)":0.001125,"p(95)":0.002625,"p(99)":0.010265439999999999,"max":0.997375,"avg":0.004977574019123037,"min":0.000541,"med":0.001125},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":44157447,"rate":8804576.739071796}},"http_req_tls_handshaking":{"contains":"time","values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0},"type":"trend"},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.0051259627431586435,"min":0.001958,"med":0.003833,"p(50)":0.003833,"p(95)":0.011349799999999993,"p(99)":0.021058999999999967,"max":0.182}},"checks":{"type":"rate","contains":"default","values":{"passes":6066,"fails":0,"rate":1}},"iterations":{"type":"counter","contains":"default","values":{"count":3033,"rate":604.7514759991617}}},"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1","passes":3033,"fails":0,"name":"status 200"},{"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3033,"fails":0}],"name":""}}
@@ -0,0 +1 @@
{"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdErrTTY":false,"testRunDurationMs":5004.963419,"isStdOutTTY":false},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.00465384713763708,"min":0.0015,"med":0.002875,"p(50)":0.002875,"p(95)":0.011208,"p(99)":0.030532219999999968,"max":0.432875}},"iterations":{"contains":"default","values":{"count":3284,"rate":656.1486518629039},"type":"counter"},"vus":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":6.01513668544458,"min":4.157959,"med":5.418854,"p(50)":5.418854,"p(95)":8.585795549999997,"p(99)":15.028389109999997,"max":44.245083}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.0054800799999999966,"max":0.631083,"avg":0.0020061522533495954,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002583}},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.01925,"p(50)":0.01925,"p(95)":0.06489809999999999,"p(99)":0.12631807999999994,"max":0.540167,"avg":0.027042937576126646,"min":0.006625}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":15.267310859999997,"max":44.328083,"avg":6.090102879110868,"min":4.221208,"med":5.487125000000001,"p(50)":5.487125000000001,"p(95)":8.740737549999997}},"vus_max":{"contains":"default","values":{"value":4,"min":4,"max":4},"type":"gauge"},"http_req_waiting":{"values":{"p(95)":8.5182838,"p(99)":14.989583249999997,"max":44.21025,"avg":5.983439900730812,"min":4.141667,"med":5.392291500000001,"p(50)":5.392291500000001},"type":"trend","contains":"time"},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(50)":5.418854,"p(95)":8.585795549999997,"p(99)":15.028389109999997,"max":44.245083,"avg":6.01513668544458,"min":4.157959,"med":5.418854},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":47811756,"rate":9552868.222472018}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":6568,"fails":0}},"http_reqs":{"type":"counter","contains":"default","values":{"count":3284,"rate":656.1486518629039}},"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":{"type":"rate","contains":"default","values":{"passes":0,"fails":3284,"rate":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":1372712,"rate":274270.1364786938}},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.124875,"avg":0.0001106123629719854}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"passes":3284,"fails":0,"name":"status 200","path":"::status 200","id":"fad9fa412b86fcb03bee97c80dcd61f1"},{"fails":0,"name":"full page","path":"::full page","id":"736a4affc4111c8285c374c0b4d25aed","passes":3284}]}}
@@ -0,0 +1 @@
{"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2021.613876},"metrics":{"http_req_sending":{"contains":"time","values":{"p(50)":0.003209,"p(95)":0.007051449999999991,"p(99)":0.016355239999999983,"max":0.171125,"avg":0.004454332000000001,"min":0.002166,"med":0.003209},"type":"trend"},"data_received":{"values":{"count":490000,"rate":242380.60779911268},"type":"counter","contains":"data"},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":2.0185759639999983,"min":1.753,"med":1.939479,"p(50)":1.939479,"p(95)":2.41536875,"p(99)":3.1912434199999997,"max":8.462792}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration":{"values":{"p(95)":2.3432568499999995,"p(99)":3.1071454199999997,"max":7.759667,"avg":1.9696032060000013,"min":1.710708,"med":1.8914170000000001,"p(50)":1.8914170000000001},"type":"trend","contains":"time"},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(50)":0.000917,"p(95)":0.00179105,"p(99)":0.0025909199999999927,"max":0.473667,"avg":0.0015324739999999924,"min":0.0005,"med":0.000917}},"iterations":{"contains":"default","values":{"count":1000,"rate":494.6543016308422},"type":"counter"},"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_waiting":{"type":"trend","contains":"time","values":{"min":1.694208,"med":1.8758545,"p(50)":1.8758545,"p(95)":2.315538099999999,"p(99)":3.0497805099999997,"max":7.665541,"avg":1.9512902819999978}},"http_req_connecting":{"values":{"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.127792,"avg":0.000127792,"min":0},"type":"trend","contains":"time"},"checks":{"type":"rate","contains":"default","values":{"passes":1000,"fails":0,"rate":1}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":185990.01741319668}},"http_req_receiving":{"type":"trend","contains":"time","values":{"med":0.012125,"p(50)":0.012125,"p(95)":0.024879199999999997,"p(99)":0.03991992,"max":0.092458,"avg":0.013858591999999942,"min":0.009209}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":494.6543016308422}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":1.8914170000000001,"p(95)":2.3432568499999995,"p(99)":3.1071454199999997,"max":7.759667,"avg":1.9696032060000013,"min":1.710708,"med":1.8914170000000001},"thresholds":{"max>=0":{"ok":true}}}},"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}}
@@ -0,0 +1 @@
{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201","path":"::message 201"}],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1900.4515},"metrics":{"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.007713278999999991,"min":0.002333,"med":0.004833,"p(50)":0.004833,"p(95)":0.01741905,"p(99)":0.06015582999999997,"max":0.256458}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(50)":0.015854,"p(95)":0.047,"p(99)":0.07451416999999999,"max":0.1795,"avg":0.020503382000000004,"min":0.005458,"med":0.015854}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"data_sent":{"values":{"count":376000,"rate":197847.7219755411},"type":"counter","contains":"data"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":30.142481124999993,"min":12.528875,"med":27.190708,"p(50)":27.190708,"p(95)":56.23626045,"p(99)":87.50877351,"max":110.388208},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":12.528875,"med":27.190708,"p(50)":27.190708,"p(95)":56.23626045,"p(99)":87.50877351,"max":110.388208,"avg":30.142481124999993}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":526.1907499349497}},"http_req_blocked":{"values":{"p(99)":0.9029430899999998,"max":1.221792,"avg":0.016780967999999993,"min":0.000583,"med":0.00125,"p(50)":0.00125,"p(95)":0.003463149999999996},"type":"trend","contains":"time"},"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}},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"vus_max":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":526.1907499349497}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0.11269291999999972,"max":0.280167,"avg":0.0025576670000000004,"min":0,"med":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":27.375583,"p(50)":27.375583,"p(95)":56.32066395,"p(99)":87.600088,"max":110.487292,"avg":30.240331432000016,"min":12.586916}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_waiting":{"values":{"avg":30.11426446400001,"min":12.5105,"med":27.171146,"p(50)":27.171146,"p(95)":56.2112128,"p(99)":87.47325934,"max":110.353167},"type":"trend","contains":"time"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":257833.46746812534}}}}
@@ -0,0 +1 @@
{"root_group":{"groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"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":1589.382459},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"rate":629.1751833156477,"count":1000}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(99)":0.005208839999999999,"max":0.857708,"avg":0.004010209999999984,"min":0.0005,"med":0.000917,"p(50)":0.000917,"p(95)":0.002375}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":308295.8398246674}},"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}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":5.846125000000001,"p(95)":8.088834799999997,"p(99)":10.23388625,"max":69.224,"avg":6.349634796999996,"min":4.631417,"med":5.846125000000001}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":4.592292,"med":5.7915835,"p(50)":5.7915835,"p(95)":8.02284405,"p(99)":9.853355089999999,"max":69.173459,"avg":6.284986049000003}},"http_req_connecting":{"type":"trend","contains":"time","values":{"max":0.285667,"avg":0.001103625,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0}},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_waiting":{"values":{"min":4.581584,"med":5.773104,"p(50)":5.773104,"p(95)":8.0024473,"p(99)":9.83730333,"max":69.161709,"avg":6.264457304000002},"type":"trend","contains":"time"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":629.1751833156477}},"http_req_failed":{"values":{"passes":0,"fails":1000,"rate":0},"type":"rate","contains":"default"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"avg":6.284986049000003,"min":4.592292,"med":5.7915835,"p(50)":5.7915835,"p(95)":8.02284405,"p(99)":9.853355089999999,"max":69.173459},"thresholds":{"max>=0":{"ok":true}}},"http_req_sending":{"values":{"p(95)":0.013752099999999998,"p(99)":0.04218115999999999,"max":0.088208,"avg":0.005368999999999992,"min":0.001875,"med":0.003417,"p(50)":0.003417},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.015159744999999985,"min":0.005291,"med":0.0116455,"p(50)":0.0116455,"p(95)":0.03600834999999999,"p(99)":0.07642516999999999,"max":0.1365}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":236569.86892668356}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2456.906293},"metrics":{"iteration_duration":{"type":"trend","contains":"time","values":{"med":2.1066255,"p(50)":2.1066255,"p(95)":3.9687506499999983,"p(99)":5.833210919999999,"max":14.809083,"avg":2.4525510519999973,"min":1.73325}},"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}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.3536451560000025,"min":1.683541,"med":2.0332915,"p(50)":2.0332915,"p(95)":3.779387799999999,"p(99)":5.57392226,"max":14.631458}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0.161542,"avg":0.00016154199999999998,"min":0,"med":0}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":0.161208,"avg":0.006530930999999994,"min":0.002208,"med":0.004125,"p(50)":0.004125,"p(95)":0.015429499999999988,"p(99)":0.02822148999999999}},"http_req_blocked":{"contains":"time","values":{"max":0.66825,"avg":0.002167687999999994,"min":0.000583,"med":0.001166,"p(50)":0.001166,"p(95)":0.002875,"p(99)":0.004917},"type":"trend"},"data_received":{"contains":"data","values":{"count":490000,"rate":199437.80574622023},"type":"counter"},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":407.01593009432696}},"http_req_duration":{"values":{"p(99)":5.662027919999999,"max":14.681958,"avg":2.381875646999998,"min":1.696625,"med":2.053729,"p(50)":2.053729,"p(95)":3.8517351},"type":"trend","contains":"time"},"http_req_receiving":{"type":"trend","contains":"time","values":{"max":0.181625,"avg":0.02169956000000001,"min":0.009458,"med":0.0154375,"p(50)":0.0154375,"p(95)":0.04959964999999999,"p(99)":0.09181416999999994}},"vus":{"type":"gauge","contains":"default","values":{"max":1,"value":1,"min":1}},"http_reqs":{"values":{"count":1000,"rate":407.01593009432696},"type":"counter","contains":"default"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":153037.98971546695}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"min":1.696625,"med":2.053729,"p(50)":2.053729,"p(95)":3.8517351,"p(99)":5.662027919999999,"max":14.681958,"avg":2.381875646999998},"thresholds":{"max>=0":{"ok":true}}},"http_req_failed":{"contains":"default","values":{"passes":0,"fails":1000,"rate":0},"type":"rate"}}}
@@ -0,0 +1 @@
{"state":{"isStdErrTTY":false,"testRunDurationMs":1671.702959,"isStdOutTTY":false},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"max":85.161833,"avg":26.558928253,"min":11.961666,"med":25.079667,"p(50)":25.079667,"p(95)":40.415920849999985,"p(99)":77.28657292}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(50)":0.003791,"p(95)":0.011675299999999993,"p(99)":0.21840148999999995,"max":0.435375,"avg":0.008641250000000019,"min":0.002375,"med":0.003791}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":598.1923969304884}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(99)":0.051051579999999985,"max":0.1265,"avg":0.01675562499999996,"min":0.004708,"med":0.01425,"p(50)":0.01425,"p(95)":0.0343792}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":224920.34124586364}},"data_received":{"type":"counter","contains":"data","values":{"rate":293114.2744959393,"count":490000}},"http_req_duration{expected_response:true}":{"contains":"time","values":{"p(50)":25.079667,"p(95)":40.415920849999985,"p(99)":77.28657292,"max":85.161833,"avg":26.558928253,"min":11.961666,"med":25.079667},"thresholds":{"max>=0":{"ok":true}},"type":"trend"},"http_req_tls_handshaking":{"contains":"time","values":{"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0,"min":0,"med":0},"type":"trend"},"vus":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"http_req_blocked":{"type":"trend","contains":"time","values":{"med":0.001,"p(50)":0.001,"p(95)":0.002417,"p(99)":1.01049509,"max":1.710083,"avg":0.01933059000000015,"min":0.000459}},"iteration_duration":{"type":"trend","contains":"time","values":{"med":25.145021,"p(50)":25.145021,"p(95)":40.57707049999999,"p(99)":77.36564084,"max":85.333709,"avg":26.642562094999988,"min":12.025333}},"http_req_waiting":{"type":"trend","contains":"time","values":{"p(95)":40.37399134999998,"p(99)":77.23113791,"max":85.117583,"avg":26.53353137800002,"min":11.941917,"med":25.060375,"p(50)":25.060375}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":598.1923969304884}},"http_req_connecting":{"contains":"time","values":{"p(95)":0,"p(99)":0.09022424999999998,"max":0.447375,"avg":0.002195625,"min":0,"med":0,"p(50)":0},"type":"trend"},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":1000},"type":"rate"}},"root_group":{"id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"fails":0,"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000}],"name":"","path":""},"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":[{"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":{"testRunDurationMs":1634.717626,"isStdOutTTY":false,"isStdErrTTY":false},"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":611.7264438182549}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(95)":0.01946939999999999,"p(99)":0.04043058999999999,"max":0.19025,"avg":0.006797146999999998,"min":0.002083,"med":0.00375,"p(50)":0.00375}},"vus_max":{"type":"gauge","contains":"default","values":{"value":4,"min":4,"max":4}},"http_req_receiving":{"contains":"time","values":{"p(50)":0.012458,"p(95)":0.05279315,"p(99)":0.08282892999999997,"max":0.136709,"avg":0.018673963999999967,"min":0.005125,"med":0.012458},"type":"trend"},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(99)":12.299225829999994,"max":15.930416,"avg":6.453734133999994,"min":4.777416,"med":5.685396,"p(50)":5.685396,"p(95)":10.717775649999998}},"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"},"vus":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":611.7264438182549}},"http_req_connecting":{"values":{"p(95)":0,"p(99)":0,"max":0.393,"avg":0.000914126,"min":0,"med":0,"p(50)":0},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":6.428263022999998,"min":4.757958,"med":5.663042,"p(50)":5.663042,"p(95)":10.639974699999998,"p(99)":12.242283249999995,"max":15.88825}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_blocked":{"contains":"time","values":{"avg":0.005559838000000025,"min":0.000541,"med":0.001,"p(50)":0.001,"p(95)":0.003625,"p(99)":0.008846749999999988,"max":1.051},"type":"trend"},"data_received":{"values":{"count":490000,"rate":299745.9574709449},"type":"counter","contains":"data"},"data_sent":{"contains":"data","values":{"count":376000,"rate":230009.14287566382},"type":"counter"},"iteration_duration":{"type":"trend","contains":"time","values":{"max":16.075209,"avg":6.530070587,"min":4.819375,"med":5.7436665,"p(50)":5.7436665,"p(95)":10.875543749999999,"p(99)":12.471526079999995}},"http_req_duration":{"type":"trend","contains":"time","values":{"avg":6.453734133999994,"min":4.777416,"med":5.685396,"p(50)":5.685396,"p(95)":10.717775649999998,"p(99)":12.299225829999994,"max":15.930416}}}}
@@ -0,0 +1 @@
{"metrics":{"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":398.37604633991435}},"http_req_sending":{"type":"trend","contains":"time","values":{"p(99)":0.02808482,"max":1.101292,"avg":0.007326698000000011,"min":0.002375,"med":0.004292,"p(50)":0.004292,"p(95)":0.0173771}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.001941851999999992,"min":0.000583,"med":0.001125,"p(50)":0.001125,"p(95)":0.003083,"p(99)":0.005835659999999999,"max":0.488917}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":195204.26270655805}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"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"},"http_reqs":{"type":"counter","contains":"default","values":{"rate":398.37604633991435,"count":1000}},"checks":{"values":{"rate":1,"passes":1000,"fails":0},"type":"rate","contains":"default"},"vus_max":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"http_req_duration{expected_response:true}":{"thresholds":{"max>=0":{"ok":true}},"type":"trend","contains":"time","values":{"p(95)":3.9619981999999987,"p(99)":7.608621009999999,"max":25.02525,"avg":2.427928313000002,"min":1.713916,"med":2.0728334999999998,"p(50)":2.0728334999999998}},"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":7.608621009999999,"max":25.02525,"avg":2.427928313000002,"min":1.713916,"med":2.0728334999999998,"p(50)":2.0728334999999998,"p(95)":3.9619981999999987}},"data_sent":{"contains":"data","values":{"count":376000,"rate":149789.3934238078},"type":"counter"},"vus":{"type":"gauge","contains":"default","values":{"value":1,"min":1,"max":1}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(50)":2.128063,"p(95)":4.127093749999999,"p(99)":7.917443089999999,"max":26.058208,"avg":2.506009104999999,"min":1.774292,"med":2.128063}},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":2.396936735999999,"min":1.699875,"med":2.0524375,"p(50)":2.0524375,"p(95)":3.904655949999999,"p(99)":7.528800589999999,"max":24.933333}},"http_req_receiving":{"type":"trend","contains":"time","values":{"avg":0.023664879000000055,"min":0.009542,"med":0.015875,"p(50)":0.015875,"p(95)":0.0508381,"p(99)":0.07927666999999998,"max":2.337833}},"http_req_connecting":{"type":"trend","contains":"time","values":{"avg":0.000106875,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0.106875}}},"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"name":"message 201","path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0}]},"options":{"noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":""},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":2510.191085}}
@@ -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":2608.563821},"metrics":{"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":383.35270617095625}},"http_req_blocked":{"type":"trend","contains":"time","values":{"max":0.916834,"avg":0.011096260000000068,"min":0.000542,"med":0.0015,"p(50)":0.0015,"p(95)":0.005502049999999998,"p(99)":0.3768191699999985}},"http_req_receiving":{"type":"trend","contains":"time","values":{"min":0.005,"med":0.021,"p(50)":0.021,"p(95)":0.07484434999999999,"p(99)":0.13909316,"max":1.040542,"avg":0.03188410799999997}},"http_req_sending":{"type":"trend","contains":"time","values":{"max":1.240833,"avg":0.012556742000000008,"min":0.00225,"med":0.006167,"p(50)":0.006167,"p(95)":0.024696149999999976,"p(99)":0.060369669999999966}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"p(50)":32.155103999999994,"p(95)":95.91642680000001,"p(99)":125.38881823999999,"max":159.23275,"avg":41.419282618999944,"min":11.985208,"med":32.155103999999994},"thresholds":{"max>=0":{"ok":true}}},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(95)":0,"p(99)":0.04960341999999998,"max":0.26025,"avg":0.001535375,"min":0,"med":0,"p(50)":0}},"http_req_tls_handshaking":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0}},"http_req_failed":{"values":{"rate":0,"passes":0,"fails":1000},"type":"rate","contains":"default"},"http_req_duration":{"type":"trend","contains":"time","values":{"min":11.985208,"med":32.155103999999994,"p(50)":32.155103999999994,"p(95)":95.91642680000001,"p(99)":125.38881823999999,"max":159.23275,"avg":41.419282618999944}},"http_req_waiting":{"values":{"p(95)":95.80526044999999,"p(99)":125.32728891999999,"max":159.197542,"avg":41.37484176899995,"min":11.967916,"med":32.1255625,"p(50)":32.1255625},"type":"trend","contains":"time"},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":144140.61752027954}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":383.35270617095625}},"vus_max":{"type":"gauge","contains":"default","values":{"value":16,"min":16,"max":16}},"checks":{"type":"rate","contains":"default","values":{"fails":0,"rate":1,"passes":1000}},"vus":{"type":"gauge","contains":"default","values":{"max":16,"value":16,"min":16}},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":187842.82602376858}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(99)":125.55100273999999,"max":159.352416,"avg":41.535506086000005,"min":12.0395,"med":32.22275,"p(50)":32.22275,"p(95)":96.1073917}}}}
@@ -0,0 +1 @@
{"root_group":{"name":"","path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[{"path":"::message 201","id":"6445aff337e1ade0bc10402fbac79882","passes":1000,"fails":0,"name":"message 201"}]},"options":{"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"],"summaryTimeUnit":"","noColor":true},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":1712.946626},"metrics":{"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":219504.79617570993}},"vus":{"type":"gauge","contains":"default","values":{"max":4,"value":4,"min":4}},"http_req_connecting":{"contains":"time","values":{"max":0.817125,"avg":0.002441042,"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0},"type":"trend"},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.04095805,"p(99)":0.08348448999999994,"max":0.305666,"avg":0.01753987599999998,"min":0.005708,"med":0.013125,"p(50)":0.013125}},"vus_max":{"type":"gauge","contains":"default","values":{"min":4,"max":4,"value":4}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":583.7893515311434}},"http_req_failed":{"contains":"default","values":{"rate":0,"passes":0,"fails":1000},"type":"rate"},"iterations":{"values":{"count":1000,"rate":583.7893515311434},"type":"counter","contains":"default"},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"max":80.708417,"avg":6.772950257000002,"min":4.159875,"med":6.082229,"p(50)":6.082229,"p(95)":8.975899999999996,"p(99)":15.047881669999999},"thresholds":{"max>=0":{"ok":true}}},"http_req_duration":{"type":"trend","contains":"time","values":{"min":4.159875,"med":6.082229,"p(50)":6.082229,"p(95)":8.975899999999996,"p(99)":15.047881669999999,"max":80.708417,"avg":6.772950257000002}},"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_sending":{"type":"trend","contains":"time","values":{"max":1.162834,"avg":0.007186256000000006,"min":0.002042,"med":0.003666,"p(50)":0.003666,"p(95)":0.012379149999999997,"p(99)":0.028256249999999997}},"http_req_blocked":{"type":"trend","contains":"time","values":{"p(95)":0.002419049999999998,"p(99)":0.004376249999999999,"max":1.595334,"avg":0.006733755000000027,"min":0.0005,"med":0.000917,"p(50)":0.000917}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"iteration_duration":{"values":{"avg":6.8403362109999915,"min":4.208792,"med":6.1297085,"p(50)":6.1297085,"p(95)":9.068070199999996,"p(99)":15.198800419999998,"max":80.768959},"type":"trend","contains":"time"},"http_req_waiting":{"type":"trend","contains":"time","values":{"avg":6.748224124999995,"min":4.144166,"med":6.064396,"p(50)":6.064396,"p(95)":8.919716999999997,"p(99)":15.030408749999998,"max":80.68875}},"data_received":{"contains":"data","values":{"count":490000,"rate":286056.7822502603},"type":"counter"}}}
@@ -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.001,2489,0,497.7,0.0,1.856,2.459,2.953,3.887,0.819,125.0,125.0,125.0,113.6,4500,4500,0.127,,0,0.137,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,read,1000,4,1,5.003,3295,0,658.6,0.0,5.215,8.525,18.93,62.826,1.001,125.0,125.0,125.0,114.0,4500,4500,0.162,,0,0.184,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3,read,1000,16,1,5.017,3513,0,700.2,0.0,20.992,39.748,61.908,85.889,1.004,125.0,125.0,125.0,114.1,4500,4500,0.158,,0,0.18,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4,write,1000,1,1,2.457,1000,0,407.0,0.0,2.054,3.852,5.662,14.682,0.757,125.0,125.0,125.0,114.2,4600,5600,0.104,,0,0.131,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5,write,1000,4,1,1.635,1000,0,611.7,0.0,5.685,10.718,12.299,15.93,0.99,125.0,125.0,125.0,115.9,5700,6700,0.149,,0,0.216,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,write,1000,16,1,1.672,1000,0,598.2,0.0,25.08,40.416,77.287,85.162,1.009,125.0,125.2,125.2,118.3,6800,7800,0.143,,0,0.221,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7,read,5000,1,1,5.002,2228,0,445.4,0.0,1.953,2.998,4.121,80.766,0.824,125.0,125.0,125.0,115.6,8500,8500,0.131,,0,0.136,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
8,read,5000,4,1,5.005,3284,0,656.1,0.0,5.419,8.586,15.028,44.245,1.002,125.0,125.0,125.0,115.8,8500,8500,0.154,,0,0.188,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
9,read,5000,16,1,5.015,3033,0,604.8,0.0,23.794,50.607,76.911,128.477,1.006,125.0,125.0,125.0,114.1,8500,8500,0.163,,0,0.196,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
10,write,5000,1,1,2.51,1000,0,398.4,0.0,2.073,3.962,7.609,25.025,0.755,125.0,125.0,125.0,115.9,8600,9600,0.106,,0,0.158,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
11,write,5000,4,1,1.713,1000,0,583.8,0.0,6.082,8.976,15.048,80.708,1.001,125.0,125.0,125.0,116.1,9700,10700,0.139,,0,0.194,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12,write,5000,16,1,2.609,1000,0,383.4,0.0,32.155,95.916,125.389,159.233,0.998,125.1,125.4,125.5,114.4,10800,11800,0.136,,0,0.265,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
13,read,10000,1,1,5.0,2253,0,450.6,0.0,1.854,3.16,6.16,48.953,0.808,125.1,125.1,125.1,118.0,13500,13500,0.125,,0,0.15,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
14,read,10000,4,1,5.004,3164,0,632.2,0.0,5.636,8.469,14.286,55.594,1.002,125.1,125.1,125.2,116.4,13500,13500,0.161,,0,0.192,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
15,read,10000,16,1,5.02,3053,0,608.2,0.0,22.064,56.762,79.454,216.869,1.004,125.2,125.2,125.2,116.0,13500,13500,0.159,,0,0.194,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
16,write,10000,1,1,2.022,1000,0,494.7,0.0,1.891,2.343,3.107,7.76,0.783,125.2,125.2,125.2,115.6,13600,14600,0.1,,0,0.143,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
17,write,10000,4,1,1.589,1000,0,629.2,0.0,5.792,8.023,9.853,69.173,0.994,125.2,125.2,125.2,115.6,14700,15700,0.136,,0,0.188,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
18,write,10000,16,1,1.9,1000,0,526.2,0.0,27.191,56.236,87.509,110.388,1.009,125.2,125.5,125.5,116.9,15800,16800,0.153,,0,0.228,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1 run scenario size concurrency repeat duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_start_mib rss_end_mib rss_max_mib mem_cgroup_end_mib store_messages_start store_messages_end generator_cpu_cores flags check_failed db_cpu_cores series cell attempt config replicas replica_cpus replica_memory db_max_connections step step_kind target_rps sent missing dropped_iterations slo_error_ratio slo_pass fail_reason read_p95_ms write_p95_ms me_p95_ms read_errors write_errors me_errors short_pages vus_max generator_throttled_ratio generator_mem_peak_mib app_cpu_replica_max app_cpu_second_max app_throttled_ratio app_throttled_ms app_mem_peak_mib app_us_per_request db_throttled_ratio db_mem_peak_mib db_us_per_request lb_cpu_cores lb_throttled_ratio cache_cpu_cores vm_busy_cores vm_cpu_pressure db_commits_per_s db_rollbacks_per_s db_wal_mib_per_s db_wal_fsyncs_per_s db_sessions_new db_conn_max db_conn_replica_max db_aas_cpu db_aas_wal db_aas_lock db_aas_lwlock db_aas_io db_aas_other db_idle_in_tx_mean pool_busy_share db_too_many_clients lb_qtime_ms lb_ctime_ms lb_rtime_ms lb_ttime_ms lb_scur_max lb_qcur_max lb_retries lb_redispatches lb_econ lb_eresp lb_chkdown lb_5xx instances instance_share_min instance_share_max host_swapouts signs error_codes level
2 1 read 1000 1 1 5.001 2489 0 497.7 0.0 1.856 2.459 2.953 3.887 0.819 125.0 125.0 125.0 113.6 4500 4500 0.127 0 0.137
3 2 read 1000 4 1 5.003 3295 0 658.6 0.0 5.215 8.525 18.93 62.826 1.001 125.0 125.0 125.0 114.0 4500 4500 0.162 0 0.184
4 3 read 1000 16 1 5.017 3513 0 700.2 0.0 20.992 39.748 61.908 85.889 1.004 125.0 125.0 125.0 114.1 4500 4500 0.158 0 0.18
5 4 write 1000 1 1 2.457 1000 0 407.0 0.0 2.054 3.852 5.662 14.682 0.757 125.0 125.0 125.0 114.2 4600 5600 0.104 0 0.131
6 5 write 1000 4 1 1.635 1000 0 611.7 0.0 5.685 10.718 12.299 15.93 0.99 125.0 125.0 125.0 115.9 5700 6700 0.149 0 0.216
7 6 write 1000 16 1 1.672 1000 0 598.2 0.0 25.08 40.416 77.287 85.162 1.009 125.0 125.2 125.2 118.3 6800 7800 0.143 0 0.221
8 7 read 5000 1 1 5.002 2228 0 445.4 0.0 1.953 2.998 4.121 80.766 0.824 125.0 125.0 125.0 115.6 8500 8500 0.131 0 0.136
9 8 read 5000 4 1 5.005 3284 0 656.1 0.0 5.419 8.586 15.028 44.245 1.002 125.0 125.0 125.0 115.8 8500 8500 0.154 0 0.188
10 9 read 5000 16 1 5.015 3033 0 604.8 0.0 23.794 50.607 76.911 128.477 1.006 125.0 125.0 125.0 114.1 8500 8500 0.163 0 0.196
11 10 write 5000 1 1 2.51 1000 0 398.4 0.0 2.073 3.962 7.609 25.025 0.755 125.0 125.0 125.0 115.9 8600 9600 0.106 0 0.158
12 11 write 5000 4 1 1.713 1000 0 583.8 0.0 6.082 8.976 15.048 80.708 1.001 125.0 125.0 125.0 116.1 9700 10700 0.139 0 0.194
13 12 write 5000 16 1 2.609 1000 0 383.4 0.0 32.155 95.916 125.389 159.233 0.998 125.1 125.4 125.5 114.4 10800 11800 0.136 0 0.265
14 13 read 10000 1 1 5.0 2253 0 450.6 0.0 1.854 3.16 6.16 48.953 0.808 125.1 125.1 125.1 118.0 13500 13500 0.125 0 0.15
15 14 read 10000 4 1 5.004 3164 0 632.2 0.0 5.636 8.469 14.286 55.594 1.002 125.1 125.1 125.2 116.4 13500 13500 0.161 0 0.192
16 15 read 10000 16 1 5.02 3053 0 608.2 0.0 22.064 56.762 79.454 216.869 1.004 125.2 125.2 125.2 116.0 13500 13500 0.159 0 0.194
17 16 write 10000 1 1 2.022 1000 0 494.7 0.0 1.891 2.343 3.107 7.76 0.783 125.2 125.2 125.2 115.6 13600 14600 0.1 0 0.143
18 17 write 10000 4 1 1.589 1000 0 629.2 0.0 5.792 8.023 9.853 69.173 0.994 125.2 125.2 125.2 115.6 14700 15700 0.136 0 0.188
19 18 write 10000 16 1 1.9 1000 0 526.2 0.0 27.191 56.236 87.509 110.388 1.009 125.2 125.5 125.5 116.9 15800 16800 0.153 0 0.228
@@ -0,0 +1,167 @@
# Нагрузочный замер: метка `unit-of-work-before`
- Статус: **complete**
- Commit: `b2fb88f`
- Профиль `quick`: размеры 1k, 5k, 10k; клиенты 1, 4, 16; повторов 1; чтение 5 с после 2 с прогрева; запись 1000 после 100
- Лимиты без swap: API 1 CPU / 2g × 1 реплик за HAProxy 1 CPU / 256m, PostgreSQL 4 CPU / 3g, Valkey 2 CPU / 512m; CPU и RSS API — сумма по репликам; значения — медиана (min–max) по повторам
- Посторонние контейнеры в VM во время замера: domains-api-1, domains-bot-1, domains-postgres-1
## Сценарий `read`
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 498 | 1.86 | 2.46 | 2.95 | 3.9 | 0.82 | 0.14 | 125.0 | 4500 | — |
| 1k | 4 | 659 | 5.21 | 8.53 | 18.93 | 62.8 | 1.00 | 0.18 | 125.0 | 4500 | — |
| 1k | 16 | 700 | 20.99 | 39.75 | 61.91 | 85.9 | 1.00 | 0.18 | 125.0 | 4500 | — |
| 5k | 1 | 445 | 1.95 | 3.00 | 4.12 | 80.8 | 0.82 | 0.14 | 125.0 | 8500 | — |
| 5k | 4 | 656 | 5.42 | 8.59 | 15.03 | 44.2 | 1.00 | 0.19 | 125.0 | 8500 | — |
| 5k | 16 | 605 | 23.79 | 50.61 | 76.91 | 128.5 | 1.01 | 0.20 | 125.0 | 8500 | — |
| 10k | 1 | 451 | 1.85 | 3.16 | 6.16 | 49.0 | 0.81 | 0.15 | 125.1 | 13500 | — |
| 10k | 4 | 632 | 5.64 | 8.47 | 14.29 | 55.6 | 1.00 | 0.19 | 125.1 | 13500 | — |
| 10k | 16 | 608 | 22.06 | 56.76 | 79.45 | 216.9 | 1.00 | 0.19 | 125.2 | 13500 | — |
## Сценарий `write`
| Размер | Клиенты | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS конец, МиБ | Сообщений в начале | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 407 | 2.05 | 3.85 | 5.66 | 14.7 | 0.76 | 0.13 | 125.0 | 4600 | — |
| 1k | 4 | 612 | 5.68 | 10.72 | 12.30 | 15.9 | 0.99 | 0.22 | 125.0 | 5700 | — |
| 1k | 16 | 598 | 25.08 | 40.42 | 77.29 | 85.2 | 1.01 | 0.22 | 125.2 | 6800 | — |
| 5k | 1 | 398 | 2.07 | 3.96 | 7.61 | 25.0 | 0.76 | 0.16 | 125.0 | 8600 | — |
| 5k | 4 | 584 | 6.08 | 8.98 | 15.05 | 80.7 | 1.00 | 0.19 | 125.0 | 9700 | — |
| 5k | 16 | 383 | 32.16 | 95.92 | 125.39 | 159.2 | 1.00 | 0.27 | 125.4 | 10800 | — |
| 10k | 1 | 495 | 1.89 | 2.34 | 3.11 | 7.8 | 0.78 | 0.14 | 125.2 | 13600 | — |
| 10k | 4 | 629 | 5.79 | 8.02 | 9.85 | 69.2 | 0.99 | 0.19 | 125.2 | 14700 | — |
| 10k | 16 | 526 | 27.19 | 56.24 | 87.51 | 110.4 | 1.01 | 0.23 | 125.5 | 15800 | — |
## Память и наполнение по размерам
Объём `messages` — после `VACUUM (ANALYZE)`, до прогонов: в таблице N сообщений читаемого чата и сообщения фоновых чатов (`Сообщений`).
| Размер | Сообщений | RSS API до, МиБ | RSS API после, МиБ | Байт RSS на сообщение | Таблица, МиБ | Индексы, МиБ | Байт в БД на сообщение | Наполнение, сообщ/с | Курсоров в пуле | Пик RSS за размер, МиБ |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 4500 | 121.1 | 124.9 | 895 | 0.8 | 0.6 | 328 | 554 | 9 | 184.6 |
| 5k | 8500 | 121.1 | 124.9 | 473 | 1.5 | 1.1 | 318 | 512 | 49 | 184.5 |
| 10k | 13500 | 121.1 | 125.1 | 313 | 2.3 | 1.9 | 329 | 515 | 99 | 184.5 |
## Планы запроса истории
Страница (`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 | 38 | 0 | 51 | 0.112 | custom |
| 1k | read 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.109 | custom |
| 1k | read 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.067 | custom |
| 1k | read 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 52 | 0 | 51 | 0.079 | generic |
| 1k | read 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 533 | 0 | 51 | 0.132 | custom |
| 1k | read 1k | middle | 500 | no-index | Seq Scan on messages | 100 | 0 | 51 | 0.582 | custom |
| 1k | read 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.503 | custom |
| 1k | read 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom |
| 1k | read 1k | last | 900 | app | Bitmap Heap Scan on messages | 27 | 0 | 51 | 0.190 | custom |
| 1k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 43 | 0 | 51 | 0.097 | custom |
| 1k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.096 | custom |
| 1k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.072 | custom |
| 1k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.063 | generic |
| 1k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 540 | 0 | 51 | 0.121 | custom |
| 1k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 100 | 0 | 51 | 0.497 | custom |
| 1k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 103 | 0 | 51 | 0.446 | custom |
| 1k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.052 | custom |
| 1k | bg 1k | last | 900 | app | Bitmap Heap Scan on messages | 19 | 0 | 51 | 0.145 | custom |
| 1k | bg 100 | first | 0 | app | Bitmap Heap Scan on messages | 73 | 0 | 51 | 0.197 | custom |
| 1k | bg 100 | first | 0 | psql | Bitmap Heap Scan on messages | 73 | 0 | 51 | 0.136 | custom |
| 1k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.057 | generic |
| 1k | bg 100 | first | 0 | no-index | Seq Scan on messages | 100 | 0 | 51 | 0.206 | custom |
| 1k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 72 | 0 | 51 | 0.119 | custom |
| 1k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.047 | custom |
| 1k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.036 | custom |
| 1k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.031 | custom |
| 1k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | generic |
| 1k | bg 10 | first | 0 | no-index | Seq Scan on messages | 100 | 0 | 10 | 0.132 | custom |
| 1k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.030 | custom |
| 1k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 3 | 0 | 10 | 0.018 | custom |
| 5k | read 5k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 27 | 0 | 51 | 0.135 | custom |
| 5k | read 5k | middle | 2500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.130 | generic |
| 5k | read 5k | middle | 2500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.063 | custom |
| 5k | read 5k | middle | 2500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.064 | generic |
| 5k | read 5k | middle | 2500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 2555 | 0 | 51 | 0.402 | custom |
| 5k | read 5k | middle | 2500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 2.243 | custom |
| 5k | read 5k | middle | 2500 | chat_only | Seq Scan on messages | 186 | 0 | 51 | 2.017 | custom |
| 5k | read 5k | middle | 2500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.047 | custom |
| 5k | read 5k | last | 4900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 53 | 0 | 51 | 0.119 | generic |
| 5k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.118 | custom |
| 5k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.122 | generic |
| 5k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.059 | custom |
| 5k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 49 | 0 | 51 | 0.075 | generic |
| 5k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 531 | 0 | 51 | 0.134 | custom |
| 5k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.569 | custom |
| 5k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 187 | 0 | 51 | 0.467 | custom |
| 5k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.055 | custom |
| 5k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.136 | generic |
| 5k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.168 | custom |
| 5k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.080 | custom |
| 5k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.094 | generic |
| 5k | bg 100 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 51 | 0.362 | custom |
| 5k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 83 | 0 | 51 | 0.149 | custom |
| 5k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.053 | custom |
| 5k | bg 10 | first | 0 | app | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.088 | custom |
| 5k | bg 10 | first | 0 | psql | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.049 | custom |
| 5k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.029 | generic |
| 5k | bg 10 | first | 0 | no-index | Seq Scan on messages | 186 | 0 | 10 | 0.205 | custom |
| 5k | bg 10 | first | 0 | chat_only | Bitmap Heap Scan on messages | 12 | 0 | 10 | 0.026 | custom |
| 5k | bg 10 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 10 | 0.020 | custom |
| 10k | read 10k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 18 | 0 | 51 | 0.166 | custom |
| 10k | read 10k | middle | 5000 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.159 | generic |
| 10k | read 10k | middle | 5000 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.056 | custom |
| 10k | read 10k | middle | 5000 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 54 | 0 | 51 | 0.069 | generic |
| 10k | read 10k | middle | 5000 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 5077 | 0 | 51 | 0.621 | custom |
| 10k | read 10k | middle | 5000 | no-index | Seq Scan on messages | 294 | 0 | 51 | 3.760 | custom |
| 10k | read 10k | middle | 5000 | chat_only | Seq Scan on messages | 294 | 0 | 51 | 3.726 | 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 | 54 | 0 | 51 | 0.111 | generic |
| 10k | bg 1k | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.147 | custom |
| 10k | bg 1k | middle | 500 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.129 | generic |
| 10k | bg 1k | middle | 500 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.054 | custom |
| 10k | bg 1k | middle | 500 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 46 | 0 | 51 | 0.066 | generic |
| 10k | bg 1k | middle | 500 | or-cursor | Index Scan using ix_messages_chat_id_created_at_id on messages | 507 | 0 | 51 | 0.141 | custom |
| 10k | bg 1k | middle | 500 | no-index | Seq Scan on messages | 294 | 0 | 51 | 1.061 | custom |
| 10k | bg 1k | middle | 500 | chat_only | Bitmap Heap Scan on messages | 286 | 0 | 51 | 0.467 | custom |
| 10k | bg 1k | middle | 500 | covering | Index Only Scan using bench_variant on messages | 5 | 0 | 51 | 0.051 | custom |
| 10k | bg 1k | last | 900 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 47 | 0 | 51 | 0.131 | generic |
| 10k | bg 100 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.157 | custom |
| 10k | bg 100 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.060 | custom |
| 10k | bg 100 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 51 | 0 | 51 | 0.072 | generic |
| 10k | bg 100 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 51 | 0.415 | custom |
| 10k | bg 100 | first | 0 | chat_only | Bitmap Heap Scan on messages | 95 | 0 | 51 | 0.131 | custom |
| 10k | bg 100 | first | 0 | covering | Index Only Scan using bench_variant on messages | 4 | 0 | 51 | 0.051 | custom |
| 10k | bg 10 | first | 0 | app | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.043 | custom |
| 10k | bg 10 | first | 0 | psql | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.022 | custom |
| 10k | bg 10 | first | 0 | generic | Index Scan using ix_messages_chat_id_created_at_id on messages | 12 | 0 | 10 | 0.026 | generic |
| 10k | bg 10 | first | 0 | no-index | Seq Scan on messages | 294 | 0 | 10 | 0.358 | custom |
| 10k | bg 10 | first | 0 | chat_only | Index Scan using bench_variant on messages | 12 | 0 | 10 | 0.023 | 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.57 (4.92–5.86) | 487 (487–499) | 20.2 (11.2–20.2) | ok |
| 1k | chat_only | 5000 | 0.1 | 10.5 | 4.77 (4.73–5.09) | 399 (399–399) | 18.0 (18.0–18.0) | ok |
| 1k | covering | 5000 | 1.2 | 159.6 | 5.36 (5.30–6.96) | 693 (693–693) | 24.2 (24.2–24.2) | index row requires 12072 bytes, maximum size is 8191 |
| 1k | none | 5000 | 0.0 | 0.0 | 4.29 (4.26–4.37) | 314 (314–314) | 16.6 (16.6–16.6) | ok |
| 5k | app | 5000 | 0.7 | 60.4 | 5.05 (4.93–6.68) | 506 (500–506) | 21.8 (17.8–21.8) | ok |
| 5k | chat_only | 5000 | 0.1 | 9.0 | 4.76 (4.70–4.76) | 421 (421–422) | 19.2 (19.2–19.6) | ok |
| 5k | covering | 5000 | 1.8 | 160.4 | 5.81 (5.45–5.87) | 703 (703–703) | 25.0 (25.0–25.2) | index row requires 12072 bytes, maximum size is 8191 |
| 5k | none | 5000 | 0.0 | 0.0 | 4.27 (4.25–4.70) | 336 (336–336) | 17.8 (17.6–17.8) | ok |
| 10k | app | 5000 | 1.0 | 59.5 | 5.12 (5.01–6.31) | 542 (540–557) | 31.4 (19.0–31.6) | ok |
| 10k | chat_only | 5000 | 0.1 | 8.3 | 4.80 (4.72–5.69) | 452 (450–454) | 29.2 (27.6–29.4) | ok |
| 10k | covering | 5000 | 2.6 | 160.4 | 5.59 (5.47–7.14) | 748 (748–749) | 35.4 (34.8–35.4) | index row requires 12072 bytes, maximum size is 8191 |
| 10k | none | 5000 | 0.0 | 0.0 | 4.36 (4.34–4.45) | 365 (365–367) | 27.8 (27.4–27.8) | ok |
## Кривая наполнения 10k: запись при росте хранилища, 32 клиента
| Порция | Сообщений после | RPS | p50, мс | p95, мс | p99, мс | max, мс | CPU API, ядер | CPU БД, ядер | RSS, МиБ | Пометки |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 13500 | 515 | 56.009 | 121.243 | 188.234 | 417.242 | 0.996 | 0.22 | 125.1 | — |
@@ -0,0 +1,71 @@
# Сравнение меток: `unit-of-work-before` → `unit-of-work-after`
- Команда: `make bench_compare BEFORE=unit-of-work-before AFTER=unit-of-work-after AA=unit-of-work-aa`
- «До» и «после» — медиана повторов ячейки, в скобках min–max. Δ RPS — отношение медиан минус единица.
- CPU на запрос — `app_cpu_cores / rps`, медиана по повторам; задержки — медианы по повторам, «до → после».
- Уровень шума — наибольшее по ячейкам сценария изменение медианы RPS между `unit-of-work-aa` и `unit-of-work-before`. Он имеет смысл, только если код приложения в этих метках одинаков; это проверяется по git, команда этого не видит.
- «Эффект» — разбросы повторов не пересекаются и изменение медианы больше уровня шума сценария; иначе «в пределах шума».
## Метки
| | `unit-of-work-before` | `unit-of-work-after` | `unit-of-work-aa` |
|---|---|---|---|
| Commit | `b2fb88f` | `6ba74b1` | `b2fb88f` |
| Начало прогона | 2026-10-31T20:32:16+00:00 | 2026-10-31T20:23:07+00:00 | 2026-10-31T20:19:23+00:00 |
| Статус | complete | complete | complete |
| Версии в образе | python 3.12.14, fastapi 0.141.1, starlette 1.7.0, pydantic 2.13.5, uvicorn 0.54.0, sqlalchemy 2.1.1, asyncpg 0.31.0, redis 8.1.0 | python 3.12.14, fastapi 0.141.1, starlette 1.7.0, pydantic 2.13.5, uvicorn 0.54.0, sqlalchemy 2.1.1, asyncpg 0.31.0, redis 8.1.0 | python 3.12.14, fastapi 0.141.1, starlette 1.7.0, pydantic 2.13.5, uvicorn 0.54.0, sqlalchemy 2.1.1, asyncpg 0.31.0, redis 8.1.0 |
| Машина | Apple M3 Pro (6 P + 6 E), ВМ 12 vCPU / 7.7 GiB, Docker 29.9.2 | Apple M3 Pro (6 P + 6 E), ВМ 12 vCPU / 7.7 GiB, Docker 29.9.2 | Apple M3 Pro (6 P + 6 E), ВМ 12 vCPU / 7.7 GiB, Docker 29.9.2 |
| Хост в начале | выгрузок в swap за прогон 0, AC Power | выгрузок в swap за прогон 0, AC Power | выгрузок в swap за прогон 0, AC Power |
## Замечания
- `unit-of-work-before`: посторонние контейнеры: domains-api-1, domains-bot-1, domains-postgres-1
- `unit-of-work-after`: посторонние контейнеры: domains-api-1, domains-bot-1, domains-postgres-1
- `unit-of-work-aa`: посторонние контейнеры: domains-api-1, domains-bot-1, domains-postgres-1
## Уровень шума
| Сценарий | Наибольшее изменение RPS, `unit-of-work-aa` → `unit-of-work-before` | Ячейка |
|---|---|---|
| read | 14.8% | 5k × 1 |
| write | 34.8% | 5k × 16 |
## Сценарий `read`
| Размер | Клиенты | RPS до | RPS после | Δ RPS | Вывод | CPU на запрос, мкс | Δ CPU, мкс | p50, мс | p95, мс | p99, мс |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 498 (498–498) | 417 (417–417) | -16.2% | эффект | 1646 → 1811 | +165 | 1.86 → 2.22 | 2.46 → 2.92 | 2.95 → 3.76 |
| 1k | 4 | 659 (659–659) | 618 (618–618) | -6.1% | в пределах шума | 1520 → 1606 | +86 | 5.21 → 6.08 | 8.53 → 7.63 | 18.93 → 10.92 |
| 1k | 16 | 700 (700–700) | 568 (568–568) | -18.8% | эффект | 1434 → 1767 | +333 | 20.99 → 26.01 | 39.75 → 56.30 | 61.91 → 66.86 |
| 5k | 1 | 445 (445–445) | 431 (431–431) | -3.2% | в пределах шума | 1850 → 1751 | -99 | 1.95 → 2.16 | 3.00 → 2.79 | 4.12 → 3.46 |
| 5k | 4 | 656 (656–656) | 615 (615–615) | -6.2% | в пределах шума | 1527 → 1613 | +86 | 5.42 → 5.97 | 8.59 → 7.60 | 15.03 → 13.78 |
| 5k | 16 | 605 (605–605) | 565 (565–565) | -6.6% | в пределах шума | 1663 → 1775 | +112 | 23.79 → 25.44 | 50.61 → 56.14 | 76.91 → 67.89 |
| 10k | 1 | 451 (451–451) | 417 (417–417) | -7.4% | в пределах шума | 1793 → 1805 | +12 | 1.85 → 2.22 | 3.16 → 2.96 | 6.16 → 4.16 |
| 10k | 4 | 632 (632–632) | 596 (596–596) | -5.7% | в пределах шума | 1585 → 1667 | +82 | 5.64 → 6.01 | 8.47 → 8.84 | 14.29 → 16.64 |
| 10k | 16 | 608 (608–608) | 566 (566–566) | -6.9% | в пределах шума | 1651 → 1771 | +120 | 22.06 → 26.08 | 56.76 → 54.08 | 79.45 → 63.84 |
Δ RPS по ячейкам: от -18.8% до -3.2%, медиана -6.6%.
## Сценарий `write`
| Размер | Клиенты | RPS до | RPS после | Δ RPS | Вывод | CPU на запрос, мкс | Δ CPU, мкс | p50, мс | p95, мс | p99, мс |
|---|---|---|---|---|---|---|---|---|---|---|
| 1k | 1 | 407 (407–407) | 376 (376–376) | -7.7% | в пределах шума | 1860 → 2009 | +149 | 2.05 → 2.40 | 3.85 → 3.63 | 5.66 → 5.18 |
| 1k | 4 | 612 (612–612) | 585 (585–585) | -4.3% | в пределах шума | 1618 → 1682 | +63 | 5.68 → 6.51 | 10.72 → 7.79 | 12.30 → 10.01 |
| 1k | 16 | 598 (598–598) | 518 (518–518) | -13.4% | в пределах шума | 1687 → 1954 | +267 | 25.08 → 28.68 | 40.42 → 42.58 | 77.29 → 77.10 |
| 5k | 1 | 398 (398–398) | 400 (400–400) | +0.4% | в пределах шума | 1895 → 1892 | -3 | 2.07 → 2.33 | 3.96 → 3.11 | 7.61 → 4.17 |
| 5k | 4 | 584 (584–584) | 566 (566–566) | -3.0% | в пределах шума | 1715 → 1735 | +20 | 6.08 → 6.54 | 8.98 → 9.23 | 15.05 → 13.66 |
| 5k | 16 | 383 (383–383) | 527 (527–527) | +37.5% | эффект | 2603 → 1922 | -681 | 32.16 → 27.81 | 95.92 → 44.96 | 125.39 → 74.63 |
| 10k | 1 | 495 (495–495) | 378 (378–378) | -23.5% | в пределах шума | 1583 → 1977 | +394 | 1.89 → 2.41 | 2.34 → 3.45 | 3.11 → 4.91 |
| 10k | 4 | 629 (629–629) | 546 (546–546) | -13.2% | в пределах шума | 1580 → 1837 | +257 | 5.79 → 6.72 | 8.02 → 9.69 | 9.85 → 12.87 |
| 10k | 16 | 526 (526–526) | 515 (515–515) | -2.2% | в пределах шума | 1918 → 1962 | +44 | 27.19 → 29.18 | 56.24 → 44.99 | 87.51 → 66.27 |
Δ RPS по ячейкам: от -23.5% до +37.5%, медиана -4.3%.
## Память
| Размер | Байт RSS на сообщение до | после | RSS после наполнения до, МиБ | после | Байт в БД на сообщение до | после |
|---|---|---|---|---|---|---|
| 1k | 895 | 1430 | 124.9 | 127.6 | 328 | 330 |
| 5k | 473 | 758 | 124.9 | 127.6 | 318 | 321 |
| 10k | 313 | 478 | 125.1 | 127.6 | 329 | 328 |
+18 -6
View File
@@ -1,21 +1,33 @@
# Отказ одной реплики API # Отказ одной реплики API
- Команды: `make test-failover ACTION_SCRIPT=scripts/stop-one.sh`, `make replicas`, сдвиг очереди LB одним запросом, `STOP_MODE=kill make test-failover ACTION_SCRIPT=scripts/stop-one.sh`, `make replicas` - Команды: `make test-failover ACTION_SCRIPT=scripts/stop-one.sh STOP_MODE=stop STOP_ONE_LOG=<файл>`, `make replicas`, `make test-failover ACTION_SCRIPT=scripts/stop-one.sh STOP_MODE=kill STOP_ONE_LOG=<файл>`, `make replicas`, `make lb_stats`
- Дата: 2026-10-31, 13:28:58–13:29:36 UTC; оба прогона — код выхода 0 - Дата: 2026-10-31, 20:41:38–20:42:18 UTC; оба прогона — код выхода 0
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`
- `STOP_ONE_LOG` назвал реплики: первый прогон `TARGET_INSTANCE_ID=e933a5daf6b3`, режим `stop`; второй `TARGET_INSTANCE_ID=d7f1b8c394b9`, режим `kill` - `STOP_ONE_LOG` назвал реплику: в обоих прогонах `TARGET_INSTANCE_ID=057d8e7efce4`, контейнер `057d8e7efce4…`, остановленный контейнер совпадает с целью; между прогонами `make replicas` вернул реплику
## `stop` ## `stop`
```text ```text
{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 1.072} {"observed_instances_before": 2, "successful_writes": 116, "failed_attempts": 0, "first_recovery_seconds": 1.719}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
2026-10-31T20:41:40Z TARGET_INSTANCE_ID=057d8e7efce4 container=057d8e7efce4c79db09e10ea18dc662a247abe31ec2753d987f7cc8aa1ab365a mode=stop
``` ```
## `kill` ## `kill`
```text ```text
{"observed_instances_before": 2, "successful_writes": 121, "failed_attempts": 0, "first_recovery_seconds": 0.867} {"observed_instances_before": 2, "successful_writes": 123, "failed_attempts": 0, "first_recovery_seconds": 0.85}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
2026-10-31T20:42:00Z TARGET_INSTANCE_ID=057d8e7efce4 container=057d8e7efce4c79db09e10ea18dc662a247abe31ec2753d987f7cc8aa1ab365a mode=kill
```
## После `make replicas`
```text
svname addr status check_status scur stot econ wretr wredis hrsp_5xx
api-1 172.31.0.9:8080 UP L7OK 0 304 0 0 0 0
api-2 172.31.0.8:8080 UP L7OK 0 61 0 0 5 0
BACKEND - UP - 0 365 5 0 5 5
free slots: 6
``` ```
+35 -91
View File
@@ -1,106 +1,50 @@
# Процесс relay # Процесс relay
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 relay-process` - Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 relay-process`
- Дата: 2026-10-31, 16:01:07–16:01:59 UTC; код выхода 0 - Дата: 2026-10-31, 20:47:32–20:48:29 UTC; код выхода 0
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`
- Спеки: `container-run`, `graceful-shutdown`, `service-configuration`, `job-outbox` - Спеки: `container-run`, `graceful-shutdown`, `service-configuration`, `job-outbox`
- Что нового с `e2a6427`: `docker stop relay` при замороженном брокере с намерением в работе — 1,81 с, код 0, после запуска relay вложение `ready`
- Значений секретов в выводе нет, окружение проверяется только по именам - Значений секретов в выводе нет, окружение проверяется только по именам
- Вывод сокращён: однотипные строки таблицы «record names …», «default …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым
```text ```text
Started relay:
poll_interval_seconds: 0.25
batch_size: 100
max_published_backlog: 1000
republish_after_seconds: 300
failure_pause_seconds: 2
broker_host: rabbitmq
broker_port: 5672
broker_queue: messenger.attachment.process.v1
broker_publish_timeout_seconds: 2
database_host: postgres
database_port: 5432
database_name: messenger
database_pool_size: 1
RELAY__BATCH_SIZE=0: exit 2, errors [{'loc': 'relay.batch_size', 'msg': 'Input should be greater than or equal to 1'}] RELAY__BATCH_SIZE=0: exit 2, errors [{'loc': 'relay.batch_size', 'msg': 'Input should be greater than or equal to 1'}]
RELAY__MAX_PUBLISHED_BACKLOG=-1: exit 2, errors [{'loc': 'relay.max_published_backlog', 'msg': 'Input should be greater than or equal to 0'}] RELAY__MAX_PUBLISHED_BACKLOG=-1: exit 2, errors [{'loc': 'relay.max_published_backlog', 'msg': 'Input should be greater than or equal to 0'}]
RELAY__POLL_INTERVAL_SECONDS=abc: exit 2, errors [{'loc': 'relay.poll_interval_seconds', 'msg': 'Input should be a valid number, unable to parse string as a number'}] RELAY__POLL_INTERVAL_SECONDS=abc: exit 2, errors [{'loc': 'relay.poll_interval_seconds', 'msg': 'Input should be a valid number, unable to parse string as a number'}]
docker compose stop relay: 0.2 s docker compose stop relay: 0.4 s
docker stop after 0.3 s: 0.12 s, exit 0, records ['Stopped relay before startup'] docker stop after 0.3 s: 0.14 s, exit 0, records ['Stopped relay before startup']
docker stop after 0.2 s: 0.08 s, exit 0, records ['Stopped relay before startup'] docker stop after 0.2 s: 0.07 s, exit 0, records ['Stopped relay before startup']
docker stop after 0.4 s: 0.12 s, exit 0, records ['Stopped relay before startup'] docker stop after 0.4 s: 0.08 s, exit 0, records ['Stopped relay before startup']
stop frozen broker: docker stop relay took 1.81 s stop frozen broker: docker stop relay took 1.81 s
PID 1 of the relay expected python -m src.relay got python -m src.relay PID 1 of the relay expected python -m src.relay got python -m src.relay
healthcheck expected NONE got NONE healthcheck expected NONE got NONE
limit NanoCpus expected 250000000 got 250000000 limit NanoCpus expected 250000000 got 250000000
limit Memory expected 268435456 got 268435456 limit Memory expected 268435456 got 268435456
S3__* in the environment expected no got no S3__*, S3_*, CACHE__*, VALKEY* in the environment expected no got no
S3_* in the environment expected no got no _imaging in mtusi-lab5-api-19 expected no got no
CACHE__* in the environment expected no got no _imaging in mtusi-lab5-api-20 expected no got no
VALKEY* in the environment expected no got no _imaging in PID 1 of the relay expected no got no
_imaging in mtusi-lab5-api-15 expected no got no 'Started relay' record, все поля и значения по умолчанию совпало
_imaging in mtusi-lab5-api-16 expected no got no RELAY__* неверные: exit code 2, names the field, hides the value совпало у трёх
API replicas checked expected yes got yes env override batch_size expected 7 got 7
_imaging in PID 1 of the relay expected no got no env override poll_interval_seconds expected 1.0 got 1.0
'Started relay' record expected yes got yes stop idle: command, container, record exit_code 0, under 10 s, last record Stopped relay совпало
record names broker_host expected yes got yes early stop 0.2, 0.3, 0.4 s: exit 0, within 1 s, 'Stopped relay before startup' совпало
record names broker_port expected yes got yes relay running before restart expected yes got yes
record names broker_queue expected yes got yes scripts/restart.sh expected 0 got 0
record names broker_publish_timeout_seconds expected yes got yes LB ready after restart expected yes got yes
record names database_host expected yes got yes relay StartedAt unchanged expected yes got yes
record names database_port expected yes got yes relay RestartCount expected 0 got 0
record names database_name expected yes got yes new upload after restart expected 202 got 202
record names database_pool_size expected yes got yes new upload becomes ready expected yes got yes
default poll_interval_seconds expected 0.25 got 0.25 stop frozen broker: broker paused expected 0 got 0
default batch_size expected 100.0 got 100.0 stop frozen broker: upload expected 202 got 202
default max_published_backlog expected 1000.0 got 1000.0 stop frozen broker: under 10 s expected yes got yes
default republish_after_seconds expected 300.0 got 300.0 stop frozen broker: container exit code expected 0 got 0
default failure_pause_seconds expected 2.0 got 2.0 stop frozen broker: OOM killed expected false got false
RELAY__BATCH_SIZE=0 exit code expected 2 got 2 stop frozen broker: last record expected Stopped relay got Stopped relay
RELAY__BATCH_SIZE names the field expected yes got yes stop frozen broker: upload after start expected ready got ready
RELAY__BATCH_SIZE hides the value expected yes got yes
RELAY__MAX_PUBLISHED_BACKLOG=-1 exit code expected 2 got 2
RELAY__MAX_PUBLISHED_BACKLOG names the field expected yes got yes
RELAY__MAX_PUBLISHED_BACKLOG hides the value expected yes got yes
RELAY__POLL_INTERVAL_SECONDS=abc exit code expected 2 got 2
RELAY__POLL_INTERVAL_SECONDS names the field expected yes got yes
RELAY__POLL_INTERVAL_SECONDS hides the value expected yes got yes
env override container started expected 0 got 0
env override batch_size expected 7 got 7
env override poll_interval_seconds expected 1.0 got 1.0
stop idle: command exit code expected 0 got 0
stop idle: container exit code expected 0 got 0
stop idle: under 10 s expected yes got yes
stop idle: last record expected Stopped relay got Stopped relay
stop idle: record exit_code expected 0 got 0
docker compose start relay expected 0 got 0
early stop 0.3 s: docker stop expected 0 got 0
early stop 0.3 s: exit code expected 0 got 0
early stop 0.3 s: within 1 s expected yes got yes
early stop 0.2 s: docker stop expected 0 got 0
early stop 0.2 s: exit code expected 0 got 0
early stop 0.2 s: within 1 s expected yes got yes
early stop 0.4 s: docker stop expected 0 got 0
early stop 0.4 s: exit code expected 0 got 0
early stop 0.4 s: within 1 s expected yes got yes
'Stopped relay before startup' seen expected yes got yes
relay running before restart expected yes got yes
scripts/restart.sh expected 0 got 0
LB ready after restart expected yes got yes
relay StartedAt unchanged expected yes got yes
relay RestartCount expected 0 got 0
new upload after restart expected 202 got 202
new upload becomes ready expected yes got yes
stop frozen broker: broker paused expected 0 got 0
stop frozen broker: upload expected 202 got 202
stop frozen broker: command exit code expected 0 got 0
stop frozen broker: under 10 s expected yes got yes
stop frozen broker: container exit code expected 0 got 0
stop frozen broker: OOM killed expected false got false
stop frozen broker: last record expected Stopped relay got Stopped relay
stop frozen broker: relay back expected 0 got 0
stop frozen broker: upload after start expected ready got ready
PASS: the relay process matches the spec PASS: the relay process matches the spec
worker and relay running at the end: yes worker and relay running at the end: yes
``` ```
+17 -38
View File
@@ -1,48 +1,27 @@
# Сохранность при рестарте стенда # Сохранность при рестарте стенда
- Команда: `make test-persistence ACTION_SCRIPT=scripts/restart.sh` - Команда: `make test-persistence ACTION_SCRIPT=scripts/restart.sh`
- Дата: 2026-10-31, 13:28:32–13:28:58 UTC; код выхода 0 - Дата: 2026-10-31, 20:41:09–20:41:38 UTC; код выхода 0
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`) - Commit: `6ba74b1` (ветка `feat/unit-of-work`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD` - Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`
- Что проверяет публичная проверка: данные, прежний токен и с лабы 4 оригинал вложения после hook (`tests/README.md`) - Что проверяет публичная проверка: данные, прежний токен и с лабы 4 оригинал вложения после hook (`tests/README.md`)
- Что перезапустил hook (сверка `docker inspect` до и после): `api-9`, `api-10`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — те же ID контейнеров, новый `StartedAt`, `RestartCount` 0; `relay`, `worker` и `cleaner` hook не трогает, `StartedAt` прежний. Одноразовые `migrate` и `s3-bootstrap` повторяет `start api` (no-op). Volumes не удалялись. Номера реплик `9` и `10` остались от прежней поочерёдной замены: compose нумерует их по возрастанию - Что перезапустил hook (сверка `docker inspect` до и после): `api-19`, `api-20`, `haproxy`, `postgres`, `rabbitmq`, `s3`, `valkey` — новый `StartedAt`; `relay`, `worker` и `cleaner` hook не трогает, `StartedAt` прежний. Одноразовые `migrate` и `s3-bootstrap` повторяет `start api` (no-op). Volumes не удалялись. Номера реплик остались от прежней поочерёдной замены
```text ```text
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
``` ```
## Контейнеры до hook | Контейнер | `StartedAt` до | `StartedAt` после |
|---|---|---|
```text | `api-19` | 20:36:51.541 | 20:41:35.251 |
/mtusi-lab5-api-10 e933a5daf6b3 2026-10-31T13:26:00.623212387Z rc=0 | `api-20` | 20:36:51.475 | 20:41:35.165 |
/mtusi-lab5-api-9 d7f1b8c394b9 2026-10-31T13:26:53.397829301Z rc=0 | `haproxy-1` | 20:36:51.709 | 20:41:35.345 |
/mtusi-lab5-cleaner-1 9415ac2889c0 2026-10-31T13:20:34.366532625Z rc=0 | `postgres-1` | 20:36:40.595 | 20:41:11.477 |
/mtusi-lab5-haproxy-1 557201f42028 2026-10-31T13:26:00.690182054Z rc=0 | `rabbitmq-1` | 20:36:40.847 | 20:41:12.525 |
/mtusi-lab5-migrate-1 16e853e4f79f 2026-10-31T13:25:57.417430928Z rc=0 | `s3-1` | 20:36:40.723 | 20:41:26.616 |
/mtusi-lab5-postgres-1 0d7389e206c8 2026-10-31T13:25:38.574109085Z rc=0 | `valkey-1` | 20:36:40.953 | 20:41:11.448 |
/mtusi-lab5-rabbitmq-1 bd7dd2c37915 2026-10-31T13:26:27.829003386Z rc=0 | `migrate-1` | 20:39:32.831 | 20:41:31.519 |
/mtusi-lab5-relay-1 45d495d13c79 2026-10-31T13:24:27.565741511Z rc=0 | `s3-bootstrap-1` | 20:39:32.750 | 20:41:31.601 |
/mtusi-lab5-s3-1 54c230a7447d 2026-10-31T13:25:53.550943384Z rc=0 | `relay-1` | 20:36:45.321 | 20:36:45.321 |
/mtusi-lab5-s3-bootstrap-1 d4b943f39578 2026-10-31T13:25:57.492476428Z rc=0 | `worker-1` | 20:36:51.621 | 20:36:51.621 |
/mtusi-lab5-valkey-1 d184ed2f645e 2026-10-31T13:25:38.63768621Z rc=0 | `cleaner-1` | 20:36:51.400 | 20:36:51.400 |
/mtusi-lab5-worker-1 ecbefb38ea10 2026-10-31T13:25:35.752754709Z rc=0
```
## Контейнеры после hook
```text
/mtusi-lab5-api-10 e933a5daf6b3 2026-10-31T13:28:57.518200469Z rc=0
/mtusi-lab5-api-9 d7f1b8c394b9 2026-10-31T13:28:57.450241969Z rc=0
/mtusi-lab5-cleaner-1 9415ac2889c0 2026-10-31T13:20:34.366532625Z rc=0
/mtusi-lab5-haproxy-1 557201f42028 2026-10-31T13:28:57.588217303Z rc=0
/mtusi-lab5-migrate-1 16e853e4f79f 2026-10-31T13:28:54.320519301Z rc=0
/mtusi-lab5-postgres-1 0d7389e206c8 2026-10-31T13:28:35.483173417Z rc=0
/mtusi-lab5-rabbitmq-1 bd7dd2c37915 2026-10-31T13:28:36.510452751Z rc=0
/mtusi-lab5-relay-1 45d495d13c79 2026-10-31T13:24:27.565741511Z rc=0
/mtusi-lab5-s3-1 54c230a7447d 2026-10-31T13:28:50.457374133Z rc=0
/mtusi-lab5-s3-bootstrap-1 d4b943f39578 2026-10-31T13:28:54.393025259Z rc=0
/mtusi-lab5-valkey-1 d184ed2f645e 2026-10-31T13:28:35.455023792Z rc=0
/mtusi-lab5-worker-1 ecbefb38ea10 2026-10-31T13:25:35.752754709Z rc=0
```
@@ -0,0 +1,456 @@
{
"label": "unit-of-work-previous",
"status": "complete",
"started_at": "2026-10-31T20:29:24+00:00",
"command": "uv run python bench/run.py --profile rollout --from b2fb88f --label unit-of-work-previous",
"git": {
"commit": "6ba74b1",
"dirty": false
},
"overrides": {
"rollout_from": "b2fb88f"
},
"host_state": {
"start": {
"swap_used_mib": 7479.62,
"swap_total_mib": 8192.0,
"swapouts": 7156652,
"memory_free_percent": 43,
"power": "AC Power",
"battery_percent": 80
},
"end": {
"swap_used_mib": 7367.62,
"swap_total_mib": 8192.0,
"swapouts": 7156652,
"memory_free_percent": 40,
"power": "AC Power",
"battery_percent": 80
},
"swapouts_delta": 0,
"slept_seconds": 0
},
"host_warnings": [],
"other_containers": [
"domains-api-1",
"domains-bot-1",
"domains-postgres-1"
],
"resources": {
"budget": {
"cpus": 6.75,
"memory_gib": 3.0,
"peak_replicas": 3,
"vm_cpus": 12,
"vm_memory_gib": 7.75,
"generator": "no limit"
},
"mode": "scan",
"interval_s": 1.0,
"containers": {
"6e46ca7c70b7": {
"name": "mtusi-bench-haproxy",
"role": "haproxy"
},
"d518795230b4": {
"name": "mtusi-bench-api-1",
"role": "api"
},
"e324fd0a2b33": {
"name": "mtusi-bench-api-2",
"role": "api"
},
"a4aaf0bb2416": {
"name": "mtusi-bench-postgres",
"role": "postgres"
},
"0da23abd16b6": {
"name": "mtusi-bench-valkey",
"role": "valkey"
},
"3ca3a7e9041d": {
"name": "mtusi-bench-k6",
"role": "k6"
},
"7871c586908b": {
"name": "mtusi-bench-sampler",
"role": "sampler"
},
"523402ea115d": {
"name": "mtusi-bench-api-4",
"role": "api"
},
"8df7bccbf1ef": {
"name": "mtusi-bench-api-3",
"role": "api"
},
"2b7f7e323ffe": {
"name": "mtusi-bench-migrate-1",
"role": "migrate"
}
},
"unmapped": 3
},
"app_image": {
"tag": "mtusi-messenger:bench",
"id": "sha256:6c2c1c3e526be20978912b877ac07b6788e3665d28b5cee341359d86e7291490",
"versions": {
"python": "3.12.14",
"fastapi": "0.141.1",
"starlette": "1.7.0",
"pydantic": "2.13.5",
"uvicorn": "0.54.0",
"sqlalchemy": "2.1.1",
"asyncpg": "0.31.0",
"redis": "8.1.0"
}
},
"generator": {
"image": "grafana/k6:2.3.0@sha256:9c2dee7f8ed74d317e4027c06a10f169b625638189de8d4555d0b3486a5aeb34",
"version": "k6 v2.3.0 (commit/e088784614, go1.27.1, linux/arm64)"
},
"docker": {
"server": "29.9.2",
"vm_os": "Docker Desktop",
"kernel": "7.0.14-linuxkit",
"vm_cpus": 12,
"vm_memory_gib": 7.7,
"cgroup": "2",
"logging_driver": "local"
},
"host": {
"os": "macOS 26.7.1",
"machine": "Apple M3 Pro",
"memory_gib": 18.0,
"performance_cores": 6,
"efficiency_cores": 6
},
"profile": {
"name": "rollout",
"sizes": [
1000
],
"concurrency": [],
"repeats": 0,
"read_warmup_s": 0,
"read_measure_s": 0,
"write_warmup": 0,
"write_measure": 0,
"prefill_chunk": 25000,
"prefill_vus": 8,
"text_length": 64,
"page_limit": 50,
"walk_limit": 100,
"cursor_pool": 1000,
"members": 10,
"seed": 20260930,
"warmup_seed_shift": 1000003,
"generator_cpu_limit": 4.0,
"cpus": "1",
"memory": "512m",
"db_cpus": "2",
"db_memory": "1g",
"cache_cpus": "0.5",
"cache_memory": "128m",
"session_ttl_seconds": 21600,
"background": [],
"index_variants": [
[
"chat_only",
"(chat_id)"
],
[
"covering",
"(chat_id, created_at, id) INCLUDE (sender_id, text)"
]
],
"write_probe_rows": 20000,
"write_probe_repeats": 3,
"restore": false,
"restore_jobs": 4,
"restore_write_load": 5000,
"restore_write_vus": 10,
"replicas": 2,
"lb_cpus": "1",
"lb_memory": "256m",
"failover_modes": [],
"failover_write_rate": 100,
"failover_read_rate": 100,
"failover_before_s": 0,
"failover_down_s": 0,
"failover_after_s": 0,
"failover_success": 0.99,
"failover_pre_vus": 600,
"failover_max_vus": 1500,
"rollout_from": "b2fb88f",
"rollout_before_s": 15,
"rollout_budget_s": 90,
"rollout_after_s": 15,
"sample_resources": true,
"uploads_variants": [],
"uploads_before": "",
"uploads_success_codes": [
[
"before",
201
],
[
"unlimited",
202
],
[
"limited",
202
]
],
"uploads_sizes": [],
"uploads_clients": [],
"uploads_ramp_s": 3,
"uploads_window_s": 20,
"uploads_unlimited_env": [
[
"UPLOADS__MAX_CONCURRENT",
"1000"
],
[
"UPLOADS__MAX_WAITING",
"0"
]
],
"uploads_sample_interval_s": 0.2,
"s3_cpus": "1",
"s3_memory": "512m",
"broker_cpus": "1",
"broker_memory": "512m",
"relay_cpus": "0.25",
"relay_memory": "256m",
"worker_cpus": "1",
"worker_memory": "1g",
"cleaner_cpus": "0.25",
"cleaner_memory": "256m",
"reconcile_stages": [],
"reconcile_before": "",
"reconcile_s4_clean": 0,
"reconcile_s4_candidates": [],
"reconcile_s4_max_changes": 100,
"reconcile_grace_s": 30,
"reconcile_fresh_wait_s": 2,
"reconcile_fast_cpus": "1",
"reconcile_default_rate": 2000,
"reconcile_background": [
[
"download",
300
],
[
"write",
50
],
[
"read",
50
]
],
"reconcile_downloads": 5000,
"reconcile_bg_max_vus": 600,
"reconcile_quiet_s": 30,
"reconcile_fill_processes": 3,
"reconcile_fill_threads": 24,
"reconcile_sample_interval_s": 0.5,
"reconcile_metrics_port": 9327,
"reconcile_h1_stages": [],
"reconcile_h2_stages": [],
"reconcile_h3_stages": [],
"reconcile_s4_base": "",
"db_max_connections": 100,
"series": "",
"configs": [],
"write_chats": 1,
"mix": [],
"fixed_rps": [],
"ladder_base": 100,
"step_factor": 1.25,
"start_rps_per_replica": 300,
"bisect_steps": 2,
"max_steps": 12,
"first_warmup_s": 15,
"step_warmup_s": 5,
"step_measure_s": 20,
"cooldown_s": 10,
"slo_p95_ms": 200,
"slo_error_ratio": 0.01,
"abort_error_ratio": 0.5,
"abort_p95_ms": 2000,
"request_timeout_s": 15,
"prevus_per_rps": 0.05,
"vus_per_rps": 0.2,
"generator_cpus": "",
"generator_memory": "",
"sampler_cpus": "0.25",
"sampler_memory": "128m",
"sample_interval_s": 1.0,
"order_seed": 20261011
},
"sizes": [],
"rollout": {
"from_commit": "b2fb88f",
"new_image": "sha256:6c2c1c3e526be20978912b877ac07b6788e3665d28b5cee341359d86e7291490",
"old_image": "sha256:841b272667f6920eb0a82b09d0755118c639a2b457ae463d4e9e0d1782c42fe8",
"containers_before": [
{
"name": "mtusi-bench-api-1",
"instance": "d518795230b4",
"tag": "mtusi-messenger:bench",
"image": "sha256:6e9ea882b3619744e709b45152da5d451dd802239d877f8786262416e855d94e",
"running": true
},
{
"name": "mtusi-bench-api-2",
"instance": "e324fd0a2b33",
"tag": "mtusi-messenger:bench",
"image": "sha256:6e9ea882b3619744e709b45152da5d451dd802239d877f8786262416e855d94e",
"running": true
}
],
"revision_before": "d3f9a6b2c1e7",
"containers_after": [
{
"name": "mtusi-bench-api-3",
"instance": "8df7bccbf1ef",
"tag": "mtusi-messenger:bench",
"image": "sha256:ffb64b282745a60d60ccf70fa8114d057abd6157970d88d31ae1c42cbac241cb",
"running": true
},
{
"name": "mtusi-bench-api-4",
"instance": "523402ea115d",
"tag": "mtusi-messenger:bench",
"image": "sha256:ffb64b282745a60d60ccf70fa8114d057abd6157970d88d31ae1c42cbac241cb",
"running": true
}
],
"revision_after": "d3f9a6b2c1e7",
"tag_after": "sha256:8945a70678e6d48681ec7a55ee772c926713ebd4b63c38cc52748a66b158238a",
"script_start_at": "2026-10-31T20:29:58.301+00:00"
},
"limits": {
"api": {
"nano_cpus": 1000000000,
"memory": 536870912,
"memory_swap": 536870912,
"published_ports": {},
"healthcheck": [
"NONE"
],
"log_driver": "local"
},
"postgres": {
"nano_cpus": 2000000000,
"memory": 1073741824,
"memory_swap": 1073741824,
"published_ports": {},
"healthcheck": [
"CMD-SHELL",
"pg_isready -h 127.0.0.1 -U \"$POSTGRES_USER\" -d \"$POSTGRES_DB\""
],
"log_driver": "local"
},
"valkey": {
"nano_cpus": 500000000,
"memory": 134217728,
"memory_swap": 134217728,
"published_ports": {},
"healthcheck": [
"CMD-SHELL",
"test \"$(valkey-cli -p \"$VALKEY_PORT\" ping)\" = PONG"
],
"log_driver": "local"
},
"haproxy": {
"nano_cpus": 1000000000,
"memory": 268435456,
"memory_swap": 268435456,
"published_ports": {},
"healthcheck": [
"CMD",
"bash",
"-c",
"exec 3<>/dev/tcp/127.0.0.1/8404 && printf 'GET /lb/ready HTTP/1.0\\r\\n\\r\\n' >&3 && head -n 1 <&3 | grep -q ' 200 '"
],
"log_driver": "local"
},
"k6": {
"nano_cpus": 0,
"memory": 0,
"memory_swap": 0,
"published_ports": {},
"healthcheck": null,
"log_driver": "local"
},
"api_replicas": 2,
"max_connections": 100,
"sampler": {
"nano_cpus": 250000000,
"memory": 134217728,
"memory_swap": 134217728,
"published_ports": {},
"healthcheck": null,
"log_driver": "local"
}
},
"stand": {
"api_tcp_rmem": "4096 131072 524288",
"postgres": {
"image": "postgres:18.6-trixie@sha256:5a5a84b19854a9ffaa54082c166ff4ec27473a361e496e5ea167f298f2da9722",
"id": "sha256:f4fcd2b983483177b15d72d94fb3614736211554f7cac5c2cc54a05c75110b90",
"version": "18.6 (Debian 18.6-1.pgdg13+2)",
"settings": {
"autovacuum": "on",
"checkpoint_timeout": "5min",
"effective_cache_size": "4GB",
"fsync": "on",
"jit": "on",
"maintenance_work_mem": "64MB",
"max_connections": "100",
"max_wal_size": "1GB",
"plan_cache_mode": "auto",
"random_page_cost": "4",
"shared_buffers": "128MB",
"shared_preload_libraries": "auto_explain",
"synchronous_commit": "on",
"wal_level": "replica",
"work_mem": "4MB"
}
},
"valkey": {
"image": "valkey/valkey:9.1.2-trixie@sha256:418652cfb58ef879d4978c33553735d7147016032d5aefaa14c828e611eb9dfd",
"id": "sha256:5a6ac3cceea0d4cebe48911dfa5f393f49feea86a2c55c5ac6b0ba733a1713b6",
"version": "9.1.2",
"maxmemory": "67108864",
"maxmemory-clients": "0",
"maxmemory-eviction-tenacity": "10",
"maxmemory-policy": "allkeys-lru",
"maxmemory-samples": "5"
},
"haproxy": {
"image": "haproxy:3.4.6-trixie@sha256:e273915691a8eab3f105bf3e39fd4c29a4ecf334e33421903b5589d25e14db26",
"id": "sha256:a92cbb5d7b4ba27898706659bde5039cc86e4ebee44f243d410f268200f7406f",
"version": "HAProxy version 3.4.6-56332c5 2026/09/28 - https://haproxy.org/"
},
"app_env": {
"APP__PORT": "8080",
"APP__RUN_MODE": "docker",
"AUTH__SESSION_TTL_SECONDS": "21600",
"CACHE__HOST": "valkey",
"CACHE__PORT": "6379",
"DATABASE__HOST": "postgres",
"DATABASE__NAME": "bench",
"DATABASE__PORT": "5432",
"DATABASE__USER": "bench",
"S3__BUCKET": "bench",
"S3__HOST": "s3",
"S3__PORT": "8333"
}
},
"finished_at": "2026-10-31T20:31:47+00:00"
}
@@ -0,0 +1,2 @@
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,1000,1.179,1000,0,848.2,0.0,7.31,12.173,77.494,91.021,1.885,245.6,223.7,0.231,,0.366,,
1 size chunk messages_before messages_after duration_s requests_ok requests_failed rps error_ratio p50_ms p95_ms p99_ms max_ms app_cpu_cores rss_end_mib mem_cgroup_end_mib generator_cpu_cores flags db_cpu_cores cell attempt
2 1000 1 0 1000 1.179 1000 0 848.2 0.0 7.31 12.173 77.494 91.021 1.885 245.6 223.7 0.231 0.366
@@ -0,0 +1,12 @@
{
"label": "unit-of-work-previous",
"profile": "rollout",
"stage": "done",
"size": 1000,
"runs_done": 1,
"runs_total": 1,
"elapsed_s": 142,
"eta_s": 0,
"warnings": [],
"updated_at": "2026-10-31T20:31:47+00:00"
}
@@ -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":1178.951375},"metrics":{"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":1000}},"http_req_blocked":{"values":{"avg":0.009608123000000017,"min":0.0005,"med":0.001084,"p(50)":0.001084,"p(95)":0.002419099999999998,"p(99)":0.013730999999999941,"max":1.61675},"type":"trend","contains":"time"},"http_req_connecting":{"type":"trend","contains":"time","values":{"p(99)":0,"max":1.060417,"avg":0.002938209,"min":0,"med":0,"p(50)":0,"p(95)":0}},"iteration_duration":{"type":"trend","contains":"time","values":{"p(95)":12.304733649999996,"p(99)":79.08318750000001,"max":91.091417,"avg":9.406549538000007,"min":2.256209,"med":7.3947085,"p(50)":7.3947085}},"checks":{"type":"rate","contains":"default","values":{"rate":1,"passes":1000,"fails":0}},"http_req_waiting":{"contains":"time","values":{"min":2.183625,"med":7.2717715,"p(50)":7.2717715,"p(95)":12.12013685,"p(99)":77.10405759,"max":90.993209,"avg":9.298104869000007},"type":"trend"},"data_received":{"type":"counter","contains":"data","values":{"count":490000,"rate":415623.5875292143}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":7.3103750000000005,"p(50)":7.3103750000000005,"p(95)":12.172860399999996,"p(99)":77.49409542000001,"max":91.02075,"avg":9.326408914999991,"min":2.203667},"thresholds":{"max>=0":{"ok":true}}},"http_reqs":{"type":"counter","contains":"default","values":{"count":1000,"rate":848.2114031208454}},"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(99)":77.49409542000001,"max":91.02075,"avg":9.326408914999991,"min":2.203667,"med":7.3103750000000005,"p(50)":7.3103750000000005,"p(95)":12.172860399999996}},"iterations":{"type":"counter","contains":"default","values":{"count":1000,"rate":848.2114031208454}},"data_sent":{"type":"counter","contains":"data","values":{"count":376000,"rate":318927.48757343786}},"vus":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}},"http_req_sending":{"type":"trend","contains":"time","values":{"avg":0.00872038100000001,"min":0.002208,"med":0.004375,"p(50)":0.004375,"p(95)":0.013340199999999995,"p(99)":0.0529737499999998,"max":1.132417}},"http_req_receiving":{"values":{"p(50)":0.015958,"p(95)":0.04062705,"p(99)":0.06404582999999996,"max":0.275708,"avg":0.019583664999999997,"min":0.004709,"med":0.015958},"type":"trend","contains":"time"},"vus_max":{"type":"gauge","contains":"default","values":{"value":8,"min":8,"max":8}}}}
@@ -0,0 +1 @@
{"root_group":{"path":"","id":"d41d8cd98f00b204e9800998ecf8427e","groups":[],"checks":[],"name":""},"options":{"summaryTimeUnit":"","noColor":true,"summaryTrendStats":["avg","min","med","p(50)","p(95)","p(99)","max"]},"state":{"isStdOutTTY":false,"isStdErrTTY":false,"testRunDurationMs":120008.675833},"metrics":{"http_req_duration":{"type":"trend","contains":"time","values":{"p(99)":55.405154999999816,"max":272.543208,"avg":5.589999047912664,"min":1.938708,"med":3.9749165,"p(50)":3.9749165,"p(95)":7.2866997}},"http_req_blocked":{"type":"trend","contains":"time","values":{"avg":0.014369418381801276,"min":0.001125,"med":0.003542,"p(50)":0.003542,"p(95)":0.0985916499999993,"p(99)":0.18607674999999987,"max":7.01825}},"iterations{scenario:read}":{"type":"counter","contains":"default","values":{"count":12001,"rate":100.00110339272624},"thresholds":{"count>=0":{"ok":true}}},"iterations{scenario:write}":{"thresholds":{"count>=0":{"ok":true}},"type":"counter","contains":"default","values":{"rate":100.00110339272624,"count":12001}},"http_req_sending":{"type":"trend","contains":"time","values":{"min":0.003666,"med":0.01625,"p(50)":0.01625,"p(95)":0.032663949999999956,"p(99)":0.06262457999999999,"max":2.829125,"avg":0.019276979585034583}},"http_req_receiving":{"type":"trend","contains":"time","values":{"p(95)":0.097417,"p(99)":0.16216407999999993,"max":9.397667,"avg":0.04715750383301359,"min":0.005917,"med":0.037083,"p(50)":0.037083}},"http_req_failed":{"type":"rate","contains":"default","values":{"rate":0,"passes":0,"fails":24002}},"http_req_duration{expected_response:true}":{"type":"trend","contains":"time","values":{"med":3.9749165,"p(50)":3.9749165,"p(95)":7.2866997,"p(99)":55.405154999999816,"max":272.543208,"avg":5.589999047912664,"min":1.938708},"thresholds":{"max>=0":{"ok":true}}},"http_req_tls_handshaking":{"contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0,"max":0,"avg":0},"type":"trend"},"http_req_connecting":{"type":"trend","contains":"time","values":{"min":0,"med":0,"p(50)":0,"p(95)":0,"p(99)":0.13137374999999996,"max":6.983625,"avg":0.006733627197733516}},"iterations":{"type":"counter","contains":"default","values":{"count":24002,"rate":200.00220678545247}},"http_req_waiting":{"contains":"time","values":{"max":272.448875,"avg":5.523564564494631,"min":1.896,"med":3.9176875,"p(50)":3.9176875,"p(95)":7.197924699999994,"p(99)":55.34025041999981},"type":"trend"},"http_reqs":{"type":"counter","contains":"default","values":{"count":24002,"rate":200.00220678545247}},"data_received":{"type":"counter","contains":"data","values":{"count":180603049,"rate":1504916.6049571373}},"vus":{"type":"gauge","contains":"default","values":{"value":2,"min":0,"max":5}},"data_sent":{"type":"counter","contains":"data","values":{"count":9277664,"rate":77308.27738579903}},"iteration_duration":{"type":"trend","contains":"time","values":{"avg":5.893075289100891,"min":2.101375,"med":4.2385415,"p(50)":4.2385415,"p(95)":7.776464249999997,"p(99)":55.67621082999984,"max":272.932375}},"vus_max":{"type":"gauge","contains":"default","values":{"value":1200,"min":1200,"max":1200}}}}
@@ -0,0 +1,12 @@
2026-10-31T20:30:02.762307553Z Server api/api-3 ('api') is DOWN/READY (resolves again).
2026-10-31T20:30:02.762309803Z Server api/api-3 administratively READY thanks to valid DNS answer.
2026-10-31T20:30:04.496083221Z Server api/api-3 is UP, reason: Layer7 check passed, code: 200, check duration: 1ms. 3 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
2026-10-31T20:30:05.051190971Z Server api/api-2 enters drain state. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
2026-10-31T20:30:05.229468013Z Server api/api-2 is going DOWN for maintenance. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
2026-10-31T20:30:06.857799430Z Server api/api-2 is leaving forced maintenance but remains in maintenance.
2026-10-31T20:30:07.770255000Z Server api/api-2 ('api') is DOWN/READY (resolves again).
2026-10-31T20:30:07.770255791Z Server api/api-2 administratively READY thanks to valid DNS answer.
2026-10-31T20:30:08.623276167Z Server api/api-2 is UP, reason: Layer7 check passed, code: 200, check duration: 18ms. 3 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
2026-10-31T20:30:08.961053083Z Server api/api-1 enters drain state. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.
2026-10-31T20:30:09.114689084Z Server api/api-1 is going DOWN for maintenance. 2 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
2026-10-31T20:30:10.103711667Z Server api/api-1 is leaving forced maintenance but remains in maintenance.

Some files were not shown because too many files have changed in this diff Show More