explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qDeO

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 11,098.050 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.00..737,252.69 rows=1 width=926) (actual time=11,098.018..11,098.050 rows=1 loops=1)

2. 0.001 0.098 ↑ 1.0 1 1

Nested Loop (cost=2.58..21.30 rows=1 width=358) (actual time=0.066..0.098 rows=1 loops=1)

3. 0.001 0.093 ↑ 1.5 2 1

Nested Loop (cost=2.15..19.70 rows=3 width=307) (actual time=0.061..0.093 rows=2 loops=1)

  • Join Filter: (e.id = ea2.entity_id)
4. 0.003 0.087 ↑ 1.0 1 1

Nested Loop (cost=1.71..19.14 rows=1 width=315) (actual time=0.058..0.087 rows=1 loops=1)

5. 0.003 0.058 ↑ 1.5 2 1

Nested Loop (cost=1.28..17.54 rows=3 width=264) (actual time=0.052..0.058 rows=2 loops=1)

  • Join Filter: (e.id = ea1.entity_id)
6. 0.003 0.049 ↑ 1.0 1 1

Nested Loop (cost=0.85..16.90 rows=1 width=248) (actual time=0.047..0.049 rows=1 loops=1)

7. 0.041 0.041 ↑ 1.0 1 1

Index Scan using idx_entity_uuid on entity e (cost=0.43..8.45 rows=1 width=180) (actual time=0.040..0.041 rows=1 loops=1)

  • Index Cond: (id_uuid = '5e3a332e-0490-4644-be3e-5e83716283f5'::uuid)
8. 0.005 0.005 ↑ 1.0 1 1

Index Scan using mmt_balance_entity_id on mmt_balance mb (cost=0.43..8.45 rows=1 width=68) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (entity_id = e.id)
9. 0.006 0.006 ↑ 1.5 2 1

Index Only Scan using pk_entity_address on entity_address ea1 (cost=0.43..0.61 rows=3 width=16) (actual time=0.004..0.006 rows=2 loops=1)

  • Index Cond: (entity_id = mb.entity_id)
  • Heap Fetches: 2
10. 0.026 0.026 ↓ 0.0 0 2

Index Scan using pk_address on address a1 (cost=0.43..0.53 rows=1 width=67) (actual time=0.013..0.013 rows=0 loops=2)

  • Index Cond: (id = ea1.address_id)
  • Filter: (address_type_id = 1)
  • Rows Removed by Filter: 0
11. 0.005 0.005 ↑ 1.5 2 1

Index Only Scan using pk_entity_address on entity_address ea2 (cost=0.43..0.52 rows=3 width=16) (actual time=0.002..0.005 rows=2 loops=1)

  • Index Cond: (entity_id = ea1.entity_id)
  • Heap Fetches: 2
12. 0.004 0.004 ↓ 0.0 0 2

Index Scan using pk_address on address a2 (cost=0.43..0.53 rows=1 width=67) (actual time=0.002..0.002 rows=0 loops=2)

  • Index Cond: (id = ea2.address_id)
  • Filter: (address_type_id = 2)
  • Rows Removed by Filter: 0
13. 0.002 0.002 ↓ 0.0 0 1

Index Scan using idx_entity_id on entity emc (cost=0.43..8.45 rows=1 width=50) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (id = e.entity_channel_id)
14.          

SubPlan (forNested Loop Left Join)

15. 0.006 11,097.936 ↑ 1.0 1 1

Aggregate (cost=737,222.93..737,222.94 rows=1 width=32) (actual time=11,097.936..11,097.936 rows=1 loops=1)

16. 0.007 11,097.930 ↓ 0.0 0 1

Hash Join (cost=9,690.91..736,879.85 rows=27,446 width=7) (actual time=11,097.930..11,097.930 rows=0 loops=1)

  • Hash Cond: (m.mmt_movement_type_id = mt.id)
17. 10,573.583 11,097.917 ↓ 0.0 0 1

Bitmap Heap Scan on mmt_movement m (cost=9,689.70..736,568.15 rows=89,200 width=10) (actual time=11,097.917..11,097.917 rows=0 loops=1)

  • Recheck Cond: ((phone)::text = (mb.phone)::text)
  • Rows Removed by Index Recheck: 23574368
  • Filter: ((date_settlement IS NULL) AND (date_to_settlement IS NOT NULL))
  • Rows Removed by Filter: 5053585
  • Heap Blocks: exact=35790 lossy=1776863
18. 524.334 524.334 ↓ 19.0 5,053,585 1

Bitmap Index Scan on idx_mmt_movement_phone (cost=0.00..9,667.40 rows=265,978 width=0) (actual time=524.334..524.334 rows=5,053,585 loops=1)

  • Index Cond: ((phone)::text = (mb.phone)::text)
19. 0.001 0.006 ↑ 1.0 4 1

Hash (cost=1.16..1.16 rows=4 width=5) (actual time=0.006..0.006 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.005 0.005 ↑ 1.0 4 1

Seq Scan on mmt_movement_type mt (cost=0.00..1.16 rows=4 width=5) (actual time=0.003..0.005 rows=4 loops=1)

  • Filter: (financial = 1)
  • Rows Removed by Filter: 9