explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TpYP

Settings
# exclusive inclusive rows x rows loops node
1. 53.481 1,405.329 ↑ 1.0 1 1

Limit (cost=1,001.46..17,518.40 rows=1 width=20) (actual time=1,351.850..1,405.329 rows=1 loops=1)

2. 0.000 1,351.848 ↑ 17.0 1 1

Nested Loop (cost=1,001.46..281,789.42 rows=17 width=20) (actual time=1,351.848..1,351.848 rows=1 loops=1)

  • Join Filter: ((pip.insurance_co)::text = (icm.insurance_co_id)::text)
  • Rows Removed by Join Filter: 369
3. 0.000 1,405.175 ↑ 17.0 1 1

Gather Merge (cost=1,001.46..281,581.61 rows=17 width=28) (actual time=1,351.701..1,405.175 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.002 4,024.158 ↓ 0.0 0 3

Nested Loop (cost=1.44..280,579.62 rows=7 width=28) (actual time=1,311.167..1,341.386 rows=0 loops=3)

5. 0.003 4,024.119 ↓ 0.0 0 3

Nested Loop (cost=1.01..280,555.47 rows=7 width=32) (actual time=1,311.154..1,341.373 rows=0 loops=3)

6. 0.011 4,024.080 ↓ 0.0 0 3

Nested Loop (cost=0.72..280,553.34 rows=7 width=36) (actual time=1,311.141..1,341.360 rows=0 loops=3)

7. 4,024.029 4,024.029 ↓ 0.0 0 3

Parallel Index Scan using patient_insurance_plans_priority on patient_insurance_plans pip (cost=0.43..280,509.18 rows=7 width=46) (actual time=1,311.125..1,341.343 rows=0 loops=3)

  • Filter: ((plan_id IS NOT NULL) AND ((patient_id)::text <> 'A14O17000000616'::text) AND ((mr_no)::text = 'UA0900000002833'::text))
  • Rows Removed by Filter: 2376559
8. 0.040 0.040 ↑ 1.0 1 1

Index Scan using insurance_plan_main_pkey on insurance_plan_main ipm (cost=0.29..6.31 rows=1 width=8) (actual time=0.040..0.040 rows=1 loops=1)

  • Index Cond: (plan_id = pip.plan_id)
9. 0.036 0.036 ↑ 1.0 1 1

Index Only Scan using insurance_category_master_pkey on insurance_category_master icam (cost=0.29..0.30 rows=1 width=4) (actual time=0.036..0.036 rows=1 loops=1)

  • Index Cond: (category_id = ipm.category_id)
  • Heap Fetches: 0
10. 0.037 0.037 ↑ 1.0 1 1

Index Only Scan using patient_policy_details_patient_policy_id_key on patient_policy_details ppd (cost=0.43..3.45 rows=1 width=4) (actual time=0.037..0.037 rows=1 loops=1)

  • Index Cond: (patient_policy_id = pip.patient_policy_id)
  • Heap Fetches: 0
11. 0.058 0.123 ↑ 2.0 370 1

Materialize (cost=0.00..22.98 rows=732 width=8) (actual time=0.015..0.123 rows=370 loops=1)

12. 0.065 0.065 ↑ 2.0 370 1

Seq Scan on insurance_company_master icm (cost=0.00..19.32 rows=732 width=8) (actual time=0.007..0.065 rows=370 loops=1)

Planning time : 2.797 ms
Execution time : 1,405.525 ms