Files
mtusi2026lab2/evidence/index-study.json
T
mayorovasonya 01ecc8567e
Application / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
Исправить U+0000 и гонку готовности PostgreSQL; добавить проверки
2026-10-23 12:26:15 +03:00

2898 lines
118 KiB
JSON

{
"database": "research_09efbd8b091e",
"postgresql": "PostgreSQL 17.2 (Debian 17.2-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit",
"sizes": [
70000,
20000,
5000,
2000,
1000,
800,
500,
300,
200,
200
],
"query": "\n SELECT\n id\n , chat_id\n , sender_id\n , text\n , created_at\n FROM messages\n WHERE 1=1\n AND chat_id = %s\n AND (created_at, id) > (%s, %s)\n ORDER BY created_at, id\n LIMIT 51\n ",
"repeats": 5,
"results": [
{
"variant": "chat_only",
"index_bytes": 753664,
"reads": [
{
"chat_messages": 70000,
"median_execution_ms": 4.463,
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3652.17,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 4.573,
"Actual Total Time": 4.576,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 1408,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3676.02,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 4.572,
"Actual Total Time": 4.574,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 1408,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 3332.03,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 2.901,
"Actual Total Time": 3.89,
"Actual Rows": 14000,
"Actual Loops": 1,
"Index Cond": "(chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 56000,
"Shared Hit Blocks": 1408,
"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": 0,
"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.023,
"Triggers": [],
"Execution Time": 4.581
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3652.17,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 4.456,
"Actual Total Time": 4.459,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 1408,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3676.02,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 4.455,
"Actual Total Time": 4.457,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 1408,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 3332.03,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 2.801,
"Actual Total Time": 3.779,
"Actual Rows": 14000,
"Actual Loops": 1,
"Index Cond": "(chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 56000,
"Shared Hit Blocks": 1408,
"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": 0,
"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.022,
"Triggers": [],
"Execution Time": 4.463
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3652.17,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 4.463,
"Actual Total Time": 4.466,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 1408,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3676.02,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 4.462,
"Actual Total Time": 4.464,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 1408,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 3332.03,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 2.802,
"Actual Total Time": 3.776,
"Actual Rows": 14000,
"Actual Loops": 1,
"Index Cond": "(chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 56000,
"Shared Hit Blocks": 1408,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 4.47
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3652.17,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 4.413,
"Actual Total Time": 4.417,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 1408,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3676.02,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 4.413,
"Actual Total Time": 4.415,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 1408,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 3332.03,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 2.758,
"Actual Total Time": 3.727,
"Actual Rows": 14000,
"Actual Loops": 1,
"Index Cond": "(chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 56000,
"Shared Hit Blocks": 1408,
"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": 0,
"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.012,
"Triggers": [],
"Execution Time": 4.42
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3652.17,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 4.346,
"Actual Total Time": 4.35,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 1408,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 3652.04,
"Total Cost": 3676.02,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 4.346,
"Actual Total Time": 4.347,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 1408,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 3332.03,
"Plan Rows": 9592,
"Plan Width": 121,
"Actual Startup Time": 2.7,
"Actual Total Time": 3.669,
"Actual Rows": 14000,
"Actual Loops": 1,
"Index Cond": "(chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 56000,
"Shared Hit Blocks": 1408,
"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": 0,
"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.011,
"Triggers": [],
"Execution Time": 4.353
}
]
},
{
"chat_messages": 20000,
"median_execution_ms": 1.273,
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1487.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 1.251,
"Actual Total Time": 1.254,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 404,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1516.61,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 1.251,
"Actual Total Time": 1.252,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 404,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1099.46,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 0.765,
"Actual Total Time": 1.042,
"Actual Rows": 4000,
"Actual Loops": 1,
"Index Cond": "(chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 16000,
"Shared Hit Blocks": 404,
"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": 0,
"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.016,
"Triggers": [],
"Execution Time": 1.259
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1487.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 1.266,
"Actual Total Time": 1.269,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 404,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1516.61,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 1.265,
"Actual Total Time": 1.267,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 404,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1099.46,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 0.791,
"Actual Total Time": 1.061,
"Actual Rows": 4000,
"Actual Loops": 1,
"Index Cond": "(chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 16000,
"Shared Hit Blocks": 404,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 1.273
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1487.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 1.304,
"Actual Total Time": 1.308,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 404,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1516.61,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 1.304,
"Actual Total Time": 1.306,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 404,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1099.46,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 0.792,
"Actual Total Time": 1.09,
"Actual Rows": 4000,
"Actual Loops": 1,
"Index Cond": "(chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 16000,
"Shared Hit Blocks": 404,
"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": 0,
"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.012,
"Triggers": [],
"Execution Time": 1.311
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1487.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 1.289,
"Actual Total Time": 1.293,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 404,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1516.61,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 1.289,
"Actual Total Time": 1.29,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 404,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1099.46,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 0.812,
"Actual Total Time": 1.084,
"Actual Rows": 4000,
"Actual Loops": 1,
"Index Cond": "(chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 16000,
"Shared Hit Blocks": 404,
"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": 0,
"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.011,
"Triggers": [],
"Execution Time": 1.296
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1487.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 1.261,
"Actual Total Time": 1.264,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 404,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 1487.53,
"Total Cost": 1516.61,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 1.261,
"Actual Total Time": 1.262,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "top-N heapsort",
"Sort Space Used": 38,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 404,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 1099.46,
"Plan Rows": 11632,
"Plan Width": 121,
"Actual Startup Time": 0.777,
"Actual Total Time": 1.05,
"Actual Rows": 4000,
"Actual Loops": 1,
"Index Cond": "(chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 16000,
"Shared Hit Blocks": 404,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 1.267
}
]
},
{
"chat_messages": 200,
"median_execution_ms": 0.02,
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 43.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.019,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 7,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 44.05,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.015,
"Actual Rows": 40,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "quicksort",
"Sort Space Used": 35,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 7,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 36.63,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.01,
"Actual Total Time": 0.012,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "(chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 160,
"Shared Hit Blocks": 7,
"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": 0,
"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.012,
"Triggers": [],
"Execution Time": 0.021
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 43.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.018,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 7,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 44.05,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.016,
"Actual Rows": 40,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "quicksort",
"Sort Space Used": 35,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 7,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 36.63,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.009,
"Actual Total Time": 0.012,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "(chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 160,
"Shared Hit Blocks": 7,
"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": 0,
"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.014,
"Triggers": [],
"Execution Time": 0.02
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 43.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.018,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 7,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 44.05,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.015,
"Actual Rows": 40,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "quicksort",
"Sort Space Used": 35,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 7,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 36.63,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.009,
"Actual Total Time": 0.012,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "(chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 160,
"Shared Hit Blocks": 7,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 0.02
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 43.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.026,
"Actual Total Time": 0.029,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 7,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 44.05,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.026,
"Actual Total Time": 0.027,
"Actual Rows": 40,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "quicksort",
"Sort Space Used": 35,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 7,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 36.63,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.019,
"Actual Total Time": 0.022,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "(chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 160,
"Shared Hit Blocks": 7,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 0.032
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 43.66,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.017,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 7,
"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": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.53,
"Total Cost": 44.05,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.015,
"Actual Total Time": 0.016,
"Actual Rows": 40,
"Actual Loops": 1,
"Sort Key": [
"created_at",
"id"
],
"Sort Method": "quicksort",
"Sort Space Used": 35,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 7,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.29,
"Total Cost": 36.63,
"Plan Rows": 207,
"Plan Width": 121,
"Actual Startup Time": 0.009,
"Actual Total Time": 0.012,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "(chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid)",
"Rows Removed by Index Recheck": 0,
"Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))",
"Rows Removed by Filter": 160,
"Shared Hit Blocks": 7,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 0.02
}
]
}
],
"writes": [
{
"rows": 1000,
"commit_ms": 12.854043999993792,
"wal_bytes": 232488
},
{
"rows": 1000,
"commit_ms": 9.849200999980212,
"wal_bytes": 241648
},
{
"rows": 1000,
"commit_ms": 9.713059999995721,
"wal_bytes": 241752
}
]
},
{
"variant": "composite",
"index_bytes": 6127616,
"reads": [
{
"chat_messages": 70000,
"median_execution_ms": 0.011,
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 22.04,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.011,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4175.07,
"Plan Rows": 9845,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.009,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.013,
"Triggers": [],
"Execution Time": 0.015
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 22.04,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.008,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4175.07,
"Plan Rows": 9845,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.006,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.011,
"Triggers": [],
"Execution Time": 0.012
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 22.04,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.008,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4175.07,
"Plan Rows": 9845,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.006,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.01,
"Triggers": [],
"Execution Time": 0.011
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 22.04,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.008,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4175.07,
"Plan Rows": 9845,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.006,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.01,
"Triggers": [],
"Execution Time": 0.011
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 22.04,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.007,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4175.07,
"Plan Rows": 9845,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.005,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = '16d5e714-6c35-4ad8-8e2f-b097a33a346a'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.056+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.009,
"Triggers": [],
"Execution Time": 0.01
}
]
},
{
"chat_messages": 20000,
"median_execution_ms": 0.011,
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 19.2,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.008,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4277.68,
"Plan Rows": 11616,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.006,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.011,
"Triggers": [],
"Execution Time": 0.011
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 19.2,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.008,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4277.68,
"Plan Rows": 11616,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.006,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.01,
"Triggers": [],
"Execution Time": 0.011
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 19.2,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.008,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4277.68,
"Plan Rows": 11616,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.005,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.01,
"Triggers": [],
"Execution Time": 0.01
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 19.2,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.01,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4277.68,
"Plan Rows": 11616,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.007,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.011,
"Triggers": [],
"Execution Time": 0.013
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 19.2,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.007,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 5,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 4277.68,
"Plan Rows": 11616,
"Plan Width": 121,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.005,
"Actual Rows": 51,
"Actual Loops": 1,
"Index Cond": "((chat_id = 'be51a039-40ae-478f-98b6-16f33c11a842'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 5,
"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": 0,
"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.01,
"Triggers": [],
"Execution Time": 0.01
}
]
},
{
"chat_messages": 200,
"median_execution_ms": 0.008,
"plans": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 92.88,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.002,
"Actual Total Time": 0.006,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 6,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 350.33,
"Plan Rows": 193,
"Plan Width": 121,
"Actual Startup Time": 0.002,
"Actual Total Time": 0.005,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "((chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 6,
"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": 0,
"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.011,
"Triggers": [],
"Execution Time": 0.009
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 92.88,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.002,
"Actual Total Time": 0.006,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 6,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 350.33,
"Plan Rows": 193,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.004,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "((chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 6,
"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": 0,
"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.01,
"Triggers": [],
"Execution Time": 0.008
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 92.88,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.006,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 6,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 350.33,
"Plan Rows": 193,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.004,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "((chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 6,
"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": 0,
"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.009,
"Triggers": [],
"Execution Time": 0.008
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 92.88,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.006,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 6,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 350.33,
"Plan Rows": 193,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.004,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "((chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 6,
"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": 0,
"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.009,
"Triggers": [],
"Execution Time": 0.008
},
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.42,
"Total Cost": 92.88,
"Plan Rows": 51,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.006,
"Actual Rows": 40,
"Actual Loops": 1,
"Shared Hit Blocks": 6,
"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_history",
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 0.42,
"Total Cost": 350.33,
"Plan Rows": 193,
"Plan Width": 121,
"Actual Startup Time": 0.001,
"Actual Total Time": 0.004,
"Actual Rows": 40,
"Actual Loops": 1,
"Index Cond": "((chat_id = '92295864-3ccd-4932-8aa1-9e7d9eaa73c0'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.00016+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 6,
"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": 0,
"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.009,
"Triggers": [],
"Execution Time": 0.008
}
]
}
],
"writes": [
{
"rows": 1000,
"commit_ms": 10.444133999982341,
"wal_bytes": 319232
},
{
"rows": 1000,
"commit_ms": 9.934636999986424,
"wal_bytes": 265152
},
{
"rows": 1000,
"commit_ms": 9.918705000018235,
"wal_bytes": 311584
}
]
}
],
"snapshot": {
"counts": {
"users": 1,
"chats": 10,
"chat_members": 10,
"messages": 100000,
"sessions": 0
},
"messages_sha256": "8c3e317ab75daa8a5e97641eac51e3a349cffe2293bb83bc2ba22ce602cbf112",
"selected_messages": [
{
"id": "00000000-0000-0000-0000-000000000000",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x41004278787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00+00:00"
},
{
"id": "0000cf54-fd5c-4b78-9b83-5fdacc223d82",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.039523+00:00"
},
{
"id": "7fc2eae6-055d-4a9d-b3b7-4e09c7d735ea",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.037757+00:00"
},
{
"id": "fffe1a30-0346-4b72-b709-eb9c695c1993",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.040077+00:00"
},
{
"id": "fffe9bca-2d05-4455-ab60-8d0d4d519df4",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.014042+00:00"
}
]
},
"backup": {
"format": "pg_dump custom",
"bytes": 2655198,
"dump_seconds": 0.2799740420000001,
"bootstrap_seconds": 0.8203773750000001,
"restore_seconds": 0.266880542,
"restored_database": "restore_4bc6680354a1",
"source_container_id": "07430ea862b6",
"restore_container_id": "aff2a0068a4c",
"fresh_restore_volume": "mtusi-lab2-restore_4bc6680354a1-data",
"source_volume": [
"mtusi-lab2_postgres_data"
],
"matching_counts": true,
"matching_all_messages_sha256": true,
"matching_selected_messages": true,
"restored_snapshot": {
"counts": {
"users": 1,
"chats": 10,
"chat_members": 10,
"messages": 100000,
"sessions": 0
},
"messages_sha256": "8c3e317ab75daa8a5e97641eac51e3a349cffe2293bb83bc2ba22ce602cbf112",
"selected_messages": [
{
"id": "00000000-0000-0000-0000-000000000000",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x41004278787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00+00:00"
},
{
"id": "0000cf54-fd5c-4b78-9b83-5fdacc223d82",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.039523+00:00"
},
{
"id": "7fc2eae6-055d-4a9d-b3b7-4e09c7d735ea",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.037757+00:00"
},
{
"id": "fffe1a30-0346-4b72-b709-eb9c695c1993",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.040077+00:00"
},
{
"id": "fffe9bca-2d05-4455-ab60-8d0d4d519df4",
"chat_id": "16d5e714-6c35-4ad8-8e2f-b097a33a346a",
"sender_id": "f34b3772-5504-4f6f-861b-f22d07f10181",
"text": "\\x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878",
"created_at": "2026-01-01T00:00:00.014042+00:00"
}
]
}
}
}