explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D82q

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 9,594.360 ↓ 0.0 0 1

Limit (cost=1,001.46..17,938.02 rows=1 width=20) (actual time=9,594.360..9,594.360 rows=0 loops=1)

2. 0.000 9,594.359 ↓ 0.0 0 1

Nested Loop (cost=1,001.46..288,922.92 rows=17 width=20) (actual time=9,594.359..9,594.359 rows=0 loops=1)

  • Join Filter: ((pip.insurance_co)::text = (icm.insurance_co_id)::text)
3. 0.000 9,635.249 ↓ 0.0 0 1

Gather Merge (cost=1,001.46..288,462.25 rows=17 width=28) (actual time=9,594.357..9,635.249 rows=0 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.006 28,756.059 ↓ 0.0 0 3

Nested Loop (cost=1.44..287,460.27 rows=7 width=28) (actual time=9,585.353..9,585.353 rows=0 loops=3)

5. 0.015 28,756.053 ↓ 0.0 0 3

Nested Loop (cost=1.01..287,442.15 rows=7 width=32) (actual time=9,585.351..9,585.351 rows=0 loops=3)

6. 0.018 28,756.038 ↓ 0.0 0 3

Nested Loop (cost=0.72..287,439.88 rows=7 width=36) (actual time=9,585.346..9,585.346 rows=0 loops=3)

7. 28,756.020 28,756.020 ↓ 0.0 0 3

Parallel Index Scan using patient_insurance_plans_priority on patient_insurance_plans pip (cost=0.43..287,409.59 rows=7 width=46) (actual time=9,585.340..9,585.340 rows=0 loops=3)

  • Filter: ((plan_id IS NOT NULL) AND ((patient_id)::text <> 'D08I19090000132'::text) AND ((mr_no)::text = 'UD0800000156878'::text))
  • Rows Removed by Filter: 2224914
8. 0.000 0.000 ↓ 0.0 0

Index Scan using insurance_plan_main_pkey on insurance_plan_main ipm (cost=0.29..4.33 rows=1 width=8) (never executed)

  • Index Cond: (plan_id = pip.plan_id)
9. 0.000 0.000 ↓ 0.0 0

Index Only Scan using insurance_category_master_pkey on insurance_category_master icam (cost=0.29..0.32 rows=1 width=4) (never executed)

  • Index Cond: (category_id = ipm.category_id)
  • Heap Fetches: 0
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using patient_policy_details_patient_policy_id_key on patient_policy_details ppd (cost=0.43..2.59 rows=1 width=4) (never executed)

  • Index Cond: (patient_policy_id = pip.patient_policy_id)
  • Heap Fetches: 0
11. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..37.03 rows=715 width=8) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Seq Scan on insurance_company_master icm (cost=0.00..33.45 rows=715 width=8) (never executed)

Planning time : 5.488 ms
Execution time : 9,635.385 ms