explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HPn8

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.164 ↑ 1.5 4 1

Limit (cost=22.32..22.34 rows=6 width=277) (actual time=0.163..0.164 rows=4 loops=1)

2. 0.015 0.163 ↑ 1.5 4 1

Sort (cost=22.32..22.34 rows=6 width=277) (actual time=0.162..0.163 rows=4 loops=1)

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

Nested Loop (cost=13.82..22.24 rows=6 width=277) (actual time=0.121..0.148 rows=4 loops=1)

4. 0.020 0.136 ↑ 1.5 4 1

Hash Join (cost=13.67..19.19 rows=6 width=325) (actual time=0.114..0.136 rows=4 loops=1)

  • Hash Cond: (uipriority.insightid = insights.insightid)
  • Join Filter: (((uipriority.userid = 3) AND (categories.parentid = 4)) OR (categories.categoryid = 4))
5. 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.005..0.015 rows=103 loops=1)

6. 0.004 0.101 ↑ 2.2 4 1

Hash (cost=13.56..13.56 rows=9 width=320) (actual time=0.101..0.101 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
7. 0.015 0.097 ↑ 2.2 4 1

Hash Join (cost=2.61..13.56 rows=9 width=320) (actual time=0.036..0.097 rows=4 loops=1)

  • Hash Cond: (insights.categoryid = categories.categoryid)
8. 0.057 0.057 ↓ 1.0 147 1

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

  • Filter: (expirydate >= now())
  • Rows Removed by Filter: 7
9. 0.001 0.025 ↓ 3.0 3 1

Hash (cost=2.60..2.60 rows=1 width=152) (actual time=0.025..0.025 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.010 0.024 ↓ 3.0 3 1

Hash Right Join (cost=1.35..2.60 rows=1 width=152) (actual time=0.017..0.024 rows=3 loops=1)

  • Hash Cond: (pc.categoryid = categories.parentid)
  • Join Filter: ((categories.parentid = 4) OR (categories.categoryid = 4))
11. 0.002 0.002 ↑ 1.0 17 1

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

12. 0.002 0.012 ↓ 3.0 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.010 0.010 ↓ 3.0 3 1

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

  • Filter: (((parentid = 4) OR (categoryid = 4)) AND ((parentid = 4) OR (categoryid = 4)))
  • Rows Removed by Filter: 14
14. 0.008 0.008 ↑ 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.002 rows=1 loops=4)

  • Index Cond: (sourcetypeid = insights.sourcetypeid)
Planning time : 0.815 ms
Execution time : 0.229 ms