{
"captured_at": "2026-09-18T17:22:16.161352569Z",
"diagnostic_only": true,
"queries": {
"go_comments": {
"plan": [
{
"Plan": {
"Node Type": "Sort",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 112.46,
"Total Cost": 112.51,
"Plan Rows": 19,
"Plan Width": 67,
"Actual Startup Time": 0.739,
"Actual Total Time": 0.745,
"Actual Rows": 277,
"Actual Loops": 1,
"Sort Key": [
"c.created_at",
"c.id"
],
"Sort Method": "quicksort",
"Sort Space Used": 50,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 284,
"Shared Read Blocks": 3,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Hash Join",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Join Type": "Inner",
"Startup Cost": 39.07,
"Total Cost": 112.06,
"Plan Rows": 19,
"Plan Width": 67,
"Actual Startup Time": 0.307,
"Actual Total Time": 0.699,
"Actual Rows": 277,
"Actual Loops": 1,
"Inner Unique": true,
"Hash Cond": "(c.author_id = u.id)",
"Shared Hit Blocks": 284,
"Shared Read Blocks": 3,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Bitmap Heap Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Relation Name": "blog_comment",
"Alias": "c",
"Startup Cost": 4.57,
"Total Cost": 77.51,
"Plan Rows": 19,
"Plan Width": 49,
"Actual Startup Time": 0.170,
"Actual Total Time": 0.530,
"Actual Rows": 277,
"Actual Loops": 1,
"Recheck Cond": "(post_id = 1)",
"Rows Removed by Index Recheck": 0,
"Exact Heap Blocks": 269,
"Lossy Heap Blocks": 0,
"Shared Hit Blocks": 272,
"Shared Read Blocks": 3,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Bitmap Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Index Name": "blog_comment_post_id_580e96ef",
"Startup Cost": 0.00,
"Total Cost": 4.57,
"Plan Rows": 19,
"Plan Width": 0,
"Actual Startup Time": 0.145,
"Actual Total Time": 0.145,
"Actual Rows": 277,
"Actual Loops": 1,
"Index Cond": "(post_id = 1)",
"Shared Hit Blocks": 3,
"Shared Read Blocks": 3,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
{
"Node Type": "Hash",
"Parent Relationship": "Inner",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 22.00,
"Total Cost": 22.00,
"Plan Rows": 1000,
"Plan Width": 26,
"Actual Startup Time": 0.131,
"Actual Total Time": 0.132,
"Actual Rows": 1000,
"Actual Loops": 1,
"Hash Buckets": 1024,
"Original Hash Buckets": 1024,
"Hash Batches": 1,
"Original Hash Batches": 1,
"Peak Memory Usage": 66,
"Shared Hit Blocks": 12,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "blog_user",
"Alias": "u",
"Startup Cost": 0.00,
"Total Cost": 22.00,
"Plan Rows": 1000,
"Plan Width": 26,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.050,
"Actual Rows": 1000,
"Actual Loops": 1,
"Shared Hit Blocks": 12,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": 80,
"Shared Read Blocks": 2,
"Shared Dirtied Blocks": 2,
"Shared Written Blocks": 0,
"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.370,
"Triggers": [],
"Execution Time": 0.769
}
],
"sql": "SELECT c.id,c.body,c.created_at,u.id,u.username,u.display_name FROM blog_comment c JOIN blog_user u ON u.id=c.author_id WHERE c.post_id=1 ORDER BY c.created_at,c.id"
},
"go_posts": {
"plan": [
{
"Plan": {
"Node Type": "Sort",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 23547.69,
"Total Cost": 23773.90,
"Plan Rows": 90483,
"Plan Width": 72,
"Actual Startup Time": 61.899,
"Actual Total Time": 67.186,
"Actual Rows": 90101,
"Actual Loops": 1,
"Sort Key": [
"p.created_at DESC",
"p.id"
],
"Sort Method": "external merge",
"Sort Space Used": 7568,
"Sort Space Type": "Disk",
"Shared Hit Blocks": 8468,
"Shared Read Blocks": 2662,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 946,
"Temp Written Blocks": 948,
"Plans": [
{
"Node Type": "Hash Join",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Join Type": "Inner",
"Startup Cost": 34.50,
"Total Cost": 12385.02,
"Plan Rows": 90483,
"Plan Width": 72,
"Actual Startup Time": 0.257,
"Actual Total Time": 40.109,
"Actual Rows": 90101,
"Actual Loops": 1,
"Inner Unique": true,
"Hash Cond": "(p.author_id = u.id)",
"Shared Hit Blocks": 8462,
"Shared Read Blocks": 2662,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "blog_post",
"Alias": "p",
"Startup Cost": 0.00,
"Total Cost": 12112.00,
"Plan Rows": 90483,
"Plan Width": 54,
"Actual Startup Time": 0.044,
"Actual Total Time": 29.981,
"Actual Rows": 90101,
"Actual Loops": 1,
"Filter": "is_published",
"Rows Removed by Filter": 9899,
"Shared Hit Blocks": 8450,
"Shared Read Blocks": 2662,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
{
"Node Type": "Hash",
"Parent Relationship": "Inner",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 22.00,
"Total Cost": 22.00,
"Plan Rows": 1000,
"Plan Width": 26,
"Actual Startup Time": 0.198,
"Actual Total Time": 0.198,
"Actual Rows": 1000,
"Actual Loops": 1,
"Hash Buckets": 1024,
"Original Hash Buckets": 1024,
"Hash Batches": 1,
"Original Hash Batches": 1,
"Peak Memory Usage": 66,
"Shared Hit Blocks": 12,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "blog_user",
"Alias": "u",
"Startup Cost": 0.00,
"Total Cost": 22.00,
"Plan Rows": 1000,
"Plan Width": 26,
"Actual Startup Time": 0.011,
"Actual Total Time": 0.095,
"Actual Rows": 1000,
"Actual Loops": 1,
"Shared Hit Blocks": 12,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": 169,
"Shared Read Blocks": 7,
"Shared Dirtied Blocks": 2,
"Shared Written Blocks": 0,
"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.716,
"Triggers": [],
"Execution Time": 69.118
}
],
"sql": "SELECT p.id,p.title,p.view_count,p.created_at,u.id,u.username,u.display_name FROM blog_post p JOIN blog_user u ON u.id=p.author_id WHERE p.is_published ORDER BY p.created_at DESC,p.id"
},
"go_user": {
"plan": [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 0.28,
"Total Cost": 33.03,
"Plan Rows": 1,
"Plan Width": 65,
"Actual Startup Time": 1.059,
"Actual Total Time": 1.060,
"Actual Rows": 1,
"Actual Loops": 1,
"Shared Hit Blocks": 24,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "blog_user_pkey",
"Relation Name": "blog_user",
"Alias": "u",
"Startup Cost": 0.28,
"Total Cost": 33.03,
"Plan Rows": 1,
"Plan Width": 65,
"Actual Startup Time": 1.059,
"Actual Total Time": 1.059,
"Actual Rows": 1,
"Actual Loops": 1,
"Index Cond": "(id = 1)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 24,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "Aggregate",
"Strategy": "Plain",
"Partial Mode": "Simple",
"Parent Relationship": "SubPlan",
"Subplan Name": "SubPlan 1",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 10.29,
"Total Cost": 10.30,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.176,
"Actual Total Time": 0.176,
"Actual Rows": 1,
"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": "blog_post_author_id_dd7a8485",
"Relation Name": "blog_post",
"Alias": "p",
"Startup Cost": 0.29,
"Total Cost": 10.04,
"Plan Rows": 100,
"Plan Width": 0,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.100,
"Actual Rows": 3112,
"Actual Loops": 1,
"Index Cond": "(author_id = u.id)",
"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
}
]
},
{
"Node Type": "Aggregate",
"Strategy": "Plain",
"Partial Mode": "Simple",
"Parent Relationship": "SubPlan",
"Subplan Name": "SubPlan 2",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 14.42,
"Total Cost": 14.43,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.879,
"Actual Total Time": 0.879,
"Actual Rows": 1,
"Actual Loops": 1,
"Shared Hit Blocks": 16,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "blog_comment_author_id_4f11e2e0",
"Relation Name": "blog_comment",
"Alias": "c",
"Startup Cost": 0.42,
"Total Cost": 13.17,
"Plan Rows": 500,
"Plan Width": 0,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.514,
"Actual Rows": 15394,
"Actual Loops": 1,
"Index Cond": "(author_id = u.id)",
"Rows Removed by Index Recheck": 0,
"Heap Fetches": 0,
"Shared Hit Blocks": 16,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": 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 Time": 0.061,
"Triggers": [],
"Execution Time": 1.071
}
],
"sql": "SELECT u.id,u.username,u.display_name,u.email,u.bio,(SELECT count(*) FROM blog_post p WHERE p.author_id=u.id),(SELECT count(*) FROM blog_comment c WHERE c.author_id=u.id) FROM blog_user u WHERE u.id=1 LIMIT 21"
},
"reference_comment_count": {
"plan": [
{
"Plan": {
"Node Type": "Aggregate",
"Strategy": "Plain",
"Partial Mode": "Simple",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 380.08,
"Total Cost": 380.09,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.865,
"Actual Total Time": 0.865,
"Actual Rows": 1,
"Actual Loops": 1,
"Shared Hit Blocks": 16,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": "blog_comment_author_id_4f11e2e0",
"Relation Name": "blog_comment",
"Alias": "blog_comment",
"Startup Cost": 0.42,
"Total Cost": 341.62,
"Plan Rows": 15383,
"Plan Width": 0,
"Actual Startup Time": 0.006,
"Actual Total Time": 0.493,
"Actual Rows": 15394,
"Actual Loops": 1,
"Index Cond": "(author_id = 1)",
"Rows Removed by Index Recheck": 0,
"Heap Fetches": 0,
"Shared Hit Blocks": 16,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning": {
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.016,
"Triggers": [],
"Execution Time": 0.870
}
],
"sql": "SELECT count(*) FROM blog_comment WHERE author_id=1"
},
"reference_post_count": {
"plan": [
{
"Plan": {
"Node Type": "Aggregate",
"Strategy": "Plain",
"Partial Mode": "Simple",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 83.23,
"Total Cost": 83.24,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.180,
"Actual Total Time": 0.180,
"Actual Rows": 1,
"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": "blog_post_author_id_dd7a8485",
"Relation Name": "blog_post",
"Alias": "blog_post",
"Startup Cost": 0.29,
"Total Cost": 75.37,
"Plan Rows": 3147,
"Plan Width": 0,
"Actual Startup Time": 0.006,
"Actual Total Time": 0.099,
"Actual Rows": 3112,
"Actual Loops": 1,
"Index Cond": "(author_id = 1)",
"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": 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 Time": 0.029,
"Triggers": [],
"Execution Time": 0.192
}
],
"sql": "SELECT count(*) FROM blog_post WHERE author_id=1"
}
},
"rows": {
"users": 1000,
"posts": 100000,
"comments": 500000
}
}