explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 86ny

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

Limit (cost=7,016.28..7,016.30 rows=10 width=286) (actual time=4.158..4.160 rows=10 loops=1)

2. 0.272 4.159 ↑ 32.4 10 1

Sort (cost=7,016.28..7,017.09 rows=324 width=286) (actual time=4.158..4.159 rows=10 loops=1)

  • Sort Key: uipriority.prioritisedscore DESC
  • Sort Method: top-N heapsort Memory: 27kB
3. 0.011 3.887 ↓ 1.9 600 1

Nested Loop (cost=16.86..7,009.27 rows=324 width=286) (actual time=0.200..3.887 rows=600 loops=1)

4. 0.164 3.276 ↓ 1.9 600 1

Hash Join (cost=16.71..6,951.76 rows=324 width=254) (actual time=0.197..3.276 rows=600 loops=1)

  • Hash Cond: (c.parentid = c1.categoryid)
5. 0.165 3.098 ↓ 1.0 600 1

Hash Join (cost=15.06..6,944.67 rows=587 width=212) (actual time=0.176..3.098 rows=600 loops=1)

  • Hash Cond: (insights.categoryid = c.categoryid)
6. 0.427 2.923 ↓ 1.0 600 1

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

7. 0.620 0.696 ↓ 1.0 600 1

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

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

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

  • Index Cond: (userid = 8975)
9. 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())
10. 0.005 0.010 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=16) (actual time=0.010..0.010 rows=29 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
11. 0.005 0.005 ↑ 1.0 29 1

Seq Scan on categories c (cost=0.00..1.29 rows=29 width=16) (actual time=0.001..0.005 rows=29 loops=1)

12. 0.007 0.014 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=50) (actual time=0.014..0.014 rows=29 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
13. 0.007 0.007 ↑ 1.0 29 1

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

14. 0.600 0.600 ↑ 1.0 1 600

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=600)

  • Index Cond: (sourcetypeid = insights.sourcetypeid)