готово лаб2

This commit is contained in:
2026-10-23 17:51:58 +03:00
parent 65003b6119
commit 6dbc2da1ca
47 changed files with 201807 additions and 25 deletions
+200294
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -0,0 +1,13 @@
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.42..6.24 rows=50 width=66) (actual time=0.229..0.237 rows=50 loops=1)
Buffers: shared hit=1 read=3
-> Index Scan using ix_messages_chat_created_id on messages (cost=0.42..9420.75 rows=80862 width=66) (actual time=0.228..0.232 rows=50 loops=1)
Index Cond: (chat_id = '66666666-6666-4666-8666-666666666666'::uuid)
Buffers: shared hit=1 read=3
Planning:
Buffers: shared hit=108 read=1 dirtied=3
Planning Time: 1.173 ms
Execution Time: 0.308 ms
(9 rows)
+22
View File
@@ -0,0 +1,22 @@
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=6279.67..6285.42 rows=50 width=66) (actual time=7.323..8.152 rows=50 loops=1)
Buffers: shared hit=1063 read=72
-> Gather Merge (cost=6279.67..11696.05 rows=47099 width=66) (actual time=7.322..8.148 rows=50 loops=1)
Workers Planned: 1
Workers Launched: 1
Buffers: shared hit=1063 read=72
-> Sort (cost=5279.66..5397.40 rows=47099 width=66) (actual time=6.368..6.368 rows=26 loops=2)
Sort Key: created_at, id
Sort Method: top-N heapsort Memory: 38kB
Buffers: shared hit=1063 read=72
Worker 0: Sort Method: top-N heapsort Memory: 38kB
-> Parallel Index Scan using ix_messages_chat_only on messages (cost=0.42..3715.06 rows=47099 width=66) (actual time=0.031..2.837 rows=40000 loops=2)
--More-- ␍ ␍ Index Cond: (chat_id = '66666666-6666-4666-8666-66666666666--More-- ␍ ␍6'::uuid)
--More-- ␍ ␍ Buffers: shared hit=1048 read=72
--More-- ␍ ␍ Planning:
--More-- ␍ ␍ Buffers: shared hit=98 read=1
--More-- ␍ ␍ Planning Time: 0.335 ms
--More-- ␍ ␍ Execution Time: 8.200 ms
--More-- ␍ ␍(18 rows)
--More-- ␍ ␍