diff --git a/REPORT.md b/REPORT.md index de27cc62..77a9120f 100644 --- a/REPORT.md +++ b/REPORT.md @@ -22,6 +22,8 @@ make test-deps BASE_URL=http://localhost:8080 make seed-history BASE_URL=http://localhost:8080 # Expiry — отдельный стенд с коротким TTL: SESSION_TTL_SECONDS=2 docker compose --env-file .env up -d api +# Для PowerShell +$env:SESSION_TTL_SECONDS=2; docker compose --env-file .env up -d api make test-expiry BASE_URL=http://localhost:8080 docker compose --env-file .env up -d api # вернуть TTL=3600 ``` diff --git a/evidence/explain.txt b/evidence/explain.txt new file mode 100644 index 00000000..b9d8d9db --- /dev/null +++ b/evidence/explain.txt @@ -0,0 +1,15 @@ +# chat_id=5a01823c-52b2-4e4c-86be-855d220e160d count=10000 + QUERY PLAN +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + Limit (cost=0.29..5.61 rows=51 width=65) (actual time=0.019..0.029 rows=51 loops=1) + Buffers: shared hit=3 + -> Index Scan using messages_chat_created_idx on messages (cost=0.29..1041.68 rows=9967 width=65) (actual time=0.017..0.023 rows=51 loops=1) + Index Cond: ((chat_id = '5a01823c-52b2-4e4c-86be-855d220e160d'::uuid) AND (ROW(created_at, id) > ROW('1970-01-01 00:00:00+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))) + Buffers: shared hit=3 + Planning: + Buffers: shared hit=108 + Planning Time: 0.751 ms + Execution Time: 0.097 ms +(9 rows) + +