explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n0fk

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.161 ↑ 1.5 4 1

Limit (cost=22.50..22.51 rows=6 width=349) (actual time=0.159..0.161 rows=4 loops=1)

2. 0.012 0.159 ↑ 1.5 4 1

Sort (cost=22.50..22.51 rows=6 width=349) (actual time=0.158..0.159 rows=4 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC
  • Sort Method: quicksort Memory: 26kB
3. 0.005 0.147 ↑ 1.5 4 1

Nested Loop (cost=12.56..22.42 rows=6 width=349) (actual time=0.114..0.147 rows=4 loops=1)

4. 0.003 0.138 ↑ 1.5 4 1

Nested Loop Left Join (cost=12.41..19.37 rows=6 width=317) (actual time=0.110..0.138 rows=4 loops=1)

  • Join Filter: (pc.categoryid = categories.parentid)
  • Rows Removed by Join Filter: 9
5. 0.020 0.123 ↑ 1.5 4 1

Hash Join (cost=12.41..17.93 rows=6 width=253) (actual time=0.100..0.123 rows=4 loops=1)

  • Hash Cond: (uipriority.insightid = insights.insightid)
  • Join Filter: (((uipriority.userid = 3) AND (categories.parentid = 4)) OR (categories.categoryid = 4))
6. 0.015 0.015 ↑ 1.0 103 1

Seq Scan on userinsightpriority uipriority (cost=0.00..5.03 rows=103 width=21) (actual time=0.003..0.015 rows=103 loops=1)

7. 0.003 0.088 ↑ 2.2 4 1

Hash (cost=12.30..12.30 rows=9 width=248) (actual time=0.088..0.088 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
8. 0.019 0.085 ↑ 2.2 4 1

Hash Join (cost=1.35..12.30 rows=9 width=248) (actual time=0.022..0.085 rows=4 loops=1)

  • Hash Cond: (insights.categoryid = categories.categoryid)
9. 0.055 0.055 ↓ 1.0 147 1

Seq Scan on insights (cost=0.00..10.31 rows=145 width=176) (actual time=0.007..0.055 rows=147 loops=1)

  • Filter: (expirydate >= now())
  • Rows Removed by Filter: 7
10. 0.002 0.011 ↓ 3.0 3 1

Hash (cost=1.34..1.34 rows=1 width=80) (actual time=0.011..0.011 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.009 0.009 ↓ 3.0 3 1

Seq Scan on categories (cost=0.00..1.34 rows=1 width=80) (actual time=0.005..0.009 rows=3 loops=1)

  • Filter: (((parentid = 4) OR (categoryid = 4)) AND ((parentid = 4) OR (categoryid = 4)))
  • Rows Removed by Filter: 14
12. 0.006 0.012 ↓ 1.5 3 4

Materialize (cost=0.00..1.26 rows=2 width=72) (actual time=0.002..0.003 rows=3 loops=4)

13. 0.006 0.006 ↓ 1.5 3 1

Seq Scan on categories pc (cost=0.00..1.25 rows=2 width=72) (actual time=0.003..0.006 rows=3 loops=1)

  • Filter: ((parentid = 4) OR (categoryid = 4))
  • Rows Removed by Filter: 14
14. 0.004 0.004 ↑ 1.0 1 4

Index Scan using pk_sourcetypes_sourcetypeid on sourcetypes st (cost=0.15..0.50 rows=1 width=40) (actual time=0.001..0.001 rows=1 loops=4)

  • Index Cond: (sourcetypeid = insights.sourcetypeid)
Planning time : 0.776 ms
Execution time : 0.214 ms