explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BhJJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.107 ↓ 10.0 10 1

Limit (cost=31.96..32.00 rows=1 width=292) (actual time=0.102..0.107 rows=10 loops=1)

2. 0.002 0.105 ↓ 10.0 10 1

Unique (cost=31.96..32.00 rows=1 width=292) (actual time=0.102..0.105 rows=10 loops=1)

3. 0.030 0.103 ↓ 10.0 10 1

Sort (cost=31.96..31.97 rows=1 width=292) (actual time=0.102..0.103 rows=10 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: 27kB
4. 0.002 0.073 ↓ 10.0 10 1

Nested Loop (cost=13.12..31.95 rows=1 width=292) (actual time=0.035..0.073 rows=10 loops=1)

5. 0.004 0.061 ↓ 10.0 10 1

Nested Loop Left Join (cost=12.97..31.48 rows=1 width=228) (actual time=0.032..0.061 rows=10 loops=1)

6. 0.004 0.047 ↓ 10.0 10 1

Nested Loop (cost=12.83..30.90 rows=1 width=186) (actual time=0.030..0.047 rows=10 loops=1)

7. 0.009 0.033 ↓ 10.0 10 1

Hash Join (cost=12.69..30.66 rows=1 width=136) (actual time=0.027..0.033 rows=10 loops=1)

  • Hash Cond: (suggestion.suggestionid = uipriority.suggestionid)
8. 0.012 0.012 ↑ 16.3 10 1

Seq Scan on suggestion (cost=0.00..17.35 rows=163 width=104) (actual time=0.008..0.012 rows=10 loops=1)

  • Filter: (expirydate >= now())
9. 0.005 0.012 ↓ 2.5 10 1

Hash (cost=12.64..12.64 rows=4 width=40) (actual time=0.012..0.012 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.003 0.007 ↓ 2.5 10 1

Bitmap Heap Scan on usersuggestionpriority uipriority (cost=4.18..12.64 rows=4 width=40) (actual time=0.007..0.007 rows=10 loops=1)

  • Recheck Cond: (userid = 5044)
  • Heap Blocks: exact=1
11. 0.004 0.004 ↓ 2.5 10 1

Bitmap Index Scan on unique_usersuggestionpriority_userid_suggestionid (cost=0.00..4.18 rows=4 width=0) (actual time=0.004..0.004 rows=10 loops=1)

  • Index Cond: (userid = 5044)
12. 0.010 0.010 ↑ 1.0 1 10

Index Scan using pk_categories_categoryid on categories (cost=0.14..0.23 rows=1 width=58) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (categoryid = suggestion.categoryid)
13. 0.010 0.010 ↑ 1.0 1 10

Index Scan using pk_categories_categoryid on categories pc (cost=0.14..0.57 rows=1 width=50) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (categoryid = categories.parentid)
14. 0.010 0.010 ↑ 1.0 1 10

Index Scan using pk_sourcetypes_sourcetypeid on sourcetypes st (cost=0.15..0.46 rows=1 width=40) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (sourcetypeid = suggestion.sourcetypeid)
Planning time : 0.693 ms