explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S5e

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 3.460 ↑ 1.0 10 1

Limit (cost=6,962.72..6,962.74 rows=10 width=336) (actual time=3.458..3.460 rows=10 loops=1)

2. 0.035 3.459 ↑ 4.0 10 1

Sort (cost=6,962.72..6,962.82 rows=40 width=336) (actual time=3.458..3.459 rows=10 loops=1)

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

Nested Loop (cost=13.56..6,961.85 rows=40 width=336) (actual time=0.188..3.424 rows=39 loops=1)

4. 0.070 3.375 ↑ 1.0 39 1

Nested Loop (cost=13.41..6,954.75 rows=40 width=304) (actual time=0.185..3.375 rows=39 loops=1)

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

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

  • Join Filter: (pc.categoryid = categories.parentid)
  • Rows Removed by Join Filter: 28
6. 0.010 0.010 ↑ 2.0 1 1

Seq Scan on categories (cost=0.00..1.44 rows=2 width=58) (actual time=0.008..0.010 rows=1 loops=1)

  • Filter: ((parentid = 82) OR (categoryid = 82))
  • Rows Removed by Filter: 28
7. 0.007 0.011 ↑ 1.0 29 1

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

8. 0.004 0.004 ↑ 1.0 29 1

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

9. 0.257 3.277 ↓ 1.0 600 1

Materialize (cost=13.41..6,934.94 rows=587 width=212) (actual time=0.152..3.277 rows=600 loops=1)

10. 0.489 3.020 ↓ 1.0 600 1

Nested Loop (cost=13.41..6,932.01 rows=587 width=212) (actual time=0.149..3.020 rows=600 loops=1)

11. 0.654 0.731 ↓ 1.0 600 1

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

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

Bitmap Index Scan on userinsightpriority_userid_idx (cost=0.00..12.83 rows=587 width=0) (actual time=0.077..0.077 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)
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)