explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iqmS

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.251 ↑ 1.0 20 1

Limit (cost=2.72..375.39 rows=20 width=777) (actual time=0.035..0.251 rows=20 loops=1)

2. 0.012 0.248 ↑ 72.7 20 1

Nested Loop Left Join (cost=2.72..27,077.52 rows=1,453 width=777) (actual time=0.034..0.248 rows=20 loops=1)

3. 0.009 0.236 ↑ 72.7 20 1

Nested Loop Left Join (cost=2.43..26,611.00 rows=1,453 width=674) (actual time=0.033..0.236 rows=20 loops=1)

4. 0.005 0.227 ↑ 72.7 20 1

Nested Loop Left Join (cost=2.00..16,241.52 rows=1,453 width=623) (actual time=0.032..0.227 rows=20 loops=1)

5. 0.010 0.182 ↑ 72.7 20 1

Nested Loop Left Join (cost=1.71..15,743.09 rows=1,453 width=520) (actual time=0.030..0.182 rows=20 loops=1)

6. 0.009 0.112 ↑ 72.7 20 1

Nested Loop Left Join (cost=1.29..8,472.51 rows=1,453 width=290) (actual time=0.025..0.112 rows=20 loops=1)

7. 0.013 0.103 ↑ 72.7 20 1

Nested Loop Left Join (cost=1.00..7,904.81 rows=1,453 width=187) (actual time=0.023..0.103 rows=20 loops=1)

8. 0.014 0.090 ↑ 72.7 20 1

Nested Loop (cost=0.71..5,999.48 rows=1,453 width=167) (actual time=0.022..0.090 rows=20 loops=1)

9. 0.036 0.036 ↑ 72.7 20 1

Index Scan Backward using herald_activity_timestamp_574bae7d on herald_activity (cost=0.42..2,654.15 rows=1,453 width=64) (actual time=0.016..0.036 rows=20 loops=1)

  • Index Cond: (("timestamp" >= '2019-10-05 11:31:38.21815+00'::timestamp with time zone) AND ("timestamp" <= '2019-11-04 11:31:38.21815+00'::timestamp with time zone))
  • Filter: active
10. 0.040 0.040 ↑ 1.0 1 20

Index Scan using herald_user_pkey on herald_user (cost=0.29..2.29 rows=1 width=103) (actual time=0.002..0.002 rows=1 loops=20)

  • Index Cond: (id = herald_activity.actor_id)
11. 0.000 0.000 ↓ 0.0 0 20

Index Scan using herald_relation_pkey on herald_relation (cost=0.29..1.30 rows=1 width=20) (actual time=0.000..0.000 rows=0 loops=20)

  • Index Cond: (herald_activity.relation_id = id)
12. 0.000 0.000 ↓ 0.0 0 20

Index Scan using herald_user_pkey on herald_user t4 (cost=0.29..0.38 rows=1 width=103) (actual time=0.000..0.000 rows=0 loops=20)

  • Index Cond: (herald_relation.followed_id = id)
13. 0.060 0.060 ↑ 1.0 1 20

Index Scan using herald_article_pkey on herald_article (cost=0.42..4.99 rows=1 width=230) (actual time=0.003..0.003 rows=1 loops=20)

  • Index Cond: (herald_activity.article_id = id)
14. 0.040 0.040 ↑ 1.0 1 20

Index Scan using herald_user_pkey on herald_user t6 (cost=0.29..0.33 rows=1 width=103) (actual time=0.001..0.002 rows=1 loops=20)

  • Index Cond: (herald_article.user_id = id)
15. 0.000 0.000 ↓ 0.0 0 20

Index Scan using herald_comment_pkey on herald_comment (cost=0.42..7.13 rows=1 width=51) (actual time=0.000..0.000 rows=0 loops=20)

  • Index Cond: (herald_activity.comment_id = id)
16. 0.000 0.000 ↓ 0.0 0 20

Index Scan using herald_user_pkey on herald_user t8 (cost=0.29..0.31 rows=1 width=103) (actual time=0.000..0.000 rows=0 loops=20)

  • Index Cond: (herald_comment.user_id = id)
Planning time : 7.273 ms
Execution time : 0.548 ms