explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hATt

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 421.858 ↑ 1.0 10 1

Limit (cost=119,868.94..119,868.97 rows=10 width=286) (actual time=421.856..421.858 rows=10 loops=1)

2. 0.068 421.857 ↑ 5,698.4 10 1

Sort (cost=119,868.94..120,011.40 rows=56,984 width=286) (actual time=421.856..421.857 rows=10 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 0.043 421.789 ↑ 1,461.1 39 1

Hash Join (cost=22.56..118,637.54 rows=56,984 width=286) (actual time=2.699..421.789 rows=39 loops=1)

  • Hash Cond: (insights.sourcetypeid = st.sourcetypeid)
4. 137.944 421.742 ↑ 1,461.1 39 1

Nested Loop (cost=0.86..117,832.31 rows=56,984 width=254) (actual time=2.688..421.742 rows=39 loops=1)

  • Join Filter: (((uipriority.userid = 8975) AND (c.categoryid = 82)) OR (c.parentid = 82))
  • Rows Removed by Join Filter: 198313
5. 42.532 81.623 ↓ 1.8 202,175 1

Nested Loop (cost=0.43..60,230.39 rows=114,150 width=238) (actual time=0.030..81.623 rows=202,175 loops=1)

6. 0.023 0.029 ↑ 1.0 1 1

Nested Loop (cost=0.00..3.60 rows=1 width=66) (actual time=0.016..0.029 rows=1 loops=1)

  • Join Filter: (c.parentid = c1.categoryid)
  • Rows Removed by Join Filter: 28
7. 0.006 0.006 ↑ 1.0 29 1

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

8. 0.000 0.000 ↑ 2.0 1 29

Materialize (cost=0.00..1.45 rows=2 width=16) (actual time=0.000..0.000 rows=1 loops=29)

9. 0.008 0.008 ↑ 2.0 1 1

Seq Scan on categories c (cost=0.00..1.44 rows=2 width=16) (actual time=0.006..0.008 rows=1 loops=1)

  • Filter: ((categoryid = 82) OR (parentid = 82))
  • Rows Removed by Filter: 28
10. 39.062 39.062 ↑ 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.012..39.062 rows=202,175 loops=1)

  • Index Cond: (categoryid = c.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.003 0.004 ↑ 520.0 1 1

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

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

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

Planning time : 0.758 ms