explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xTd1

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.151 ↑ 2.5 4 1

Limit (cost=24.85..24.88 rows=10 width=277) (actual time=0.149..0.151 rows=4 loops=1)

2. 0.009 0.149 ↑ 3.0 4 1

Sort (cost=24.85..24.88 rows=12 width=277) (actual time=0.148..0.149 rows=4 loops=1)

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

Nested Loop (cost=13.23..24.64 rows=12 width=277) (actual time=0.111..0.140 rows=4 loops=1)

4. 0.021 0.127 ↑ 3.0 4 1

Hash Join (cost=13.08..18.77 rows=12 width=325) (actual time=0.104..0.127 rows=4 loops=1)

  • Hash Cond: (uipriority.insightid = insights.insightid)
  • Join Filter: (((uipriority.userid = 3) AND (insights.expirydate >= now()) AND (categories.categoryid = 4)) OR (categories.parentid = 4))
5. 0.016 0.016 ↑ 1.0 103 1

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

6. 0.005 0.090 ↑ 4.5 4 1

Hash (cost=12.86..12.86 rows=18 width=320) (actual time=0.090..0.090 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
7. 0.024 0.085 ↑ 4.5 4 1

Hash Join (cost=2.56..12.86 rows=18 width=320) (actual time=0.039..0.085 rows=4 loops=1)

  • Hash Cond: (insights.categoryid = categories.categoryid)
8. 0.037 0.037 ↑ 1.0 154 1

Seq Scan on insights (cost=0.00..9.54 rows=154 width=176) (actual time=0.003..0.037 rows=154 loops=1)

9. 0.003 0.024 ↓ 1.5 3 1

Hash (cost=2.53..2.53 rows=2 width=152) (actual time=0.024..0.024 rows=3 loops=1)

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

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

  • Hash Cond: (pc.categoryid = categories.parentid)
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.004 0.012 ↓ 1.5 3 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.008 0.008 ↓ 1.5 3 1

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

  • Filter: ((categoryid = 4) OR (parentid = 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.48 rows=1 width=40) (actual time=0.001..0.002 rows=1 loops=4)

  • Index Cond: (sourcetypeid = insights.sourcetypeid)