explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tCy1

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 3.289 ↑ 1.0 10 1

Limit (cost=6,965.65..6,965.68 rows=10 width=336) (actual time=3.288..3.289 rows=10 loops=1)

2. 0.031 3.286 ↑ 4.0 10 1

Sort (cost=6,965.65..6,965.75 rows=40 width=336) (actual time=3.286..3.286 rows=10 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 0.002 3.255 ↑ 1.0 39 1

Nested Loop (cost=13.56..6,964.79 rows=40 width=336) (actual time=0.181..3.255 rows=39 loops=1)

4. 0.066 3.214 ↑ 1.0 39 1

Nested Loop (cost=13.41..6,957.69 rows=40 width=304) (actual time=0.178..3.214 rows=39 loops=1)

  • Join Filter: (insights.categoryid = categories.categoryid)
  • Rows Removed by Join Filter: 561
5. 0.003 0.024 ↑ 2.0 1 1

Nested Loop Left Join (cost=0.00..3.67 rows=2 width=100) (actual time=0.013..0.024 rows=1 loops=1)

  • Join Filter: (pc.categoryid = categories.parentid)
  • Rows Removed by Join Filter: 28
6. 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: ((parentid = 82) OR (categoryid = 82))
  • Rows Removed by Filter: 28
7. 0.006 0.013 ↑ 1.0 29 1

Materialize (cost=0.00..1.44 rows=29 width=50) (actual time=0.003..0.013 rows=29 loops=1)

8. 0.007 0.007 ↑ 1.0 29 1

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

9. 0.269 3.124 ↓ 1.0 600 1

Materialize (cost=13.41..6,937.88 rows=587 width=212) (actual time=0.146..3.124 rows=600 loops=1)

10. 0.368 2.855 ↓ 1.0 600 1

Nested Loop (cost=13.41..6,934.94 rows=587 width=212) (actual time=0.146..2.855 rows=600 loops=1)

11. 0.615 0.687 ↓ 1.0 600 1

Bitmap Heap Scan on userinsightpriority uipriority (cost=12.98..2,055.45 rows=587 width=40) (actual time=0.137..0.687 rows=600 loops=1)

  • Recheck Cond: (userid = 8975)
  • Heap Blocks: exact=600
12. 0.072 0.072 ↓ 1.0 600 1

Bitmap Index Scan on userinsightpriority_userid_idx (cost=0.00..12.83 rows=587 width=0) (actual time=0.072..0.072 rows=600 loops=1)

  • Index Cond: (userid = 8975)
13. 1.800 1.800 ↑ 1.0 1 600

Index Scan using pk_insights_insightid on insights (cost=0.43..8.30 rows=1 width=180) (actual time=0.003..0.003 rows=1 loops=600)

  • Index Cond: (insightid = uipriority.insightid)
  • Filter: (expirydate >= now())
14. 0.039 0.039 ↑ 1.0 1 39

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

  • Index Cond: (sourcetypeid = insights.sourcetypeid)
Planning time : 0.677 ms