explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nKMW

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 4.123 ↑ 1.0 10 1

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

2. 0.268 4.123 ↑ 32.4 10 1

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

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

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

4. 0.170 3.217 ↓ 1.9 600 1

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

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

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

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

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

7. 0.624 0.697 ↓ 1.0 600 1

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

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

Bitmap Index Scan on userinsightpriority_userid_idx (cost=0.00..12.83 rows=587 width=0) (actual time=0.073..0.073 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.004 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.006 0.006 ↑ 1.0 29 1

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

12. 0.010 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.004 0.004 ↑ 1.0 29 1

Seq Scan on categories c1 (cost=0.00..1.29 rows=29 width=50) (actual time=0.003..0.004 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)