explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EtF6

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

Limit (cost=24.85..24.88 rows=10 width=85) (actual time=0.172..0.174 rows=4 loops=1)

2. 0.017 0.172 ↑ 3.0 4 1

Sort (cost=24.85..24.88 rows=12 width=85) (actual time=0.171..0.172 rows=4 loops=1)

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

Nested Loop (cost=13.23..24.64 rows=12 width=85) (actual time=0.130..0.155 rows=4 loops=1)

4. 0.023 0.144 ↑ 3.0 4 1

Hash Join (cost=13.08..18.77 rows=12 width=173) (actual time=0.122..0.144 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.014 0.014 ↑ 1.0 103 1

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

6. 0.006 0.107 ↑ 4.5 4 1

Hash (cost=12.86..12.86 rows=18 width=176) (actual time=0.107..0.107 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.022 0.101 ↑ 4.5 4 1

Hash Join (cost=2.56..12.86 rows=18 width=176) (actual time=0.045..0.101 rows=4 loops=1)

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

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

9. 0.004 0.031 ↓ 1.5 3 1

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

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

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

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

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

12. 0.004 0.014 ↓ 1.5 3 1

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

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

Seq Scan on categories (cost=0.00..1.25 rows=2 width=80) (actual time=0.007..0.010 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 Only Scan using pk_sourcetypes_sourcetypeid on sourcetypes st (cost=0.15..0.48 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=4)

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