explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7uT4

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.118 ↓ 10.0 10 1

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

2. 0.005 0.117 ↓ 10.0 10 1

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

3. 0.030 0.112 ↓ 10.0 10 1

Sort (cost=31.96..31.97 rows=1 width=292) (actual time=0.111..0.112 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.003 0.082 ↓ 10.0 10 1

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

5. 0.003 0.069 ↓ 10.0 10 1

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

6. 0.005 0.056 ↓ 10.0 10 1

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

7. 0.009 0.041 ↓ 10.0 10 1

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

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

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

  • Filter: (expirydate >= now())
9. 0.007 0.017 ↓ 2.5 10 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.005 0.010 ↓ 2.5 10 1

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

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

Bitmap Index Scan on unique_usersuggestionpriority_userid_suggestionid (cost=0.00..4.18 rows=4 width=0) (actual time=0.005..0.005 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.784 ms