forked from mtusi2026/mtusi2026lab2
235 lines
7.1 KiB
JSON
235 lines
7.1 KiB
JSON
{
|
|
"generated_at": "2026-09-24T06:31:48Z",
|
|
"go_version": "go1.26.5",
|
|
"platform": "linux/arm64",
|
|
"cpus": 2,
|
|
"messages": 100000,
|
|
"chat_distribution": [
|
|
60000,
|
|
20000,
|
|
10000,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
588,
|
|
592
|
|
],
|
|
"seed_duration_seconds": 0.297102214,
|
|
"plans": [
|
|
{
|
|
"name": "history_composite",
|
|
"ddl": "CREATE INDEX experiment_history_idx ON lab2_experiment.messages (chat_id, created_at, id)",
|
|
"plan": [
|
|
{
|
|
"Plan": {
|
|
"Node Type": "Limit",
|
|
"Parallel Aware": false,
|
|
"Async Capable": false,
|
|
"Startup Cost": 0.42,
|
|
"Total Cost": 271.86,
|
|
"Plan Rows": 100,
|
|
"Plan Width": 315,
|
|
"Actual Startup Time": 0.020,
|
|
"Actual Total Time": 0.042,
|
|
"Actual Rows": 100,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 6,
|
|
"Shared Read Blocks": 4,
|
|
"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": "experiment_history_idx",
|
|
"Relation Name": "messages",
|
|
"Alias": "messages",
|
|
"Startup Cost": 0.42,
|
|
"Total Cost": 1411.91,
|
|
"Plan Rows": 520,
|
|
"Plan Width": 315,
|
|
"Actual Startup Time": 0.019,
|
|
"Actual Total Time": 0.037,
|
|
"Actual Rows": 100,
|
|
"Actual Loops": 1,
|
|
"Index Cond": "((chat_id = '62ec06f6-c3c9-5e9b-a213-28604e4f69cd'::uuid) AND (ROW(created_at, id) \u003e ROW('2026-01-01 00:00:00.005939+00'::timestamp with time zone, 'd160edac-1f4b-57f8-a01f-cbbfd7250741'::uuid)))",
|
|
"Rows Removed by Index Recheck": 0,
|
|
"Shared Hit Blocks": 6,
|
|
"Shared Read Blocks": 4,
|
|
"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": 51,
|
|
"Shared Read Blocks": 1,
|
|
"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.222,
|
|
"Triggers": [],
|
|
"Execution Time": 0.069
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "global_time",
|
|
"ddl": "CREATE INDEX experiment_history_idx ON lab2_experiment.messages (created_at, id)",
|
|
"plan": [
|
|
{
|
|
"Plan": {
|
|
"Node Type": "Limit",
|
|
"Parallel Aware": false,
|
|
"Async Capable": false,
|
|
"Startup Cost": 0.42,
|
|
"Total Cost": 3533.04,
|
|
"Plan Rows": 100,
|
|
"Plan Width": 315,
|
|
"Actual Startup Time": 0.055,
|
|
"Actual Total Time": 0.584,
|
|
"Actual Rows": 100,
|
|
"Actual Loops": 1,
|
|
"Shared Hit Blocks": 1994,
|
|
"Shared Read Blocks": 19,
|
|
"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": "experiment_history_idx",
|
|
"Relation Name": "messages",
|
|
"Alias": "messages",
|
|
"Startup Cost": 0.42,
|
|
"Total Cost": 20524.95,
|
|
"Plan Rows": 581,
|
|
"Plan Width": 315,
|
|
"Actual Startup Time": 0.054,
|
|
"Actual Total Time": 0.578,
|
|
"Actual Rows": 100,
|
|
"Actual Loops": 1,
|
|
"Index Cond": "(ROW(created_at, id) \u003e ROW('2026-01-01 00:00:00.005939+00'::timestamp with time zone, 'd160edac-1f4b-57f8-a01f-cbbfd7250741'::uuid))",
|
|
"Rows Removed by Index Recheck": 0,
|
|
"Filter": "(chat_id = '62ec06f6-c3c9-5e9b-a213-28604e4f69cd'::uuid)",
|
|
"Rows Removed by Filter": 1900,
|
|
"Shared Hit Blocks": 1994,
|
|
"Shared Read Blocks": 19,
|
|
"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": 33,
|
|
"Shared Read Blocks": 1,
|
|
"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.161,
|
|
"Triggers": [],
|
|
"Execution Time": 0.597
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"writes": [
|
|
{
|
|
"name": "no_secondary_index",
|
|
"rows": 10000,
|
|
"samples_seconds": [
|
|
0.029270334,
|
|
0.031755962,
|
|
0.032344456,
|
|
0.032778799,
|
|
0.033289467
|
|
],
|
|
"median_seconds": 0.032344456,
|
|
"rows_per_second": 309171.9953490638,
|
|
"index_bytes": 0
|
|
},
|
|
{
|
|
"name": "history_composite",
|
|
"rows": 10000,
|
|
"samples_seconds": [
|
|
0.032376473,
|
|
0.032606465,
|
|
0.03496374,
|
|
0.039391471,
|
|
0.05066359
|
|
],
|
|
"median_seconds": 0.03496374,
|
|
"rows_per_second": 286010.5926883108,
|
|
"index_bytes": 991232
|
|
},
|
|
{
|
|
"name": "global_time",
|
|
"rows": 10000,
|
|
"samples_seconds": [
|
|
0.030691535,
|
|
0.032534157,
|
|
0.035047577,
|
|
0.035801915,
|
|
0.043506137
|
|
],
|
|
"median_seconds": 0.035047577,
|
|
"rows_per_second": 285326.4292707025,
|
|
"index_bytes": 425984
|
|
}
|
|
]
|
|
}
|