Files
mtusi2026lab2/evidence/history-explain.json
T
Daria0w0 c0ca56f208
Application checks / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
Complete lab2 grade 4 implementation and report
2026-10-10 00:28:43 +03:00

461 lines
17 KiB
JSON

{
"date": "2026-10-09",
"messages_in_chat": 12000,
"chat_id": "06ecd609-697c-48aa-9150-8bce12447663",
"page_size": 50,
"sql_limit": 51,
"concurrency": 1,
"warmups": 1,
"repeats": 3,
"postgres_version": "17.9 (Debian 17.9-1.pgdg12+1)",
"docker_cpus_memory_bytes": "16 16389435392",
"postgres_cpu_memory_limits": "0 0",
"method": "SQL-generated fixture; ANALYZE; prepared query; one warmup and three serial measurements; no concurrent writers",
"limitations": "warm cache, one synthetic chat; not HTTP latency or throughput; no crash-durability measurement",
"cases": {
"first_page": {
"prepare": "PREPARE history(uuid,integer) AS SELECT id::text,chat_id::text,sender_id::text,text,created_at FROM messages WHERE chat_id=$1 ORDER BY messages.created_at,messages.id LIMIT $2;",
"execute": "EXECUTE history('06ecd609-697c-48aa-9150-8bce12447663',51)",
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.29,
"Total Cost": 5.04,
"Plan Rows": 51,
"Plan Width": 143,
"Actual Startup Time": 0.039,
"Actual Total Time": 0.066,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "messages_chat_history_idx",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1118.17,
"Plan Rows": 12000,
"Plan Width": 143,
"Actual Startup Time": 0.038,
"Actual Total Time": 0.059,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "(chat_id = '06ecd609-697c-48aa-9150-8bce12447663'::uuid)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 113,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.692,
"Triggers": [],
"Execution Time": 0.116
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.29,
"Total Cost": 5.04,
"Plan Rows": 51,
"Plan Width": 143,
"Actual Startup Time": 0.035,
"Actual Total Time": 0.059,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "messages_chat_history_idx",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1118.17,
"Plan Rows": 12000,
"Plan Width": 143,
"Actual Startup Time": 0.034,
"Actual Total Time": 0.053,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "(chat_id = '06ecd609-697c-48aa-9150-8bce12447663'::uuid)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 113,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.632,
"Triggers": [],
"Execution Time": 0.106
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.29,
"Total Cost": 5.04,
"Plan Rows": 51,
"Plan Width": 143,
"Actual Startup Time": 0.037,
"Actual Total Time": 0.064,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "messages_chat_history_idx",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1118.17,
"Plan Rows": 12000,
"Plan Width": 143,
"Actual Startup Time": 0.036,
"Actual Total Time": 0.057,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "(chat_id = '06ecd609-697c-48aa-9150-8bce12447663'::uuid)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 113,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.681,
"Triggers": [],
"Execution Time": 0.111
}
]
},
"after_6000": {
"prepare": "PREPARE history(uuid,integer,timestamptz,uuid) AS SELECT id::text,chat_id::text,sender_id::text,text,created_at FROM messages WHERE chat_id=$1 AND (created_at,id)>($3,$4::uuid) ORDER BY messages.created_at,messages.id LIMIT $2;",
"execute": "EXECUTE history('06ecd609-697c-48aa-9150-8bce12447663',51,'2026-10-08T19:47:14.460524+00:00','fc066765-6778-4d9f-b1ed-60f49ecef3db')",
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.29,
"Total Cost": 6.41,
"Plan Rows": 51,
"Plan Width": 143,
"Actual Startup Time": 0.172,
"Actual Total Time": 0.208,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "messages_chat_history_idx",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 721.62,
"Plan Rows": 6004,
"Plan Width": 143,
"Actual Startup Time": 0.171,
"Actual Total Time": 0.201,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '06ecd609-697c-48aa-9150-8bce12447663'::uuid) AND (ROW(created_at, id) > ROW('2026-10-08 19:47:14.460524+00'::timestamp with time zone, 'fc066765-6778-4d9f-b1ed-60f49ecef3db'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 112,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 1.21,
"Triggers": [],
"Execution Time": 0.432
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.29,
"Total Cost": 6.41,
"Plan Rows": 51,
"Plan Width": 143,
"Actual Startup Time": 0.045,
"Actual Total Time": 0.076,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "messages_chat_history_idx",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 721.62,
"Plan Rows": 6004,
"Plan Width": 143,
"Actual Startup Time": 0.043,
"Actual Total Time": 0.069,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '06ecd609-697c-48aa-9150-8bce12447663'::uuid) AND (ROW(created_at, id) > ROW('2026-10-08 19:47:14.460524+00'::timestamp with time zone, 'fc066765-6778-4d9f-b1ed-60f49ecef3db'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 112,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.609,
"Triggers": [],
"Execution Time": 0.143
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.29,
"Total Cost": 6.41,
"Plan Rows": 51,
"Plan Width": 143,
"Actual Startup Time": 0.045,
"Actual Total Time": 0.076,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Scan Direction": "Forward",
"Index Name": "messages_chat_history_idx",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 721.62,
"Plan Rows": 6004,
"Plan Width": 143,
"Actual Startup Time": 0.044,
"Actual Total Time": 0.069,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '06ecd609-697c-48aa-9150-8bce12447663'::uuid) AND (ROW(created_at, id) > ROW('2026-10-08 19:47:14.460524+00'::timestamp with time zone, 'fc066765-6778-4d9f-b1ed-60f49ecef3db'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 4,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 112,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.603,
"Triggers": [],
"Execution Time": 0.193
}
]
}
}
}