explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fjMG

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 33.012 20,702.397 ↓ 2.9 52,799 1

Nested Loop Left Join (cost=2.35..7,726.50 rows=18,517 width=500) (actual time=18.656..20,702.397 rows=52,799 loops=1)

2. 10.190 552.966 ↓ 2.9 52,799 1

Nested Loop (cost=2.35..899.75 rows=18,517 width=168) (actual time=18.573..552.966 rows=52,799 loops=1)

3. 0.006 0.072 ↓ 2.0 2 1

HashAggregate (cost=2.35..2.36 rows=1 width=8) (actual time=0.069..0.072 rows=2 loops=1)

4. 0.003 0.066 ↓ 2.0 2 1

Nested Loop (cost=0.00..2.34 rows=1 width=8) (actual time=0.046..0.066 rows=2 loops=1)

5. 0.021 0.021 ↓ 2.0 2 1

Seq Scan on module module2_ (cost=0.00..1.46 rows=1 width=8) (actual time=0.020..0.021 rows=2 loops=1)

  • Filter: (active AND ((module)::text = 'DMP'::text))
  • Rows Removed by Filter: 99
6. 0.042 0.042 ↑ 1.0 1 2

Index Scan using provider_laboratory_id on provider provider3_ (cost=0.00..0.87 rows=1 width=16) (actual time=0.021..0.021 rows=1 loops=2)

  • Index Cond: (laboratory_id = module2_.laboratory_id)
7. 542.704 542.704 ↓ 1.4 26,400 2

Index Scan using idx_provider_link_provider_id on provider_link providerli0_ (cost=0.00..712.22 rows=18,517 width=168) (actual time=9.269..271.352 rows=26,400 loops=2)

  • Index Cond: (provider_id = provider3_.id)
  • Filter: (dmp_enabled AND ((link_state)::text = 'ACTIVE'::text) AND ((link_type)::text = 'PATIENT'::text))
  • Rows Removed by Filter: 11728
8. 20,116.419 20,116.419 ↑ 1.0 1 52,799

Index Scan using activation_code_pkey on activation_code activation1_ (cost=0.00..0.36 rows=1 width=332) (actual time=0.381..0.381 rows=1 loops=52,799)

  • Index Cond: (providerli0_.activation_code_id = id)
Total runtime : 20,707.043 ms