{ "database": "research_e3a4181a6e18", "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": 26.665, "plans": [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4041.65, "Total Cost": 4041.77, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 30.76, "Actual Total Time": 30.778, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1968, "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": 4041.65, "Total Cost": 4065.9, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 30.757, "Actual Total Time": 30.766, "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": 1968, "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": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3718.0, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 13.769, "Actual Total Time": 27.723, "Actual Rows": 14000, "Actual Loops": 1, "Filter": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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 Filter": 86000, "Shared Hit Blocks": 1968, "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.36, "Triggers": [], "Execution Time": 30.825 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4041.65, "Total Cost": 4041.77, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 31.086, "Actual Total Time": 31.104, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1968, "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": 4041.65, "Total Cost": 4065.9, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 31.083, "Actual Total Time": 31.093, "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": 1968, "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": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3718.0, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 15.316, "Actual Total Time": 27.916, "Actual Rows": 14000, "Actual Loops": 1, "Filter": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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 Filter": 86000, "Shared Hit Blocks": 1968, "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.179, "Triggers": [], "Execution Time": 31.149 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4041.65, "Total Cost": 4041.77, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 26.299, "Actual Total Time": 26.316, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1968, "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": 4041.65, "Total Cost": 4065.9, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 26.296, "Actual Total Time": 26.304, "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": 1968, "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": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3718.0, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 12.752, "Actual Total Time": 23.574, "Actual Rows": 14000, "Actual Loops": 1, "Filter": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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 Filter": 86000, "Shared Hit Blocks": 1968, "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.164, "Triggers": [], "Execution Time": 26.394 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4041.65, "Total Cost": 4041.77, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 21.487, "Actual Total Time": 21.501, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1968, "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": 4041.65, "Total Cost": 4065.9, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 21.484, "Actual Total Time": 21.492, "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": 1968, "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": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3718.0, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 11.832, "Actual Total Time": 19.56, "Actual Rows": 14000, "Actual Loops": 1, "Filter": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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 Filter": 86000, "Shared Hit Blocks": 1968, "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.175, "Triggers": [], "Execution Time": 21.542 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4041.65, "Total Cost": 4041.77, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 26.592, "Actual Total Time": 26.628, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 1968, "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": 4041.65, "Total Cost": 4065.9, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 26.589, "Actual Total Time": 26.597, "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": 1968, "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": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3718.0, "Plan Rows": 9701, "Plan Width": 121, "Actual Startup Time": 12.442, "Actual Total Time": 23.672, "Actual Rows": 14000, "Actual Loops": 1, "Filter": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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 Filter": 86000, "Shared Hit Blocks": 1968, "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.163, "Triggers": [], "Execution Time": 26.665 } ] }, { "chat_messages": 20000, "median_execution_ms": 7.168, "plans": [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 2929.91, "Total Cost": 2930.04, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 9.52, "Actual Total Time": 9.544, "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": 2929.91, "Total Cost": 2958.91, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 9.517, "Actual Total Time": 9.524, "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": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 225.12, "Total Cost": 2542.94, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 7.18, "Actual Total Time": 8.888, "Actual Rows": 4000, "Actual Loops": 1, "Recheck Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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, "Exact Heap Blocks": 385, "Lossy Heap Blocks": 0, "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": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "messages_history", "Startup Cost": 0.0, "Total Cost": 222.22, "Plan Rows": 19990, "Plan Width": 0, "Actual Startup Time": 1.674, "Actual Total Time": 1.674, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::uuid)", "Shared Hit Blocks": 19, "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.224, "Triggers": [], "Execution Time": 9.591 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 2929.91, "Total Cost": 2930.04, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 5.88, "Actual Total Time": 5.892, "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": 2929.91, "Total Cost": 2958.91, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 5.877, "Actual Total Time": 5.883, "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": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 225.12, "Total Cost": 2542.94, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 4.382, "Actual Total Time": 5.336, "Actual Rows": 4000, "Actual Loops": 1, "Recheck Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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, "Exact Heap Blocks": 385, "Lossy Heap Blocks": 0, "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": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "messages_history", "Startup Cost": 0.0, "Total Cost": 222.22, "Plan Rows": 19990, "Plan Width": 0, "Actual Startup Time": 0.669, "Actual Total Time": 0.67, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::uuid)", "Shared Hit Blocks": 19, "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.246, "Triggers": [], "Execution Time": 6.031 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 2929.91, "Total Cost": 2930.04, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 7.114, "Actual Total Time": 7.129, "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": 2929.91, "Total Cost": 2958.91, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 7.112, "Actual Total Time": 7.119, "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": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 225.12, "Total Cost": 2542.94, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 4.52, "Actual Total Time": 6.217, "Actual Rows": 4000, "Actual Loops": 1, "Recheck Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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, "Exact Heap Blocks": 385, "Lossy Heap Blocks": 0, "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": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "messages_history", "Startup Cost": 0.0, "Total Cost": 222.22, "Plan Rows": 19990, "Plan Width": 0, "Actual Startup Time": 0.735, "Actual Total Time": 0.736, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::uuid)", "Shared Hit Blocks": 19, "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.14, "Triggers": [], "Execution Time": 7.168 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 2929.91, "Total Cost": 2930.04, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 9.149, "Actual Total Time": 9.166, "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": 2929.91, "Total Cost": 2958.91, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 9.147, "Actual Total Time": 9.156, "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": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 225.12, "Total Cost": 2542.94, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 6.961, "Actual Total Time": 8.357, "Actual Rows": 4000, "Actual Loops": 1, "Recheck Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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, "Exact Heap Blocks": 385, "Lossy Heap Blocks": 0, "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": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "messages_history", "Startup Cost": 0.0, "Total Cost": 222.22, "Plan Rows": 19990, "Plan Width": 0, "Actual Startup Time": 1.173, "Actual Total Time": 1.174, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::uuid)", "Shared Hit Blocks": 19, "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.176, "Triggers": [], "Execution Time": 9.21 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 2929.91, "Total Cost": 2930.04, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 6.349, "Actual Total Time": 6.363, "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": 2929.91, "Total Cost": 2958.91, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 6.347, "Actual Total Time": 6.353, "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": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 225.12, "Total Cost": 2542.94, "Plan Rows": 11599, "Plan Width": 121, "Actual Startup Time": 4.511, "Actual Total Time": 5.601, "Actual Rows": 4000, "Actual Loops": 1, "Recheck Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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, "Exact Heap Blocks": 385, "Lossy Heap Blocks": 0, "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": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "messages_history", "Startup Cost": 0.0, "Total Cost": 222.22, "Plan Rows": 19990, "Plan Width": 0, "Actual Startup Time": 0.831, "Actual Total Time": 0.831, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::uuid)", "Shared Hit Blocks": 19, "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.201, "Triggers": [], "Execution Time": 6.401 } ] }, { "chat_messages": 200, "median_execution_ms": 0.073, "plans": [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 390.19, "Total Cost": 390.32, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.059, "Actual Total Time": 0.066, "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": 390.19, "Total Cost": 390.65, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.058, "Actual Total Time": 0.061, "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": 384.05, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.039, "Actual Total Time": 0.049, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "(chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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.08, "Triggers": [], "Execution Time": 0.082 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 390.19, "Total Cost": 390.32, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.053, "Actual Total Time": 0.06, "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": 390.19, "Total Cost": 390.65, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.052, "Actual Total Time": 0.055, "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": 384.05, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.036, "Actual Total Time": 0.044, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "(chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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.055, "Triggers": [], "Execution Time": 0.073 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 390.19, "Total Cost": 390.32, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.051, "Actual Total Time": 0.058, "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": 390.19, "Total Cost": 390.65, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.051, "Actual Total Time": 0.054, "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": 384.05, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.033, "Actual Total Time": 0.043, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "(chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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.05, "Triggers": [], "Execution Time": 0.128 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 390.19, "Total Cost": 390.32, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.052, "Actual Total Time": 0.06, "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": 390.19, "Total Cost": 390.65, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.051, "Actual Total Time": 0.055, "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": 384.05, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.034, "Actual Total Time": 0.043, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "(chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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.059, "Triggers": [], "Execution Time": 0.073 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 390.19, "Total Cost": 390.32, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.049, "Actual Total Time": 0.056, "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": 390.19, "Total Cost": 390.65, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.048, "Actual Total Time": 0.051, "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": 384.05, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.032, "Actual Total Time": 0.04, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "(chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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.048, "Triggers": [], "Execution Time": 0.067 } ] } ], "writes": [ { "rows": 1000, "commit_ms": 51.328176000197345, "wal_bytes": 254192 }, { "rows": 1000, "commit_ms": 132.15779799998018, "wal_bytes": 238088 }, { "rows": 1000, "commit_ms": 88.45494599995618, "wal_bytes": 245480 } ] }, { "variant": "composite", "index_bytes": 6127616, "reads": [ { "chat_messages": 70000, "median_execution_ms": 0.057, "plans": [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 34.54, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.03, "Actual Total Time": 0.05, "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": 6460.76, "Plan Rows": 9655, "Plan Width": 121, "Actual Startup Time": 0.028, "Actual Total Time": 0.041, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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.19, "Triggers": [], "Execution Time": 0.08 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 34.54, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.018, "Actual Total Time": 0.037, "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": 6460.76, "Plan Rows": 9655, "Plan Width": 121, "Actual Startup Time": 0.017, "Actual Total Time": 0.028, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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.088, "Triggers": [], "Execution Time": 0.057 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 34.54, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.016, "Actual Total Time": 0.035, "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": 6460.76, "Plan Rows": 9655, "Plan Width": 121, "Actual Startup Time": 0.015, "Actual Total Time": 0.027, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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.089, "Triggers": [], "Execution Time": 0.053 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 34.54, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.018, "Actual Total Time": 0.036, "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": 6460.76, "Plan Rows": 9655, "Plan Width": 121, "Actual Startup Time": 0.017, "Actual Total Time": 0.028, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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.14, "Triggers": [], "Execution Time": 0.055 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 34.54, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.018, "Actual Total Time": 0.037, "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": 6460.76, "Plan Rows": 9655, "Plan Width": 121, "Actual Startup Time": 0.017, "Actual Total Time": 0.028, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '1475545b-0118-40e4-959e-59045703e558'::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.176, "Triggers": [], "Execution Time": 0.057 } ] }, { "chat_messages": 20000, "median_execution_ms": 0.072, "plans": [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 29.48, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.049, "Actual Total Time": 0.074, "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": 6564.03, "Plan Rows": 11517, "Plan Width": 121, "Actual Startup Time": 0.049, "Actual Total Time": 0.061, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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.153, "Triggers": [], "Execution Time": 0.095 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 29.48, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.018, "Actual Total Time": 0.055, "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": 6564.03, "Plan Rows": 11517, "Plan Width": 121, "Actual Startup Time": 0.017, "Actual Total Time": 0.046, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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.071, "Triggers": [], "Execution Time": 0.072 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 29.48, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.017, "Actual Total Time": 0.038, "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": 6564.03, "Plan Rows": 11517, "Plan Width": 121, "Actual Startup Time": 0.016, "Actual Total Time": 0.03, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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.061, "Triggers": [], "Execution Time": 0.052 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 29.48, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.014, "Actual Total Time": 0.033, "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": 6564.03, "Plan Rows": 11517, "Plan Width": 121, "Actual Startup Time": 0.014, "Actual Total Time": 0.025, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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.055, "Triggers": [], "Execution Time": 0.047 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 29.48, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.018, "Actual Total Time": 0.143, "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": 6564.03, "Plan Rows": 11517, "Plan Width": 121, "Actual Startup Time": 0.017, "Actual Total Time": 0.135, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '38cc764f-0e25-4cd9-8c22-46efb8b690da'::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.155, "Triggers": [], "Execution Time": 0.161 } ] }, { "chat_messages": 200, "median_execution_ms": 0.065, "plans": [ { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 147.78, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.027, "Actual Total Time": 0.045, "Actual Rows": 40, "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": 532.08, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.026, "Actual Total Time": 0.038, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "((chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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": 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.119, "Triggers": [], "Execution Time": 0.065 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 147.78, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.016, "Actual Total Time": 0.032, "Actual Rows": 40, "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": 532.08, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.015, "Actual Total Time": 0.025, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "((chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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": 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.1, "Triggers": [], "Execution Time": 0.05 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 147.78, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.012, "Actual Total Time": 0.028, "Actual Rows": 40, "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": 532.08, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.011, "Actual Total Time": 0.021, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "((chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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": 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.064, "Triggers": [], "Execution Time": 0.042 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 147.78, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.016, "Actual Total Time": 0.032, "Actual Rows": 40, "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": 532.08, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.015, "Actual Total Time": 0.025, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "((chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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": 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.163, "Triggers": [], "Execution Time": 0.368 }, { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 147.78, "Plan Rows": 51, "Plan Width": 121, "Actual Startup Time": 0.014, "Actual Total Time": 0.035, "Actual Rows": 40, "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": 532.08, "Plan Rows": 184, "Plan Width": 121, "Actual Startup Time": 0.013, "Actual Total Time": 0.023, "Actual Rows": 40, "Actual Loops": 1, "Index Cond": "((chat_id = 'be0dc61b-8735-451c-9bee-09d564986b25'::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": 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.076, "Triggers": [], "Execution Time": 0.079 } ] } ], "writes": [ { "rows": 1000, "commit_ms": 186.78137000006245, "wal_bytes": 326616 }, { "rows": 1000, "commit_ms": 329.82252800002243, "wal_bytes": 265320 }, { "rows": 1000, "commit_ms": 473.14494300007937, "wal_bytes": 322672 } ] } ], "snapshot": { "counts": { "users": 1, "chats": 10, "chat_members": 10, "messages": 100000, "sessions": 0 }, "messages_sha256": "0f90589eece3910789d2eae40d5685c80cdf9f93e414aca19893851e85ffb071", "selected_messages": [ { "id": "00022a36-d2df-41d5-ab35-a9b2c71cd633", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.013387+00:00" }, { "id": "0002979a-977b-4045-aa42-dfe668d8a498", "chat_id": "38cc764f-0e25-4cd9-8c22-46efb8b690da", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.002863+00:00" }, { "id": "7facae94-6022-46c6-9f65-d76df1d46d58", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.042234+00:00" }, { "id": "fffe2b8a-98d0-4c28-ae2a-08845ec95a49", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.035161+00:00" }, { "id": "fffe8eae-d740-4296-b936-4f90a7bc140d", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.002345+00:00" } ] }, "backup": { "format": "pg_dump custom", "bytes": 2655979, "dump_seconds": 1.1019309590000024, "bootstrap_seconds": 2.5880723749999994, "restore_seconds": 1.742141042, "restored_database": "restore_70a1c2c75a5c", "source_container_id": "f8be6202d5e4", "restore_container_id": "2db271910eb2", "fresh_restore_volume": "mtusi-lab2-restore_70a1c2c75a5c-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": "0f90589eece3910789d2eae40d5685c80cdf9f93e414aca19893851e85ffb071", "selected_messages": [ { "id": "00022a36-d2df-41d5-ab35-a9b2c71cd633", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.013387+00:00" }, { "id": "0002979a-977b-4045-aa42-dfe668d8a498", "chat_id": "38cc764f-0e25-4cd9-8c22-46efb8b690da", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.002863+00:00" }, { "id": "7facae94-6022-46c6-9f65-d76df1d46d58", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.042234+00:00" }, { "id": "fffe2b8a-98d0-4c28-ae2a-08845ec95a49", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.035161+00:00" }, { "id": "fffe8eae-d740-4296-b936-4f90a7bc140d", "chat_id": "1475545b-0118-40e4-959e-59045703e558", "sender_id": "0bbe8371-c929-4ca0-9bde-82cfa960a2ac", "text": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created_at": "2026-01-01T00:00:00.002345+00:00" } ] } } }