explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nffl

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 7.783 ↑ 1.2 89 1

Group (cost=7,342.72..7,343.25 rows=107 width=8) (actual time=7.738..7.783 rows=89 loops=1)

  • Group Key: ia.entityid
2. 0.065 7.756 ↓ 2.5 266 1

Sort (cost=7,342.72..7,342.98 rows=107 width=8) (actual time=7.738..7.756 rows=266 loops=1)

  • Sort Key: ia.entityid
  • Sort Method: quicksort Memory: 37kB
3. 0.000 7.691 ↓ 2.5 266 1

Nested Loop (cost=13.96..7,339.11 rows=107 width=8) (actual time=0.575..7.691 rows=266 loops=1)

4. 0.136 4.213 ↓ 2.8 1,163 1

Nested Loop (cost=13.53..7,117.73 rows=422 width=24) (actual time=0.204..4.213 rows=1,163 loops=1)

5. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on entitytypes it (cost=0.00..1.09 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((isdeleted = 0) AND (type = 'customer'::text))
  • Rows Removed by Filter: 4
6. 0.496 4.069 ↓ 2.0 1,163 1

Nested Loop (cost=13.53..7,110.78 rows=586 width=32) (actual time=0.195..4.069 rows=1,163 loops=1)

7. 0.630 0.748 ↑ 1.0 565 1

Bitmap Heap Scan on userinsightpreference uip (cost=12.97..2,075.57 rows=586 width=8) (actual time=0.180..0.748 rows=565 loops=1)

  • Recheck Cond: (userid = 9,046)
  • Filter: (status = 0)
  • Rows Removed by Filter: 35
  • Heap Blocks: exact=566
8. 0.118 0.118 ↓ 1.0 600 1

Bitmap Index Scan on userinsightpreference_userid_idx (cost=0.00..12.82 rows=586 width=0) (actual time=0.118..0.118 rows=600 loops=1)

  • Index Cond: (userid = 9,046)
9. 2.825 2.825 ↓ 2.0 2 565

Index Scan using unique_insightid_entitytype_and_entityid on insightassociations ia (cost=0.56..8.58 rows=1 width=24) (actual time=0.005..0.005 rows=2 loops=565)

  • Index Cond: ((insightid = uip.insightid) AND (entitytypeid = it.entitytypeid))
  • Filter: (isdeleted = 0)
10. 3.489 3.489 ↓ 0.0 0 1,163

Index Scan using pk_insights_insightid on insights i (cost=0.43..0.51 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,163)

  • Index Cond: (insightid = ia.insightid)
  • Filter: ((isdeleted = 0) AND (insighttype = 1) AND (expirydate >= now()))
  • Rows Removed by Filter: 1