explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2xWC

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.020 ↑ 1.0 1 1

Sort (cost=33.33..33.34 rows=1 width=186) (actual time=0.020..0.020 rows=1 loops=1)

  • Sort Key: all_comments.id
  • Sort Method: quicksort Memory: 25kB
2.          

CTE all_comments

3. 0.004 0.004 ↑ 1.0 1 1

Index Scan using comments_pkey on comments (cost=0.29..8.31 rows=1 width=90) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = 55557)
4. 0.001 0.016 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.42..25.01 rows=1 width=186) (actual time=0.016..0.016 rows=1 loops=1)

5. 0.001 0.015 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.99..18.43 rows=1 width=177) (actual time=0.014..0.015 rows=1 loops=1)

6. 0.001 0.012 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.71..10.12 rows=1 width=90) (actual time=0.011..0.012 rows=1 loops=1)

7. 0.003 0.011 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.29..8.33 rows=1 width=94) (actual time=0.010..0.011 rows=1 loops=1)

8. 0.005 0.005 ↑ 1.0 1 1

CTE Scan on all_comments (cost=0.00..0.02 rows=1 width=70) (actual time=0.005..0.005 rows=1 loops=1)

9. 0.003 0.003 ↓ 0.0 0 1

Index Scan using index_comment_reactions_comment_id on comment_reactions (cost=0.29..8.30 rows=1 width=24) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (comment_id = all_comments.id)
10. 0.000 0.000 ↓ 0.0 0 1

Index Scan using reactions_pkey on reactions (cost=0.42..1.78 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (id = comment_reactions.reaction_id)
11. 0.002 0.002 ↓ 0.0 0 1

Index Scan using index_comment_mentions_comment_id on comment_mentions (cost=0.28..8.30 rows=1 width=87) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (comment_id = all_comments.id)
12. 0.000 0.000 ↓ 0.0 0 1

Index Scan using index_user_info_account_id on user_info user_mentioned_user_info (cost=0.42..6.58 rows=1 width=17) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (account_id = comment_mentions.mentioned_account_id)
Planning time : 0.327 ms
Execution time : 0.055 ms