Files
mtusi2026lab2/evidence/03_explain_track2.txt
T
xenia01 491ff37b2e
Skeleton contracts / contracts (pull_request) Canceled after 0s
lab2: PostgreSQL, Redis sessions, Track 2 (Explain, Backup) and report
2026-10-19 20:54:45 +03:00

11 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
=== EXPLAIN (ANALYZE, BUFFERS) ===
1. С ИНДЕКСОМ:
QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.42..174.90 rows=50 width=72) (actual time=0.037..0.045 rows=50 loops=1) Buffers: shared hit=5 -> Index Scan using idx_messages_chat_created on messages (cost=0.42..1507.98 rows=432 width=72) (actual time=0.035..0.042 rows=50 loops=1) Index Cond: (chat_id = '00000000-0000-0000-0000-000000000002'::uuid) Buffers: shared hit=5 Planning: Buffers: shared hit=103 Planning Time: 1.105 ms Execution Time: 0.093 ms (9 rows)
2. БЕЗ ИНДЕКСА (DROP INDEX):
DROP INDEX
QUERY PLAN -------------------------------------------------------------------------------------------------------------------------- Limit (cost=2329.98..2330.10 rows=50 width=72) (actual time=29.699..29.705 rows=50 loops=1) Buffers: shared hit=1241 -> Sort (cost=2329.98..2331.06 rows=432 width=72) (actual time=29.698..29.700 rows=50 loops=1) Sort Key: created_at, id Sort Method: top-N heapsort Memory: 38kB Buffers: shared hit=1241 -> Seq Scan on messages (cost=0.00..2315.62 rows=432 width=72) (actual time=0.008..11.990 rows=100000 loops=1) Filter: (chat_id = '00000000-0000-0000-0000-000000000002'::uuid) Rows Removed by Filter: 2 Buffers: shared hit=1235 Planning: Buffers: shared hit=81 dirtied=1 Planning Time: 0.385 ms Execution Time: 29.751 ms (14 rows)
3. ВОЗВРАЩАЕМ ИНДЕКС:
CREATE INDEX