{
"captured_at": "2026-09-18T17:24:22.605313101Z",
"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.837,
"Actual Total Time": 0.844,
"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": 279,
"Shared Read Blocks": 5,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.258,
"Actual Total Time": 0.796,
"Actual Rows": 277,
"Actual Loops": 1,
"Inner Unique": true,
"Hash Cond": "(c.author_id = u.id)",
"Shared Hit Blocks": 279,
"Shared Read Blocks": 5,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.147,
"Actual Total Time": 0.649,
"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": 267,
"Shared Read Blocks": 5,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.122,
"Actual Total Time": 0.122,
"Actual Rows": 277,
"Actual Loops": 1,
"Index Cond": "(post_id = 1)",
"Shared Hit Blocks": 0,
"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.108,
"Actual Total Time": 0.108,
"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.048,
"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": 33,
"Shared Read Blocks": 2,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.307,
"Triggers": [],
"Execution Time": 0.862
}
],
"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": 23461.09,
"Total Cost": 23685.71,
"Plan Rows": 89847,
"Plan Width": 72,
"Actual Startup Time": 49.245,
"Actual Total Time": 54.681,
"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": 9331,
"Shared Read Blocks": 1799,
"Shared Dirtied Blocks": 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": 12383.35,
"Plan Rows": 89847,
"Plan Width": 72,
"Actual Startup Time": 0.163,
"Actual Total Time": 28.685,
"Actual Rows": 90101,
"Actual Loops": 1,
"Inner Unique": true,
"Hash Cond": "(p.author_id = u.id)",
"Shared Hit Blocks": 9325,
"Shared Read Blocks": 1799,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": 89847,
"Plan Width": 54,
"Actual Startup Time": 0.034,
"Actual Total Time": 19.031,
"Actual Rows": 90101,
"Actual Loops": 1,
"Filter": "is_published",
"Rows Removed by Filter": 9899,
"Shared Hit Blocks": 9313,
"Shared Read Blocks": 1799,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.122,
"Actual Total Time": 0.123,
"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.001,
"Actual Total Time": 0.054,
"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": 68,
"Shared Read Blocks": 5,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.267,
"Triggers": [],
"Execution Time": 56.612
}
],
"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.176,
"Actual Total Time": 1.177,
"Actual Rows": 1,
"Actual Loops": 1,
"Shared Hit Blocks": 22,
"Shared Read Blocks": 2,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.175,
"Actual Total Time": 1.176,
"Actual Rows": 1,
"Actual Loops": 1,
"Index Cond": "(id = 1)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 22,
"Shared Read Blocks": 2,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.201,
"Actual Total Time": 0.201,
"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.012,
"Actual Total Time": 0.119,
"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.936,
"Actual Total Time": 0.936,
"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.012,
"Actual Total Time": 0.553,
"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": 71,
"Shared Read Blocks": 1,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.159,
"Triggers": [],
"Execution Time": 1.215
}
],
"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": 387.76,
"Total Cost": 387.77,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.946,
"Actual Total Time": 0.946,
"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": 348.85,
"Plan Rows": 15567,
"Plan Width": 0,
"Actual Startup Time": 0.017,
"Actual Total Time": 0.550,
"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": 44,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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.952
}
],
"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": 84.09,
"Total Cost": 84.10,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 0.255,
"Actual Total Time": 0.255,
"Actual Rows": 1,
"Actual Loops": 1,
"Shared Hit Blocks": 8,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": 76.12,
"Plan Rows": 3190,
"Plan Width": 0,
"Actual Startup Time": 0.036,
"Actual Total Time": 0.169,
"Actual Rows": 3112,
"Actual Loops": 1,
"Index Cond": "(author_id = 1)",
"Rows Removed by Index Recheck": 0,
"Heap Fetches": 0,
"Shared Hit Blocks": 8,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"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": 47,
"Shared Read Blocks": 3,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.166,
"Triggers": [],
"Execution Time": 0.279
}
],
"sql": "SELECT count(*) FROM blog_post WHERE author_id=1"
}
},
"rows": {
"users": 1000,
"posts": 100000,
"comments": 500000
}
}