explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iSsC

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.352 ↑ 1.0 10 1

Limit (cost=50.12..50.15 rows=10 width=85) (actual time=0.349..0.352 rows=10 loops=1)

2. 0.061 0.349 ↑ 10.5 10 1

Sort (cost=50.12..50.38 rows=105 width=85) (actual time=0.348..0.349 rows=10 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 0.123 0.288 ↓ 1.9 195 1

Nested Loop (cost=29.55..47.85 rows=105 width=85) (actual time=0.085..0.288 rows=195 loops=1)

  • Join Filter: (((insights.categoryid = categories.categoryid) AND (categories.categoryid = 4)) OR (categories.parentid = 4))
  • Rows Removed by Join Filter: 96
4. 0.013 0.165 ↑ 1.0 97 1

Hash Join (cost=28.27..41.43 rows=97 width=21) (actual time=0.065..0.165 rows=97 loops=1)

  • Hash Cond: (insights.sourcetypeid = st.sourcetypeid)
5. 0.033 0.149 ↑ 1.0 97 1

Hash Join (cost=6.57..18.40 rows=97 width=29) (actual time=0.057..0.149 rows=97 loops=1)

  • Hash Cond: (insights.insightid = uipriority.insightid)
6. 0.076 0.076 ↓ 1.0 147 1

Seq Scan on insights (cost=0.00..10.31 rows=145 width=24) (actual time=0.010..0.076 rows=147 loops=1)

  • Filter: (expirydate >= now())
  • Rows Removed by Filter: 7
7. 0.017 0.040 ↑ 1.0 103 1

Hash (cost=5.29..5.29 rows=103 width=13) (actual time=0.040..0.040 rows=103 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
8. 0.023 0.023 ↑ 1.0 103 1

Seq Scan on userinsightpriority uipriority (cost=0.00..5.29 rows=103 width=13) (actual time=0.003..0.023 rows=103 loops=1)

  • Filter: (userid = 3)
9. 0.002 0.003 ↑ 260.0 2 1

Hash (cost=15.20..15.20 rows=520 width=8) (actual time=0.003..0.003 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.001 0.001 ↑ 260.0 2 1

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

11. 0.000 0.000 ↓ 1.5 3 97

Materialize (cost=1.28..2.54 rows=2 width=152) (actual time=0.000..0.000 rows=3 loops=97)

12. 0.009 0.021 ↓ 1.5 3 1

Hash Right Join (cost=1.28..2.53 rows=2 width=152) (actual time=0.015..0.021 rows=3 loops=1)

  • Hash Cond: (pc.categoryid = categories.parentid)
13. 0.004 0.004 ↑ 1.0 17 1

Seq Scan on categories pc (cost=0.00..1.17 rows=17 width=72) (actual time=0.001..0.004 rows=17 loops=1)

14. 0.001 0.008 ↓ 1.5 3 1

Hash (cost=1.25..1.25 rows=2 width=80) (actual time=0.008..0.008 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.007 0.007 ↓ 1.5 3 1

Seq Scan on categories (cost=0.00..1.25 rows=2 width=80) (actual time=0.004..0.007 rows=3 loops=1)

  • Filter: ((categoryid = 4) OR (parentid = 4))
  • Rows Removed by Filter: 14
Planning time : 0.677 ms
Execution time : 0.405 ms