explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9mVS : Optimization for: Optimization for: Optimization for: plan #GvBa; plan #Beci; plan #1vuY

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Update on discharge d (cost=2,282,468.60..7,987,573.70 rows=1 width=224) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,282,468.60..7,987,573.70 rows=1 width=224) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,282,468.03..7,987,566.11 rows=1 width=241) (actual rows= loops=)

  • Hash Cond: (d.treatment_id = treatment.treatment_id)
4. 0.000 0.000 ↓ 0.0

Seq Scan on discharge d (cost=0.00..1,660,482.82 rows=35,251,882 width=204) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=1,484,598.68..1,484,598.68 rows=37,477,868 width=41) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on treatment (cost=0.00..1,484,598.68 rows=37,477,868 width=41) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using discharge_link_indx on discharge d1 (cost=0.56..7.57 rows=1 width=37) (actual rows= loops=)

  • Index Cond: (((d_state_code)::text = (treatment.cd_state_code)::text) AND ((d_adm_provider_id)::text = (treatment.cd_provider_id)::text) AND ((d_adm_client_id)::text = (treatment.cd_client_id)::text) AND ((d_adm_client_trans_typ)::text = (treatment.cd_client_trans_typ)::text) AND (adm_admission_date = treatment.cd_date_admission) AND (adm_services = treatment.cd_services) AND (adm_co_dep = treatment.cd_co_dep))