explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wBft

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

Limit (cost=229,569.02..229,569.05 rows=10 width=336) (actual time=417.677..417.680 rows=10 loops=1)

2. 0.087 417.676 ↑ 10,328.3 10 1

Sort (cost=229,569.02..229,827.23 rows=103,283 width=336) (actual time=417.675..417.676 rows=10 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 0.057 417.589 ↑ 2,648.3 39 1

Hash Join (cost=22.56..227,337.11 rows=103,283 width=336) (actual time=2.860..417.589 rows=39 loops=1)

  • Hash Cond: (insights.sourcetypeid = st.sourcetypeid)
4. 132.547 417.525 ↑ 2,648.3 39 1

Nested Loop (cost=0.86..225,895.27 rows=103,283 width=304) (actual time=2.830..417.525 rows=39 loops=1)

  • Join Filter: (((uipriority.userid = 8975) AND (insights.expirydate >= now()) AND (categories.categoryid = 82)) OR (categories.parentid = 82))
  • Rows Removed by Join Filter: 198313
5. 43.683 82.803 ↑ 1.0 202,175 1

Nested Loop (cost=0.43..120,457.25 rows=206,897 width=280) (actual time=0.033..82.803 rows=202,175 loops=1)

6. 0.007 0.038 ↑ 2.0 1 1

Nested Loop Left Join (cost=0.00..3.67 rows=2 width=108) (actual time=0.020..0.038 rows=1 loops=1)

  • Join Filter: (pc.categoryid = categories.parentid)
  • Rows Removed by Join Filter: 28
7. 0.013 0.013 ↑ 2.0 1 1

Seq Scan on categories (cost=0.00..1.44 rows=2 width=58) (actual time=0.010..0.013 rows=1 loops=1)

  • Filter: ((categoryid = 82) OR (parentid = 82))
  • Rows Removed by Filter: 28
8. 0.012 0.018 ↑ 1.0 29 1

Materialize (cost=0.00..1.44 rows=29 width=50) (actual time=0.004..0.018 rows=29 loops=1)

9. 0.006 0.006 ↑ 1.0 29 1

Seq Scan on categories pc (cost=0.00..1.29 rows=29 width=50) (actual time=0.001..0.006 rows=29 loops=1)

10. 39.082 39.082 ↑ 2.1 202,175 1

Index Scan using insights_categoryid_idx on insights (cost=0.43..55,941.08 rows=428,571 width=180) (actual time=0.011..39.082 rows=202,175 loops=1)

  • Index Cond: (categoryid = categories.categoryid)
11. 202.175 202.175 ↑ 1.0 1 202,175

Index Scan using userinsightpriority_insightid_idx on userinsightpriority uipriority (cost=0.43..0.49 rows=1 width=48) (actual time=0.001..0.001 rows=1 loops=202,175)

  • Index Cond: (insightid = insights.insightid)
12. 0.005 0.007 ↑ 520.0 1 1

Hash (cost=15.20..15.20 rows=520 width=40) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.002 0.002 ↑ 520.0 1 1

Seq Scan on sourcetypes st (cost=0.00..15.20 rows=520 width=40) (actual time=0.002..0.002 rows=1 loops=1)

Planning time : 1.558 ms