explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 63pB

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

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

2. 0.014 0.170 ↑ 1.5 4 1

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

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

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

4. 0.008 0.146 ↑ 1.5 4 1

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

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

Hash Join (cost=12.41..17.93 rows=6 width=253) (actual time=0.109..0.130 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.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)

7. 0.003 0.097 ↑ 2.2 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
8. 0.021 0.094 ↑ 2.2 4 1

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 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
12. 0.001 0.008 ↓ 1.5 3 4

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

13. 0.007 0.007 ↓ 1.5 3 1

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

  • Filter: ((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.846 ms
Execution time : 0.244 ms