explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VYvL

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

Limit (cost=23.57..23.60 rows=10 width=13) (actual time=0.174..0.174 rows=4 loops=1)

2. 0.024 0.172 ↑ 3.0 4 1

Sort (cost=23.57..23.60 rows=12 width=13) (actual time=0.172..0.172 rows=4 loops=1)

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

Nested Loop (cost=11.95..23.36 rows=12 width=13) (actual time=0.122..0.148 rows=4 loops=1)

4. 0.035 0.128 ↑ 3.0 4 1

Hash Join (cost=11.80..17.49 rows=12 width=21) (actual time=0.105..0.128 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.004..0.016 rows=103 loops=1)

6. 0.003 0.077 ↑ 4.5 4 1

Hash (cost=11.58..11.58 rows=18 width=40) (actual time=0.077..0.077 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.028 0.074 ↑ 4.5 4 1

Hash Join (cost=1.28..11.58 rows=18 width=40) (actual time=0.031..0.074 rows=4 loops=1)

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

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

9. 0.003 0.013 ↓ 1.5 3 1

Hash (cost=1.25..1.25 rows=2 width=16) (actual time=0.013..0.013 rows=3 loops=1)

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

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

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

Index Only Scan using pk_sourcetypes_sourcetypeid on sourcetypes st (cost=0.15..0.48 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=4)

  • Index Cond: (sourcetypeid = insights.sourcetypeid)
  • Heap Fetches: 4
Planning time : 1.213 ms
Execution time : 0.229 ms