explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VEa0 : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: 1; plan #DTLq; plan #j7pc; plan #N5av; plan #R6O; plan #pAxf; plan #27bx

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 30.464 497.793 ↑ 1.2 4,470 1

Hash Join (cost=1.89..136,671.71 rows=5,549 width=118) (actual time=0.183..497.793 rows=4,470 loops=1)

  • Hash Cond: (g.init_goal_id = i.id)
2. 42.666 42.666 ↑ 1.2 4,470 1

Index Scan using fin_bill_generate_bill_id_idx on fin_bill_generate g (cost=0.43..4,788.56 rows=5,549 width=114) (actual time=0.034..42.666 rows=4,470 loops=1)

  • Index Cond: (bill_id = 842)
  • Filter: ((NOT is_sifted) AND ((region_data ->> 'is_tariff_service'::text))::boolean)
  • Rows Removed by Filter: 29552
3. 0.005 0.013 ↑ 1.0 20 1

Hash (cost=1.20..1.20 rows=20 width=8) (actual time=0.013..0.013 rows=20 loops=1)

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

Seq Scan on mc_case_init_goal i (cost=0.00..1.20 rows=20 width=8) (actual time=0.002..0.008 rows=20 loops=1)

5.          

SubPlan (for Hash Join)

6. 8.940 379.950 ↑ 1.0 1 4,470

Bitmap Heap Scan on pim_org_code (cost=16.09..20.10 rows=1 width=12) (actual time=0.085..0.085 rows=1 loops=4,470)

  • Recheck Cond: ((org_id = g.org_id) AND (type_id = 7))
  • Heap Blocks: exact=4470
7. 8.940 371.010 ↓ 0.0 0 4,470

BitmapAnd (cost=16.09..16.09 rows=1 width=0) (actual time=0.083..0.083 rows=0 loops=4,470)

8. 22.350 22.350 ↓ 1.2 7 4,470

Bitmap Index Scan on fk_pim_org_code_to_org (cost=0.00..4.46 rows=6 width=0) (actual time=0.005..0.005 rows=7 loops=4,470)

  • Index Cond: (org_id = g.org_id)
9. 339.720 339.720 ↓ 1.7 688 4,470

Bitmap Index Scan on fkc6856cb3ec5d17fa (cost=0.00..11.37 rows=394 width=0) (actual time=0.076..0.076 rows=688 loops=4,470)

  • Index Cond: (type_id = 7)
10. 31.290 31.290 ↑ 1.0 1 4,470

Seq Scan on mc_payment_method (cost=0.00..2.54 rows=1 width=2) (actual time=0.005..0.007 rows=1 loops=4,470)

  • Filter: (id = g.payment_method_id)
  • Rows Removed by Filter: 42
11. 13.410 13.410 ↑ 1.0 1 4,470

Seq Scan on mc_care_regimen (cost=0.00..1.10 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=4,470)

  • Filter: (id = g.care_regimen_id)
  • Rows Removed by Filter: 7
Planning time : 0.384 ms
Execution time : 498.453 ms