ЛР2 — БВТ2302 — Никитина — на 5 (трек 2)
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Yuliiiaaaa
2026-10-20 00:04:12 +03:00
parent 65003b6119
commit 7255878240
26 changed files with 1426 additions and 47 deletions
+16
View File
@@ -0,0 +1,16 @@
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.01..0.02 rows=1 width=88) (actual time=0.044..0.045 rows=0 loops=1)
Buffers: shared hit=3
-> Sort (cost=0.01..0.02 rows=1 width=88) (actual time=0.042..0.043 rows=0 loops=1)
Sort Key: created_at
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=3
-> Seq Scan on messages (cost=0.00..0.00 rows=1 width=88) (actual time=0.010..0.011 rows=0 loops=1)
Filter: ((chat_id = '00000000-0000-0000-0000-000000000002'::uuid) AND (created_at > (now() - '50 days'::interval)))
Planning:
Buffers: shared hit=79 dirtied=1
Planning Time: 0.771 ms
Execution Time: 0.086 ms
(12 rows)
+16
View File
@@ -0,0 +1,16 @@
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Limit (cost=0.01..0.02 rows=1 width=88) (actual time=0.097..0.098 rows=0 loops=1)
Buffers: shared hit=3
-> Sort (cost=0.01..0.02 rows=1 width=88) (actual time=0.095..0.096 rows=0 loops=1)
Sort Key: created_at
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=3
-> Seq Scan on messages (cost=0.00..0.00 rows=1 width=88) (actual time=0.019..0.019 rows=0 loops=1)
Filter: ((chat_id = '00000000-0000-0000-0000-000000000002'::uuid) AND (created_at > (now() - '50 days'::interval)))
Planning:
Buffers: shared hit=101 read=3
Planning Time: 8.033 ms
Execution Time: 1.148 ms
(12 rows)
+6
View File
@@ -0,0 +1,6 @@
Restore time: 0.7619182 seconds
restored_messages
-------------------
2000
(1 row)
+22
View File
@@ -0,0 +1,22 @@
DROP INDEX
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Insert on messages (cost=0.00..22.50 rows=0 width=0) (actual time=12.555..12.557 rows=0 loops=1)
-> Function Scan on generate_series i (cost=0.00..22.50 rows=1000 width=88) (actual time=0.212..7.001 rows=1000 loops=1)
Planning Time: 2.225 ms
Trigger for constraint messages_chat_id_fkey: time=12.169 calls=1000
Trigger for constraint messages_sender_id_fkey: time=11.114 calls=1000
Execution Time: 39.576 ms
(6 rows)
CREATE INDEX
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Insert on messages (cost=0.00..22.50 rows=0 width=0) (actual time=17.904..17.906 rows=0 loops=1)
-> Function Scan on generate_series i (cost=0.00..22.50 rows=1000 width=88) (actual time=0.146..7.585 rows=1000 loops=1)
Planning Time: 0.126 ms
Trigger for constraint messages_chat_id_fkey: time=15.733 calls=1000
Trigger for constraint messages_sender_id_fkey: time=15.707 calls=1000
Execution Time: 49.733 ms
(6 rows)