{ "database": "lab2_research_eaaceacf5e", "rows": 100000, "chat_sizes": [ 70000, 20000, 9000, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ], "seed_seconds": 5.309577420000096, "concurrency": 1, "warmup_queries_per_case": 3, "queries_per_case": 100, "repeats_write": 3, "variants": [ { "name": "chat_only", "ddl": "CREATE INDEX research_idx ON messages(chat_id)", "build_seconds": 0.07175255599986485, "index_bytes": 737280, "write_1000_commit_seconds": [ 0.04581827099991642, 0.05066664200012383, 0.05026085800000146 ], "write_median_rows_per_second": 19896.19834981669, "cases": [ { "chat_size": 70000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.9803247230011038, "successful_rps": 102.00701630156419, "p50_ms": 9.210211000208801, "p95_ms": 11.736868000298273, "p99_ms": 28.171970999665064, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 5908.64, "Total Cost": 5914.51, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 7.038, "Actual Total Time": 8.725, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 2826, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "Gather Merge", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 5908.64, "Total Cost": 9590.83, "Plan Rows": 32019, "Plan Width": 192, "Actual Startup Time": 7.036, "Actual Total Time": 8.72, "Actual Rows": 51, "Actual Loops": 1, "Workers Planned": 1, "Workers Launched": 1, "Shared Hit Blocks": 2826, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 4908.63, "Total Cost": 4988.68, "Plan Rows": 32019, "Plan Width": 192, "Actual Startup Time": 5.02, "Actual Total Time": 5.022, "Actual Rows": 51, "Actual Loops": 2, "Sort Key": [ "created_at", "id" ], "Sort Method": "top-N heapsort", "Sort Space Used": 38, "Sort Space Type": "Memory", "Shared Hit Blocks": 2826, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Workers": [ { "Worker Number": 0, "Sort Method": "top-N heapsort", "Sort Space Used": 38, "Sort Space Type": "Memory" } ], "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": true, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3840.41, "Plan Rows": 32019, "Plan Width": 192, "Actual Startup Time": 0.184, "Actual Total Time": 3.223, "Actual Rows": 31500, "Actual Loops": 2, "Filter": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.007001+00'::timestamp with time zone, '80faa22b-17f0-494e-8a8f-c9cf7b79c163'::uuid)))", "Rows Removed by Filter": 18500, "Shared Hit Blocks": 2811, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Workers": [] } ] } ] } ] }, "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.101, "Triggers": [], "Execution Time": 8.759 } }, { "chat_size": 70000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.8387598000008438, "successful_rps": 119.22364424224837, "p50_ms": 8.166588999756641, "p95_ms": 10.050038000372297, "p99_ms": 13.36698900013289, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 5318.6, "Total Cost": 5324.47, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 7.255, "Actual Total Time": 9.249, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 2826, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "Gather Merge", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 5318.6, "Total Cost": 6966.9, "Plan Rows": 14333, "Plan Width": 192, "Actual Startup Time": 7.179, "Actual Total Time": 9.169, "Actual Rows": 51, "Actual Loops": 1, "Workers Planned": 1, "Workers Launched": 1, "Shared Hit Blocks": 2826, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 4318.59, "Total Cost": 4354.42, "Plan Rows": 14333, "Plan Width": 192, "Actual Startup Time": 4.979, "Actual Total Time": 4.984, "Actual Rows": 51, "Actual Loops": 2, "Sort Key": [ "created_at", "id" ], "Sort Method": "top-N heapsort", "Sort Space Used": 38, "Sort Space Type": "Memory", "Shared Hit Blocks": 2826, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Workers": [ { "Worker Number": 0, "Sort Method": "top-N heapsort", "Sort Space Used": 38, "Sort Space Type": "Memory" } ], "Plans": [ { "Node Type": "Seq Scan", "Parent Relationship": "Outer", "Parallel Aware": true, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.0, "Total Cost": 3840.41, "Plan Rows": 14333, "Plan Width": 192, "Actual Startup Time": 1.094, "Actual Total Time": 3.713, "Actual Rows": 17500, "Actual Loops": 2, "Filter": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.035001+00'::timestamp with time zone, '8c6bb688-4bf1-48bc-b8c4-d383944c3cb5'::uuid)))", "Rows Removed by Filter": 32500, "Shared Hit Blocks": 2811, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Workers": [] } ] } ] } ] }, "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.077, "Triggers": [], "Execution Time": 9.29 } }, { "chat_size": 70000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.692634459000601, "successful_rps": 144.37629936040076, "p50_ms": 6.72650899969085, "p95_ms": 8.431450999978551, "p99_ms": 9.563345999595185, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4724.04, "Total Cost": 4724.17, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 5.089, "Actual Total Time": 5.094, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 2811, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 4724.04, "Total Cost": 4736.26, "Plan Rows": 4887, "Plan Width": 192, "Actual Startup Time": 5.088, "Actual Total Time": 5.091, "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": 2811, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 4561.0, "Plan Rows": 4887, "Plan Width": 192, "Actual Startup Time": 2.948, "Actual Total Time": 4.659, "Actual Rows": 6999, "Actual Loops": 1, "Filter": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.063001+00'::timestamp with time zone, '88938e51-1e25-4508-85e5-4c8e47fd3576'::uuid)))", "Rows Removed by Filter": 93001, "Shared Hit Blocks": 2811, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 5.129 } }, { "chat_size": 20000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.2993136759987465, "successful_rps": 334.0976641522347, "p50_ms": 2.915214000040578, "p95_ms": 3.7551200002781115, "p99_ms": 3.944087000036234, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 4015.67, "Total Cost": 4015.8, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 3.095, "Actual Total Time": 3.101, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 4015.67, "Total Cost": 4062.49, "Plan Rows": 18727, "Plan Width": 192, "Actual Startup Time": 3.094, "Actual Total Time": 3.098, "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": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 227.85, "Total Cost": 3390.9, "Plan Rows": 18727, "Plan Width": 192, "Actual Startup Time": 0.44, "Actual Total Time": 1.935, "Actual Rows": 17999, "Actual Loops": 1, "Recheck Cond": "(chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.002001+00'::timestamp with time zone, '01bd6fea-2be5-403c-b230-bdfc889d5730'::uuid))", "Rows Removed by Filter": 2001, "Exact Heap Blocks": 557, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "research_idx", "Startup Cost": 0.0, "Total Cost": 223.17, "Plan Rows": 20117, "Plan Width": 0, "Actual Startup Time": 0.259, "Actual Total Time": 0.259, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::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.081, "Triggers": [], "Execution Time": 3.141 } }, { "chat_size": 20000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.2553124020028008, "successful_rps": 391.67701692338073, "p50_ms": 2.500058000350691, "p95_ms": 3.0348320001394313, "p99_ms": 3.411917999983416, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3859.38, "Total Cost": 3859.5, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 2.257, "Actual Total Time": 2.264, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 3859.38, "Total Cost": 3894.57, "Plan Rows": 14077, "Plan Width": 192, "Actual Startup Time": 2.257, "Actual Total Time": 2.261, "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": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 226.69, "Total Cost": 3389.74, "Plan Rows": 14077, "Plan Width": 192, "Actual Startup Time": 0.75, "Actual Total Time": 1.678, "Actual Rows": 9999, "Actual Loops": 1, "Recheck Cond": "(chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.010001+00'::timestamp with time zone, '758312ad-f300-4498-87fb-4f456e7d7d26'::uuid))", "Rows Removed by Filter": 10001, "Exact Heap Blocks": 557, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "research_idx", "Startup Cost": 0.0, "Total Cost": 223.17, "Plan Rows": 20117, "Plan Width": 0, "Actual Startup Time": 0.227, "Actual Total Time": 0.228, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::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.071, "Triggers": [], "Execution Time": 2.312 } }, { "chat_size": 20000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.21075914700395515, "successful_rps": 474.47525491324643, "p50_ms": 2.042078999693331, "p95_ms": 2.75955500001146, "p99_ms": 3.0126440001367882, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3751.11, "Total Cost": 3751.24, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 1.67, "Actual Total Time": 1.675, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 3751.11, "Total Cost": 3778.25, "Plan Rows": 10856, "Plan Width": 192, "Actual Startup Time": 1.669, "Actual Total Time": 1.671, "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": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.88, "Total Cost": 3388.93, "Plan Rows": 10856, "Plan Width": 192, "Actual Startup Time": 1.364, "Actual Total Time": 1.535, "Actual Rows": 1999, "Actual Loops": 1, "Recheck Cond": "(chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.018001+00'::timestamp with time zone, 'f2cea50c-367f-4137-89b1-a168c16b4a7c'::uuid))", "Rows Removed by Filter": 18001, "Exact Heap Blocks": 557, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 576, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "research_idx", "Startup Cost": 0.0, "Total Cost": 223.17, "Plan Rows": 20117, "Plan Width": 0, "Actual Startup Time": 0.261, "Actual Total Time": 0.261, "Actual Rows": 20000, "Actual Loops": 1, "Index Cond": "(chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::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.079, "Triggers": [], "Execution Time": 1.718 } }, { "chat_size": 9000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.15242807200093011, "successful_rps": 656.0471354606506, "p50_ms": 1.433597999948688, "p95_ms": 2.0341650001682865, "p99_ms": 2.3047670001687948, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3361.46, "Total Cost": 3361.59, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 1.561, "Actual Total Time": 1.572, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 3361.46, "Total Cost": 3383.22, "Plan Rows": 8705, "Plan Width": 192, "Actual Startup Time": 1.559, "Actual Total Time": 1.565, "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": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 102.14, "Total Cost": 3071.04, "Plan Rows": 8705, "Plan Width": 192, "Actual Startup Time": 0.187, "Actual Total Time": 0.998, "Actual Rows": 8099, "Actual Loops": 1, "Recheck Cond": "(chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.000901+00'::timestamp with time zone, '57960dbe-3131-4cde-b15a-c90d79b273d6'::uuid))", "Rows Removed by Filter": 901, "Exact Heap Blocks": 244, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "research_idx", "Startup Cost": 0.0, "Total Cost": 99.97, "Plan Rows": 9023, "Plan Width": 0, "Actual Startup Time": 0.105, "Actual Total Time": 0.106, "Actual Rows": 9000, "Actual Loops": 1, "Index Cond": "(chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid)", "Shared Hit Blocks": 10, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.095, "Triggers": [], "Execution Time": 1.654 } }, { "chat_size": 9000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.13607502100194324, "successful_rps": 734.8887346383135, "p50_ms": 1.249003000339144, "p95_ms": 1.894750999781536, "p99_ms": 2.7906280001843697, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3328.22, "Total Cost": 3328.35, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.884, "Actual Total Time": 0.889, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 3328.22, "Total Cost": 3347.51, "Plan Rows": 7716, "Plan Width": 192, "Actual Startup Time": 0.883, "Actual Total Time": 0.886, "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": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 101.89, "Total Cost": 3070.8, "Plan Rows": 7716, "Plan Width": 192, "Actual Startup Time": 0.31, "Actual Total Time": 0.622, "Actual Rows": 4499, "Actual Loops": 1, "Recheck Cond": "(chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.004501+00'::timestamp with time zone, '791f3fe8-7c0d-4901-8f0f-e02c44a4c4b9'::uuid))", "Rows Removed by Filter": 4501, "Exact Heap Blocks": 244, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "research_idx", "Startup Cost": 0.0, "Total Cost": 99.97, "Plan Rows": 9023, "Plan Width": 0, "Actual Startup Time": 0.091, "Actual Total Time": 0.091, "Actual Rows": 9000, "Actual Loops": 1, "Index Cond": "(chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid)", "Shared Hit Blocks": 10, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.065, "Triggers": [], "Execution Time": 0.924 } }, { "chat_size": 9000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.10787702000288846, "successful_rps": 926.9814831492606, "p50_ms": 1.013809999676596, "p95_ms": 1.4137680000203545, "p99_ms": 1.606690999778948, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 3294.67, "Total Cost": 3294.8, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.639, "Actual Total Time": 0.644, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 3294.67, "Total Cost": 3311.47, "Plan Rows": 6718, "Plan Width": 192, "Actual Startup Time": 0.639, "Actual Total Time": 0.641, "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": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": 101.64, "Total Cost": 3070.55, "Plan Rows": 6718, "Plan Width": 192, "Actual Startup Time": 0.498, "Actual Total Time": 0.565, "Actual Rows": 899, "Actual Loops": 1, "Recheck Cond": "(chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.008101+00'::timestamp with time zone, '932a9b1e-7e13-4a94-8ae0-27127a2b0d14'::uuid))", "Rows Removed by Filter": 8101, "Exact Heap Blocks": 244, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 254, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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": "research_idx", "Startup Cost": 0.0, "Total Cost": 99.97, "Plan Rows": 9023, "Plan Width": 0, "Actual Startup Time": 0.089, "Actual Total Time": 0.089, "Actual Rows": 9000, "Actual Loops": 1, "Index Cond": "(chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid)", "Shared Hit Blocks": 10, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.069, "Triggers": [], "Execution Time": 0.677 } }, { "chat_size": 100, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03476310599944554, "successful_rps": 2876.6129241039325, "p50_ms": 0.3296269997008494, "p95_ms": 0.40918600006989436, "p99_ms": 0.4478549999475945, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 340.72, "Total Cost": 340.85, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.03, "Actual Total Time": 0.034, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Sort", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 340.72, "Total Cost": 340.96, "Plan Rows": 97, "Plan Width": 192, "Actual Startup Time": 0.03, "Actual Total Time": 0.031, "Actual Rows": 51, "Actual Loops": 1, "Sort Key": [ "created_at", "id" ], "Sort Method": "quicksort", "Sort Space Used": 47, "Sort Space Type": "Memory", "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 5.04, "Total Cost": 337.52, "Plan Rows": 97, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.016, "Actual Rows": 89, "Actual Loops": 1, "Recheck Cond": "(chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.000011+00'::timestamp with time zone, 'd92d7f34-94d3-4621-b3ca-fae1968cdee8'::uuid))", "Rows Removed by Filter": 11, "Exact Heap Blocks": 4, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "research_idx", "Startup Cost": 0.0, "Total Cost": 5.02, "Plan Rows": 97, "Plan Width": 0, "Actual Startup Time": 0.003, "Actual Total Time": 0.003, "Actual Rows": 100, "Actual Loops": 1, "Index Cond": "(chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid)", "Shared Hit Blocks": 2, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.067, "Triggers": [], "Execution Time": 0.061 } }, { "chat_size": 100, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.035047746999680385, "successful_rps": 2853.250452901065, "p50_ms": 0.32902200018725125, "p95_ms": 0.4999630000384059, "p99_ms": 0.5605359997389314, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 340.68, "Total Cost": 340.81, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.027, "Actual Total Time": 0.031, "Actual Rows": 49, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Sort", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 340.68, "Total Cost": 340.92, "Plan Rows": 96, "Plan Width": 192, "Actual Startup Time": 0.026, "Actual Total Time": 0.028, "Actual Rows": 49, "Actual Loops": 1, "Sort Key": [ "created_at", "id" ], "Sort Method": "quicksort", "Sort Space Used": 37, "Sort Space Type": "Memory", "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 5.04, "Total Cost": 337.52, "Plan Rows": 96, "Plan Width": 192, "Actual Startup Time": 0.015, "Actual Total Time": 0.018, "Actual Rows": 49, "Actual Loops": 1, "Recheck Cond": "(chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.000051+00'::timestamp with time zone, 'c9bebfa4-aab4-4e76-8aee-baadc67f5b62'::uuid))", "Rows Removed by Filter": 51, "Exact Heap Blocks": 4, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "research_idx", "Startup Cost": 0.0, "Total Cost": 5.02, "Plan Rows": 97, "Plan Width": 0, "Actual Startup Time": 0.005, "Actual Total Time": 0.005, "Actual Rows": 100, "Actual Loops": 1, "Index Cond": "(chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid)", "Shared Hit Blocks": 2, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.073, "Triggers": [], "Execution Time": 0.062 } }, { "chat_size": 100, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.016015682997476688, "successful_rps": 6243.879828025771, "p50_ms": 0.15205299996523536, "p95_ms": 0.19920599970646435, "p99_ms": 0.2571320001152344, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 340.68, "Total Cost": 340.81, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.016, "Actual Total Time": 0.017, "Actual Rows": 9, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Sort", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 340.68, "Total Cost": 340.92, "Plan Rows": 96, "Plan Width": 192, "Actual Startup Time": 0.016, "Actual Total Time": 0.016, "Actual Rows": 9, "Actual Loops": 1, "Sort Key": [ "created_at", "id" ], "Sort Method": "quicksort", "Sort Space Used": 27, "Sort Space Type": "Memory", "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Heap Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Relation Name": "messages", "Alias": "messages", "Startup Cost": 5.04, "Total Cost": 337.52, "Plan Rows": 96, "Plan Width": 192, "Actual Startup Time": 0.013, "Actual Total Time": 0.014, "Actual Rows": 9, "Actual Loops": 1, "Recheck Cond": "(chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid)", "Rows Removed by Index Recheck": 0, "Filter": "(ROW(created_at, id) > ROW('2026-01-01 00:00:00.000091+00'::timestamp with time zone, '08af9a4a-ba92-4773-b90c-48860e4e308a'::uuid))", "Rows Removed by Filter": 91, "Exact Heap Blocks": 4, "Lossy Heap Blocks": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Bitmap Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Index Name": "research_idx", "Startup Cost": 0.0, "Total Cost": 5.02, "Plan Rows": 97, "Plan Width": 0, "Actual Startup Time": 0.003, "Actual Total Time": 0.003, "Actual Rows": 100, "Actual Loops": 1, "Index Cond": "(chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid)", "Shared Hit Blocks": 2, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "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.044 } } ] }, { "name": "composite", "ddl": "CREATE INDEX research_idx ON messages(chat_id,created_at,id)", "build_seconds": 0.111595443999704, "index_bytes": 6234112, "write_1000_commit_seconds": [ 0.04693998999982796, 0.051292841999838856, 0.0557781510001405 ], "write_median_rows_per_second": 19495.897692764647, "cases": [ { "chat_size": 70000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.041383087997019175, "successful_rps": 2416.4460614249715, "p50_ms": 0.37220299964246806, "p95_ms": 0.6553749999511638, "p99_ms": 0.7813890001671098, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 13.25, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.011, "Actual Total Time": 0.016, "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": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 13764.94, "Plan Rows": 54698, "Plan Width": 192, "Actual Startup Time": 0.011, "Actual Total Time": 0.014, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.007001+00'::timestamp with time zone, '80faa22b-17f0-494e-8a8f-c9cf7b79c163'::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.028, "Triggers": [], "Execution Time": 0.029 } }, { "chat_size": 70000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04392264599982809, "successful_rps": 2276.7298673306564, "p50_ms": 0.3974350001954008, "p95_ms": 0.6794159999117255, "p99_ms": 0.8419819996561273, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 26.11, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.013, "Actual Total Time": 0.02, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 12263.78, "Plan Rows": 24343, "Plan Width": 192, "Actual Startup Time": 0.013, "Actual Total Time": 0.017, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.035001+00'::timestamp with time zone, '8c6bb688-4bf1-48bc-b8c4-d383944c3cb5'::uuid)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.039, "Triggers": [], "Execution Time": 0.04 } }, { "chat_size": 70000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04076590000113356, "successful_rps": 2453.030596582422, "p50_ms": 0.3765860001294641, "p95_ms": 0.5873780000911211, "p99_ms": 0.6570290001945978, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 110.0, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.016, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 10512.22, "Plan Rows": 4892, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.013, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.063001+00'::timestamp with time zone, '88938e51-1e25-4508-85e5-4c8e47fd3576'::uuid)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.026, "Triggers": [], "Execution Time": 0.029 } }, { "chat_size": 20000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04665251200003695, "successful_rps": 2143.507299240838, "p50_ms": 0.42907299985017744, "p95_ms": 0.6925920001776831, "p99_ms": 1.1447839997345, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 33.34, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.017, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 11980.71, "Plan Rows": 18561, "Plan Width": 192, "Actual Startup Time": 0.009, "Actual Total Time": 0.014, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.002001+00'::timestamp with time zone, '01bd6fea-2be5-403c-b230-bdfc889d5730'::uuid)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.026, "Triggers": [], "Execution Time": 0.031 } }, { "chat_size": 20000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03875026900141165, "successful_rps": 2580.627246648457, "p50_ms": 0.35081500027445145, "p95_ms": 0.5369510004129552, "p99_ms": 0.7291689998965012, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 43.29, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.011, "Actual Total Time": 0.016, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 11750.29, "Plan Rows": 13977, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.014, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.010001+00'::timestamp with time zone, '758312ad-f300-4498-87fb-4f456e7d7d26'::uuid)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.024, "Triggers": [], "Execution Time": 0.029 } }, { "chat_size": 20000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03709214699892982, "successful_rps": 2695.9884528357225, "p50_ms": 0.3494699999464501, "p95_ms": 0.5027769998378062, "p99_ms": 0.5548970002564602, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 55.25, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.012, "Actual Total Time": 0.018, "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": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 11592.47, "Plan Rows": 10781, "Plan Width": 192, "Actual Startup Time": 0.012, "Actual Total Time": 0.015, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.018001+00'::timestamp with time zone, 'f2cea50c-367f-4137-89b1-a168c16b4a7c'::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.031, "Triggers": [], "Execution Time": 0.034 } }, { "chat_size": 9000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04408830999864222, "successful_rps": 2268.174942588629, "p50_ms": 0.4102230000171403, "p95_ms": 0.647184000172274, "p99_ms": 0.7235369998852548, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 68.41, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.018, "Actual Rows": 51, "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": "Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 11487.9, "Plan Rows": 8617, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.015, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000901+00'::timestamp with time zone, '57960dbe-3131-4cde-b15a-c90d79b273d6'::uuid)))", "Rows Removed by Index Recheck": 0, "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.033, "Triggers": [], "Execution Time": 0.032 } }, { "chat_size": 9000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.037001367998072965, "successful_rps": 2702.6027795839336, "p50_ms": 0.34838300007322687, "p95_ms": 0.500633000228845, "p99_ms": 0.6056950001038786, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 76.57, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.016, "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": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 11440.21, "Plan Rows": 7661, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.013, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.004501+00'::timestamp with time zone, '791f3fe8-7c0d-4901-8f0f-e02c44a4c4b9'::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.024, "Triggers": [], "Execution Time": 0.028 } }, { "chat_size": 9000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03956251300178337, "successful_rps": 2527.645298858853, "p50_ms": 0.34910400017906795, "p95_ms": 0.6024100002832711, "p99_ms": 0.6948939999347203, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 87.36, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.012, "Actual Total Time": 0.017, "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": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 11392.04, "Plan Rows": 6682, "Plan Width": 192, "Actual Startup Time": 0.012, "Actual Total Time": 0.015, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.008101+00'::timestamp with time zone, '932a9b1e-7e13-4a94-8ae0-27127a2b0d14'::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.026, "Triggers": [], "Execution Time": 0.032 } }, { "chat_size": 100, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.037801948994456325, "successful_rps": 2645.3662485673703, "p50_ms": 0.3530710000632098, "p95_ms": 0.49992200001724996, "p99_ms": 0.6290189999162976, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 201.25, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.01, "Actual Total Time": 0.015, "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": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 421.77, "Plan Rows": 107, "Plan Width": 192, "Actual Startup Time": 0.009, "Actual Total Time": 0.012, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000011+00'::timestamp with time zone, 'd92d7f34-94d3-4621-b3ca-fae1968cdee8'::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.023, "Triggers": [], "Execution Time": 0.028 } }, { "chat_size": 100, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.0364496759980284, "successful_rps": 2743.508611857321, "p50_ms": 0.3465549998509232, "p95_ms": 0.48869500005821465, "p99_ms": 0.5261889996290847, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 201.24, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.009, "Actual Total Time": 0.016, "Actual Rows": 49, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 417.81, "Plan Rows": 106, "Plan Width": 192, "Actual Startup Time": 0.009, "Actual Total Time": 0.013, "Actual Rows": 49, "Actual Loops": 1, "Index Cond": "((chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000051+00'::timestamp with time zone, 'c9bebfa4-aab4-4e76-8aee-baadc67f5b62'::uuid)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.024, "Triggers": [], "Execution Time": 0.028 } }, { "chat_size": 100, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.019799011999566574, "successful_rps": 5050.757078292045, "p50_ms": 0.17754400005287607, "p95_ms": 0.29589299992949236, "p99_ms": 0.36165500023344066, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 201.24, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.009, "Actual Total Time": 0.01, "Actual Rows": 9, "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": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 417.81, "Plan Rows": 106, "Plan Width": 192, "Actual Startup Time": 0.008, "Actual Total Time": 0.009, "Actual Rows": 9, "Actual Loops": 1, "Index Cond": "((chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000091+00'::timestamp with time zone, '08af9a4a-ba92-4773-b90c-48860e4e308a'::uuid)))", "Rows Removed by Index Recheck": 0, "Shared Hit Blocks": 4, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.022, "Triggers": [], "Execution Time": 0.023 } } ] }, { "name": "covering", "ddl": "CREATE INDEX research_idx ON messages(chat_id,created_at,id) INCLUDE(sender_id,text)", "build_seconds": 0.2411143950002952, "index_bytes": 24576000, "write_1000_commit_seconds": [ 0.055284613000367244, 0.056680701000004774, 0.045771718000196415 ], "write_median_rows_per_second": 18088.215612422886, "cases": [ { "chat_size": 70000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04957065999678889, "successful_rps": 2017.3223436298376, "p50_ms": 0.4653819996747188, "p95_ms": 0.7443629997396783, "p99_ms": 0.9964219998437329, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.43, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.026, "Actual Total Time": 0.05, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 7517.52, "Plan Rows": 54655, "Plan Width": 192, "Actual Startup Time": 0.025, "Actual Total Time": 0.034, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.007001+00'::timestamp with time zone, '80faa22b-17f0-494e-8a8f-c9cf7b79c163'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.094, "Triggers": [], "Execution Time": 0.083 } }, { "chat_size": 70000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.049511427999732405, "successful_rps": 2019.735726477945, "p50_ms": 0.4206859998703294, "p95_ms": 0.8181879998119257, "p99_ms": 1.8737999998847954, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.43, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.018, "Actual Total Time": 0.028, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 3408.0, "Plan Rows": 24779, "Plan Width": 192, "Actual Startup Time": 0.018, "Actual Total Time": 0.025, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.035001+00'::timestamp with time zone, '8c6bb688-4bf1-48bc-b8c4-d383944c3cb5'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.087, "Triggers": [], "Execution Time": 0.047 } }, { "chat_size": 70000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.09437181099701775, "successful_rps": 1059.6384549954234, "p50_ms": 0.5521519997273572, "p95_ms": 1.0565100001258543, "p99_ms": 1.5206779999061837, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.45, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.032, "Actual Total Time": 0.046, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 683.46, "Plan Rows": 4952, "Plan Width": 192, "Actual Startup Time": 0.032, "Actual Total Time": 0.04, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'c9f802fd-c998-4180-9ca3-f02977eb8301'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.063001+00'::timestamp with time zone, '88938e51-1e25-4508-85e5-4c8e47fd3576'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.104, "Triggers": [], "Execution Time": 0.082 } }, { "chat_size": 20000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03786445699824981, "successful_rps": 2640.9991830761564, "p50_ms": 0.33988799987128004, "p95_ms": 0.4876269999840588, "p99_ms": 0.6899229997543443, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.44, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.02, "Actual Total Time": 0.031, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 2560.3, "Plan Rows": 18594, "Plan Width": 192, "Actual Startup Time": 0.02, "Actual Total Time": 0.027, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.002001+00'::timestamp with time zone, '01bd6fea-2be5-403c-b230-bdfc889d5730'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.074, "Triggers": [], "Execution Time": 0.053 } }, { "chat_size": 20000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04774413200220806, "successful_rps": 2094.4982305966987, "p50_ms": 0.444366000010632, "p95_ms": 0.6621190000259958, "p99_ms": 1.2398469998515793, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.44, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.024, "Actual Total Time": 0.032, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 1928.6, "Plan Rows": 14009, "Plan Width": 192, "Actual Startup Time": 0.024, "Actual Total Time": 0.029, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.010001+00'::timestamp with time zone, '758312ad-f300-4498-87fb-4f456e7d7d26'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.073, "Triggers": [], "Execution Time": 0.056 } }, { "chat_size": 20000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.05102691599904574, "successful_rps": 1959.7500268656274, "p50_ms": 0.4555680002340523, "p95_ms": 0.8052859998315398, "p99_ms": 1.440876999822649, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.45, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.021, "Actual Total Time": 0.028, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 1492.98, "Plan Rows": 10828, "Plan Width": 192, "Actual Startup Time": 0.02, "Actual Total Time": 0.025, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '43c99015-4e1d-46c4-8a29-369516c20985'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.018001+00'::timestamp with time zone, 'f2cea50c-367f-4137-89b1-a168c16b4a7c'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.049 } }, { "chat_size": 9000, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.04266578400165599, "successful_rps": 2343.7984872402367, "p50_ms": 0.39160400001492235, "p95_ms": 0.5713150003430201, "p99_ms": 0.7498550003219862, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.43, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.016, "Actual Total Time": 0.027, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 1179.92, "Plan Rows": 8575, "Plan Width": 192, "Actual Startup Time": 0.016, "Actual Total Time": 0.024, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000901+00'::timestamp with time zone, '57960dbe-3131-4cde-b15a-c90d79b273d6'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.071, "Triggers": [], "Execution Time": 0.044 } }, { "chat_size": 9000, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.0400733649967151, "successful_rps": 2495.423082344026, "p50_ms": 0.38468799994006986, "p95_ms": 0.4954159999215335, "p99_ms": 0.560278000193648, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.44, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.013, "Actual Total Time": 0.022, "Actual Rows": 51, "Actual Loops": 1, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0, "Plans": [ { "Node Type": "Index Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 1048.7, "Plan Rows": 7614, "Plan Width": 192, "Actual Startup Time": 0.012, "Actual Total Time": 0.019, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.004501+00'::timestamp with time zone, '791f3fe8-7c0d-4901-8f0f-e02c44a4c4b9'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 0, "Shared Hit Blocks": 6, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 } ] }, "Planning": { "Shared Hit Blocks": 0, "Shared Read Blocks": 0, "Shared Dirtied Blocks": 0, "Shared Written Blocks": 0, "Local Hit Blocks": 0, "Local Read Blocks": 0, "Local Dirtied Blocks": 0, "Local Written Blocks": 0, "Temp Read Blocks": 0, "Temp Written Blocks": 0 }, "Planning Time": 0.069, "Triggers": [], "Execution Time": 0.039 } }, { "chat_size": 9000, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.040342096999665955, "successful_rps": 2478.800246819793, "p50_ms": 0.3790359996855841, "p95_ms": 0.5729120002797572, "p99_ms": 0.6265740003073006, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 7.46, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.018, "Actual Total Time": 0.024, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 917.26, "Plan Rows": 6642, "Plan Width": 192, "Actual Startup Time": 0.017, "Actual Total Time": 0.021, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = 'ee38cff2-be26-4a0d-97b7-9d4102096aba'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.008101+00'::timestamp with time zone, '932a9b1e-7e13-4a94-8ae0-27127a2b0d14'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.07, "Triggers": [], "Execution Time": 0.046 } }, { "chat_size": 100, "depth": 0.1, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03870596699971429, "successful_rps": 2583.5809760479087, "p50_ms": 0.3660150000541762, "p95_ms": 0.5082419997961551, "p99_ms": 0.6601979998777097, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 9.09, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.014, "Actual Total Time": 0.023, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 14.02, "Plan Rows": 80, "Plan Width": 192, "Actual Startup Time": 0.014, "Actual Total Time": 0.019, "Actual Rows": 51, "Actual Loops": 1, "Index Cond": "((chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000011+00'::timestamp with time zone, 'd92d7f34-94d3-4621-b3ca-fae1968cdee8'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.077, "Triggers": [], "Execution Time": 0.039 } }, { "chat_size": 100, "depth": 0.5, "successful_queries": 100, "errors": 0, "duration_seconds": 0.03887745500060191, "successful_rps": 2572.1848304744167, "p50_ms": 0.34716100026344066, "p95_ms": 0.6183809996400669, "p99_ms": 1.0694019997572468, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 9.09, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.022, "Actual Total Time": 0.03, "Actual Rows": 49, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 14.02, "Plan Rows": 80, "Plan Width": 192, "Actual Startup Time": 0.022, "Actual Total Time": 0.027, "Actual Rows": 49, "Actual Loops": 1, "Index Cond": "((chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000051+00'::timestamp with time zone, 'c9bebfa4-aab4-4e76-8aee-baadc67f5b62'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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.053 } }, { "chat_size": 100, "depth": 0.9, "successful_queries": 100, "errors": 0, "duration_seconds": 0.021500679995824612, "successful_rps": 4651.015689709339, "p50_ms": 0.18678600008570356, "p95_ms": 0.3326729997752409, "p99_ms": 0.3666259999590693, "plan": { "Plan": { "Node Type": "Limit", "Parallel Aware": false, "Async Capable": false, "Startup Cost": 0.42, "Total Cost": 9.18, "Plan Rows": 51, "Plan Width": 192, "Actual Startup Time": 0.013, "Actual Total Time": 0.015, "Actual Rows": 9, "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 Only Scan", "Parent Relationship": "Outer", "Parallel Aware": false, "Async Capable": false, "Scan Direction": "Forward", "Index Name": "research_idx", "Relation Name": "messages", "Alias": "messages", "Startup Cost": 0.42, "Total Cost": 14.0, "Plan Rows": 79, "Plan Width": 192, "Actual Startup Time": 0.013, "Actual Total Time": 0.014, "Actual Rows": 9, "Actual Loops": 1, "Index Cond": "((chat_id = '44747c11-d90a-436f-9ec0-a01325912444'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:00.000091+00'::timestamp with time zone, '08af9a4a-ba92-4773-b90c-48860e4e308a'::uuid)))", "Rows Removed by Index Recheck": 0, "Heap Fetches": 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": 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.069, "Triggers": [], "Execution Time": 0.033 } } ] } ], "query": "SELECT * FROM messages WHERE chat_id=%s AND (created_at,id)>(%s,%s) ORDER BY created_at,id LIMIT 51", "final_count": 100000, "total_research_seconds": 14.285892900021281, "resources": [ { "elapsed_seconds": 1.977, "docker": { "BlockIO": "7.45MB / 70.1MB", "CPUPerc": "92.69%", "Container": "92075e2bbf03ab04a43dccc4b171554af2781687127bd343453182cdcf3fb0ec", "ID": "92075e2bbf03", "MemPerc": "13.54%", "MemUsage": "69.31MiB / 512MiB", "Name": "lyakhonov-lab2-db-1", "NetIO": "46.3kB / 42.8kB", "PIDs": "8" } }, { "elapsed_seconds": 4.988, "docker": { "BlockIO": "7.45MB / 95.5MB", "CPUPerc": "98.84%", "Container": "92075e2bbf03ab04a43dccc4b171554af2781687127bd343453182cdcf3fb0ec", "ID": "92075e2bbf03", "MemPerc": "14.39%", "MemUsage": "73.66MiB / 512MiB", "Name": "lyakhonov-lab2-db-1", "NetIO": "47.7kB / 43.7kB", "PIDs": "8" } }, { "elapsed_seconds": 7.971, "docker": { "BlockIO": "7.45MB / 103MB", "CPUPerc": "93.61%", "Container": "92075e2bbf03ab04a43dccc4b171554af2781687127bd343453182cdcf3fb0ec", "ID": "92075e2bbf03", "MemPerc": "14.79%", "MemUsage": "75.74MiB / 512MiB", "Name": "lyakhonov-lab2-db-1", "NetIO": "95.2kB / 1.9MB", "PIDs": "8" } }, { "elapsed_seconds": 10.965, "docker": { "BlockIO": "7.45MB / 104MB", "CPUPerc": "82.17%", "Container": "92075e2bbf03ab04a43dccc4b171554af2781687127bd343453182cdcf3fb0ec", "ID": "92075e2bbf03", "MemPerc": "16.60%", "MemUsage": "85MiB / 512MiB", "Name": "lyakhonov-lab2-db-1", "NetIO": "433kB / 17.8MB", "PIDs": "9" } }, { "elapsed_seconds": 14.286, "docker": { "BlockIO": "7.45MB / 278MB", "CPUPerc": "16.80%", "Container": "92075e2bbf03ab04a43dccc4b171554af2781687127bd343453182cdcf3fb0ec", "ID": "92075e2bbf03", "MemPerc": "17.34%", "MemUsage": "88.77MiB / 512MiB", "Name": "lyakhonov-lab2-db-1", "NetIO": "1.22MB / 53.2MB", "PIDs": "7" } } ], "postgres_version": "postgres (PostgreSQL) 16.6" }