explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5hY2

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

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

2. 0.006 0.115 ↓ 10.0 10 1

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

3. 0.031 0.109 ↓ 10.0 10 1

Sort (cost=31.96..31.97 rows=1 width=242) (actual time=0.109..0.109 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.001 0.078 ↓ 10.0 10 1

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

5. 0.003 0.067 ↓ 10.0 10 1

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

6. 0.003 0.054 ↓ 10.0 10 1

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

7. 0.012 0.041 ↓ 10.0 10 1

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

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

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

  • Filter: (expirydate >= now())
9. 0.003 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.005 0.009 ↓ 2.5 10 1

Bitmap Heap Scan on usersuggestionpriority uipriority (cost=4.18..12.64 rows=4 width=40) (actual time=0.007..0.009 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 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)
Planning time : 0.736 ms