explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eLJZ

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

Limit (cost=31.96..31.99 rows=1 width=242) (actual time=0.100..0.106 rows=10 loops=1)

2. 0.004 0.104 ↓ 10.0 10 1

Unique (cost=31.96..31.99 rows=1 width=242) (actual time=0.099..0.104 rows=10 loops=1)

3. 0.026 0.100 ↓ 10.0 10 1

Sort (cost=31.96..31.97 rows=1 width=242) (actual time=0.099..0.100 rows=10 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC, c1.categoryid, c1.name, c1.displayname, suggestion.suggestionid, suggestion.externalid, suggestion.generateddate, suggestion.expirydate, suggestion.suggestiontext, st.sourcetypeid, st.sourcetypename
  • Sort Method: quicksort Memory: 27kB
4. 0.003 0.074 ↓ 10.0 10 1

Nested Loop (cost=13.12..31.95 rows=1 width=242) (actual time=0.036..0.074 rows=10 loops=1)

5. 0.001 0.061 ↓ 10.0 10 1

Nested Loop (cost=12.97..31.48 rows=1 width=178) (actual time=0.034..0.061 rows=10 loops=1)

6. 0.003 0.050 ↓ 10.0 10 1

Nested Loop (cost=12.83..30.90 rows=1 width=136) (actual time=0.032..0.050 rows=10 loops=1)

7. 0.011 0.037 ↓ 10.0 10 1

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

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

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

  • Filter: (expirydate >= now())
9. 0.004 0.013 ↓ 2.5 10 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.004 0.009 ↓ 2.5 10 1

Bitmap Heap Scan on usersuggestionpriority uipriority (cost=4.18..12.64 rows=4 width=40) (actual time=0.008..0.009 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 c (cost=0.14..0.23 rows=1 width=16) (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 c1 (cost=0.14..0.57 rows=1 width=50) (actual time=0.001..0.001 rows=1 loops=10)

  • Index Cond: (categoryid = c.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)