explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MfPN

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.060 ↓ 0.0 0 1

Limit (cost=41.36..41.74 rows=10 width=292) (actual time=0.060..0.060 rows=0 loops=1)

2. 0.000 0.059 ↓ 0.0 0 1

Unique (cost=41.36..42.34 rows=26 width=292) (actual time=0.059..0.059 rows=0 loops=1)

3. 0.017 0.059 ↓ 0.0 0 1

Sort (cost=41.36..41.43 rows=26 width=292) (actual time=0.059..0.059 rows=0 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC, categories.categoryid, categories.name, categories.displayname, pc.categoryid, pc.name, pc.displayname, suggestion.suggestionid, suggestion.externalid, suggestion.generateddate, suggestion.expirydate, suggestion.suggestiontext, st.sourcetypeid, st.sourcetypename
  • Sort Method: quicksort Memory: 25kB
4. 0.001 0.042 ↓ 0.0 0 1

Nested Loop (cost=3.23..40.75 rows=26 width=292) (actual time=0.042..0.042 rows=0 loops=1)

5. 0.001 0.041 ↓ 0.0 0 1

Nested Loop (cost=3.08..33.59 rows=26 width=228) (actual time=0.041..0.041 rows=0 loops=1)

  • Join Filter: (((uipriority.userid = 5044) AND (suggestion.expirydate >= now()) AND (categories.categoryid = 82)) OR (categories.parentid = 82))
6. 0.003 0.040 ↓ 0.0 0 1

Hash Join (cost=2.93..19.72 rows=34 width=204) (actual time=0.040..0.040 rows=0 loops=1)

  • Hash Cond: (suggestion.categoryid = categories.categoryid)
7. 0.006 0.006 ↑ 49.0 10 1

Seq Scan on suggestion (cost=0.00..14.90 rows=490 width=104) (actual time=0.004..0.006 rows=10 loops=1)

8. 0.003 0.031 ↑ 2.0 1 1

Hash (cost=2.91..2.91 rows=2 width=108) (actual time=0.031..0.031 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.014 0.028 ↑ 2.0 1 1

Hash Right Join (cost=1.46..2.91 rows=2 width=108) (actual time=0.022..0.028 rows=1 loops=1)

  • Hash Cond: (pc.categoryid = categories.parentid)
10. 0.002 0.002 ↑ 1.0 29 1

Seq Scan on categories pc (cost=0.00..1.29 rows=29 width=50) (actual time=0.001..0.002 rows=29 loops=1)

11. 0.004 0.012 ↑ 2.0 1 1

Hash (cost=1.44..1.44 rows=2 width=58) (actual time=0.012..0.012 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.008 0.008 ↑ 2.0 1 1

Seq Scan on categories (cost=0.00..1.44 rows=2 width=58) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((categoryid = 82) OR (parentid = 82))
  • Rows Removed by Filter: 28
13. 0.000 0.000 ↓ 0.0 0

Index Scan using usersuggestionpriority_suggestionid_idx on usersuggestionpriority uipriority (cost=0.15..0.32 rows=4 width=48) (never executed)

  • Index Cond: (suggestionid = suggestion.suggestionid)
14. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_sourcetypes_sourcetypeid on sourcetypes st (cost=0.15..0.27 rows=1 width=40) (never executed)

  • Index Cond: (sourcetypeid = suggestion.sourcetypeid)