explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ehe2

Settings
# exclusive inclusive rows x rows loops node
1. 141.860 141.878 ↑ 90,276.7 3 1

Seq Scan on notes (cost=0.00..4,537,728.22 rows=270,830 width=213) (actual time=141.872..141.878 rows=3 loops=1)

  • Filter: ((("entityId" = 33667) AND (("entityType")::text = 'customer'::text)) OR (alternatives: SubPlan 1 or hashed SubPlan 2))
  • Rows Removed by Filter: 541698
2.          

SubPlan (forSeq Scan)

3. 0.000 0.000 ↓ 0.0 0

Index Scan using "noteEntities_noteId" on "noteEntities" (cost=0.28..8.33 rows=1 width=0) (never executed)

  • Index Cond: ("noteId" = notes.id)
  • Filter: (("entityId" = 62242) AND (("entityType")::text = 'user'::text))
4. 0.003 0.018 ↓ 0.0 0 1

Bitmap Heap Scan on "noteEntities" "noteEntities_1" (cost=4.29..9.97 rows=2 width=4) (actual time=0.018..0.018 rows=0 loops=1)

  • Recheck Cond: ("entityId" = 62242)
  • Filter: (("entityType")::text = 'user'::text)
5. 0.015 0.015 ↓ 0.0 0 1

Bitmap Index Scan on "noteEntities_entityId" (cost=0.00..4.29 rows=2 width=0) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: ("entityId" = 62242)
Planning time : 1.108 ms
Execution time : 141.979 ms