{ "date_utc": "2026-10-07T11:54:15.607806+00:00", "hypothesis": "A composite history index reduces late-page reads compared with a chat-only index, at an additional write cost.", "method": "100000 synthetic messages: 90% in chat 1, 9% in chat 2, 1% in chat 3. Compare identical late-page SELECT and 1000-row INSERT EXPLAIN ANALYZE BUFFERS (rolled back), three repetitions after ANALYZE.", "versions": { "postgres": "PostgreSQL 17.6 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit" }, "limitations": "Single local Docker host; synthetic isolated schema; logical backup requires a quiescent comparison dataset; no WAL/PITR; restore shares the same PostgreSQL instance but uses a new database.", "variants": [ { "name": "chat_only", "columns": "chat_id", "select_sql": "SELECT id,chat_id,sender_id,text,created_at FROM research_c99ee862.history WHERE chat_id=1 AND (created_at,id)>('2026-01-01Z'::timestamptz+85000*interval '1 microsecond',85000) ORDER BY created_at,id LIMIT 51", "insert_sql": "INSERT INTO research_c99ee862.history SELECT n,1,'11111111-1111-4111-8111-111111111111','new-synthetic-'||n,'2026-01-01Z'::timestamptz+n*interval '1 microsecond' FROM generate_series(100001,101000) AS n", "select_plans": [ [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3479.35, "Total Cost": 3479.48, "Plan Rows": 51, "Plan Width": 51, "Actual Startup Time": 7.137, "Actual Total Time": 7.143, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1037, "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": 3479.35, "Total Cost": 3512.95, "Plan Rows": 13439, "Plan Width": 51, "Actual Startup Time": 7.136, "Actual Total Time": 7.138, "Actual Rows": 51, "Actual Loops": 1, "Sort Key": [ "created_at", "id" ], "Sort Method": "top-N heapsort", "Sort Space Used": 31, "Sort Space Type": "Memory", "Shared Hit Blocks": 1037, "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": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 3031.0, "Plan Rows": 13439, "Plan Width": 51, "Actual Startup Time": 5.911, "Actual Total Time": 6.801, "Actual Rows": 5000, "Actual Loops": 1, "Filter": "((chat_id = 1) AND (ROW(created_at, id) > ROW(('2026-01-01 00:00:00+00'::timestamp with time zone + '00:00:00.085'::interval), 85000)))", "Rows Removed by Filter": 95000, "Shared Hit Blocks": 1031, "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": 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.412, "Triggers": [], "Execution Time": 7.2 } ], [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3519.84, "Total Cost": 3519.97, "Plan Rows": 51, "Plan Width": 51, "Actual Startup Time": 6.553, "Actual Total Time": 6.56, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1049, "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": 3519.84, "Total Cost": 3553.83, "Plan Rows": 13595, "Plan Width": 51, "Actual Startup Time": 6.55, "Actual Total Time": 6.552, "Actual Rows": 51, "Actual Loops": 1, "Sort Key": [ "created_at", "id" ], "Sort Method": "top-N heapsort", "Sort Space Used": 31, "Sort Space Type": "Memory", "Shared Hit Blocks": 1049, "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": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 3066.28, "Plan Rows": 13595, "Plan Width": 51, "Actual Startup Time": 5.289, "Actual Total Time": 6.237, "Actual Rows": 5000, "Actual Loops": 1, "Filter": "((chat_id = 1) AND (ROW(created_at, id) > ROW(('2026-01-01 00:00:00+00'::timestamp with time zone + '00:00:00.085'::interval), 85000)))", "Rows Removed by Filter": 95000, "Shared Hit Blocks": 1043, "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": 114, "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.421, "Triggers": [], "Execution Time": 6.619 } ], [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3556.98, "Total Cost": 3557.11, "Plan Rows": 51, "Plan Width": 51, "Actual Startup Time": 4.895, "Actual Total Time": 4.899, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1060, "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": 3556.98, "Total Cost": 3591.33, "Plan Rows": 13739, "Plan Width": 51, "Actual Startup Time": 4.894, "Actual Total Time": 4.896, "Actual Rows": 51, "Actual Loops": 1, "Sort Key": [ "created_at", "id" ], "Sort Method": "top-N heapsort", "Sort Space Used": 31, "Sort Space Type": "Memory", "Shared Hit Blocks": 1060, "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": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 3098.62, "Plan Rows": 13739, "Plan Width": 51, "Actual Startup Time": 4.022, "Actual Total Time": 4.664, "Actual Rows": 5000, "Actual Loops": 1, "Filter": "((chat_id = 1) AND (ROW(created_at, id) > ROW(('2026-01-01 00:00:00+00'::timestamp with time zone + '00:00:00.085'::interval), 85000)))", "Rows Removed by Filter": 95000, "Shared Hit Blocks": 1054, "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": 114, "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.263, "Triggers": [], "Execution Time": 4.934 } ] ], "insert_plans": [ [ { "Plan": { "Node Type": "ModifyTable", "Operation": "Insert", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 0, "Plan Width": 0, "Actual Startup Time": 2.492, "Actual Total Time": 2.492, "Actual Rows": 0, "Actual Loops": 1, "Shared Hit Blocks": 5077, "Shared Read Blocks": 3, "Shared Dirtied Blocks": 20, "Shared Written Blocks": 16, "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": "Function Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Function Name": "generate_series", "Alias": "n", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 1000, "Plan Width": 68, "Actual Startup Time": 0.071, "Actual Total Time": 0.287, "Actual Rows": 1000, "Actual Loops": 1, "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": { "Shared Hit Blocks": 15, "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.141, "Triggers": [], "Execution Time": 2.546 } ], [ { "Plan": { "Node Type": "ModifyTable", "Operation": "Insert", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 0, "Plan Width": 0, "Actual Startup Time": 2.231, "Actual Total Time": 2.232, "Actual Rows": 0, "Actual Loops": 1, "Shared Hit Blocks": 5684, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 12, "Shared Written Blocks": 12, "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": "Function Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Function Name": "generate_series", "Alias": "n", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 1000, "Plan Width": 68, "Actual Startup Time": 0.045, "Actual Total Time": 0.195, "Actual Rows": 1000, "Actual Loops": 1, "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": { "Shared Hit Blocks": 15, "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.11, "Triggers": [], "Execution Time": 2.274 } ], [ { "Plan": { "Node Type": "ModifyTable", "Operation": "Insert", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 0, "Plan Width": 0, "Actual Startup Time": 2.158, "Actual Total Time": 2.159, "Actual Rows": 0, "Actual Loops": 1, "Shared Hit Blocks": 5642, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 13, "Shared Written Blocks": 13, "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": "Function Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Function Name": "generate_series", "Alias": "n", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 1000, "Plan Width": 68, "Actual Startup Time": 0.042, "Actual Total Time": 0.199, "Actual Rows": 1000, "Actual Loops": 1, "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": { "Shared Hit Blocks": 15, "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.073, "Triggers": [], "Execution Time": 2.186 } ] ] }, { "name": "history_keyset", "columns": "chat_id,created_at,id", "select_sql": "SELECT id,chat_id,sender_id,text,created_at FROM research_c99ee862.history WHERE chat_id=1 AND (created_at,id)>('2026-01-01Z'::timestamptz+85000*interval '1 microsecond',85000) ORDER BY created_at,id LIMIT 51", "insert_sql": "INSERT INTO research_c99ee862.history SELECT n,1,'11111111-1111-4111-8111-111111111111','new-synthetic-'||n,'2026-01-01Z'::timestamptz+n*interval '1 microsecond' FROM generate_series(100001,101000) AS n", "select_plans": [ [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 9.84, "Plan Rows": 51, "Plan Width": 51, "Actual Startup Time": 0.065, "Actual Total Time": 0.071, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1, "Shared Read Blocks": 3, "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": "candidate", "Relation Name": "history", "Alias": "history", "Startup Cost": 0.42, "Total Cost": 2490.25, "Plan Rows": 13482, "Plan Width": 51, "Actual Startup Time": 0.064, "Actual Total Time": 0.067, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 1) AND (ROW(created_at, id) > ROW(('2026-01-01 00:00:00+00'::timestamp with time zone + '00:00:00.085'::interval), 85000)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 1, "Shared Read Blocks": 3, "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": 124, "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.345, "Triggers": [], "Execution Time": 0.119 } ], [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 9.84, "Plan Rows": 51, "Plan Width": 51, "Actual Startup Time": 0.029, "Actual Total Time": 0.038, "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": "candidate", "Relation Name": "history", "Alias": "history", "Startup Cost": 0.42, "Total Cost": 2517.4, "Plan Rows": 13621, "Plan Width": 51, "Actual Startup Time": 0.028, "Actual Total Time": 0.033, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 1) AND (ROW(created_at, id) > ROW(('2026-01-01 00:00:00+00'::timestamp with time zone + '00:00:00.085'::interval), 85000)))", "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": 125, "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.525, "Triggers": [], "Execution Time": 0.102 } ], [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 9.83, "Plan Rows": 51, "Plan Width": 51, "Actual Startup Time": 0.03, "Actual Total Time": 0.038, "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": "candidate", "Relation Name": "history", "Alias": "history", "Startup Cost": 0.42, "Total Cost": 2539.99, "Plan Rows": 13760, "Plan Width": 51, "Actual Startup Time": 0.029, "Actual Total Time": 0.033, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 1) AND (ROW(created_at, id) > ROW(('2026-01-01 00:00:00+00'::timestamp with time zone + '00:00:00.085'::interval), 85000)))", "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": 125, "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.473, "Triggers": [], "Execution Time": 0.095 } ] ], "insert_plans": [ [ { "Plan": { "Node Type": "ModifyTable", "Operation": "Insert", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 0, "Plan Width": 0, "Actual Startup Time": 3.504, "Actual Total Time": 3.505, "Actual Rows": 0, "Actual Loops": 1, "Shared Hit Blocks": 6592, "Shared Read Blocks": 2, "Shared Dirtied Blocks": 23, "Shared Written Blocks": 20, "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": "Function Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Function Name": "generate_series", "Alias": "n", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 1000, "Plan Width": 68, "Actual Startup Time": 0.043, "Actual Total Time": 0.259, "Actual Rows": 1000, "Actual Loops": 1, "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": { "Shared Hit Blocks": 15, "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.093, "Triggers": [], "Execution Time": 3.552 } ], [ { "Plan": { "Node Type": "ModifyTable", "Operation": "Insert", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 0, "Plan Width": 0, "Actual Startup Time": 4.028, "Actual Total Time": 4.028, "Actual Rows": 0, "Actual Loops": 1, "Shared Hit Blocks": 6657, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 12, "Shared Written Blocks": 12, "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": "Function Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Function Name": "generate_series", "Alias": "n", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 1000, "Plan Width": 68, "Actual Startup Time": 0.081, "Actual Total Time": 0.324, "Actual Rows": 1000, "Actual Loops": 1, "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": { "Shared Hit Blocks": 15, "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.169, "Triggers": [], "Execution Time": 4.084 } ], [ { "Plan": { "Node Type": "ModifyTable", "Operation": "Insert", "Parallel Aware": false, "Async Capable": false, "Relation Name": "history", "Alias": "history", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 0, "Plan Width": 0, "Actual Startup Time": 3.288, "Actual Total Time": 3.288, "Actual Rows": 0, "Actual Loops": 1, "Shared Hit Blocks": 6630, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 12, "Shared Written Blocks": 12, "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": "Function Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Function Name": "generate_series", "Alias": "n", "Startup Cost": 0.0, "Total Cost": 27.5, "Plan Rows": 1000, "Plan Width": 68, "Actual Startup Time": 0.053, "Actual Total Time": 0.241, "Actual Rows": 1000, "Actual Loops": 1, "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": { "Shared Hit Blocks": 15, "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.107, "Triggers": [], "Execution Time": 3.328 } ] ] } ], "source_snapshot_sha256": "df5a6a8d97058191dfc0a2f1378a09a0d1d43c918f268c0b79e00579b317aa80", "backup_seconds": 0.2908229580207262, "backup_bytes": 9068166, "restore_seconds": 0.33597395799006335, "verification": { "before": "100000|f837d280b69f13bebe461b9e6f81bcac", "after": "100000|f837d280b69f13bebe461b9e6f81bcac", "equal": true }, "samples": [ { "id": 1, "chat_id": 1, "sender_id": "11111111-1111-4111-8111-111111111111", "text": "synthetic-1", "created_at": "2026-01-01T00:00:00.000001+00:00" }, { "id": 50000, "chat_id": 1, "sender_id": "11111111-1111-4111-8111-111111111111", "text": "synthetic-50000", "created_at": "2026-01-01T00:00:00.05+00:00" }, { "id": 90000, "chat_id": 1, "sender_id": "11111111-1111-4111-8111-111111111111", "text": "synthetic-90000", "created_at": "2026-01-01T00:00:00.09+00:00" }, { "id": 99000, "chat_id": 2, "sender_id": "11111111-1111-4111-8111-111111111111", "text": "synthetic-99000", "created_at": "2026-01-01T00:00:00.099+00:00" }, { "id": 100000, "chat_id": 3, "sender_id": "11111111-1111-4111-8111-111111111111", "text": "synthetic-100000", "created_at": "2026-01-01T00:00:00.1+00:00" } ] }