explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nh3s : Optimization for: 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; plan #VEa0

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 5.270 71.531 ↑ 1.2 4,470 1

Hash Join (cost=5,135.52..25,837.58 rows=5,549 width=156) (actual time=33.980..71.531 rows=4,470 loops=1)

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

Nested Loop (cost=5,134.07..25,628.04 rows=5,549 width=152) (actual time=33.951..66.247 rows=4,470 loops=1)

3. 3.696 57.865 ↑ 1.2 4,470 1

Nested Loop (cost=5,134.07..19,385.42 rows=5,549 width=124) (actual time=33.940..57.865 rows=4,470 loops=1)

4. 1.730 36.289 ↑ 1.2 4,470 1

Merge Right Join (cost=5,134.07..5,193.85 rows=5,549 width=126) (actual time=33.920..36.289 rows=4,470 loops=1)

  • Merge Cond: (o.org_id = g.org_id)
5. 0.035 0.035 ↑ 131.3 3 1

Index Scan using fk_pim_org_code_to_org on pim_org_code o (cost=0.42..12,256.31 rows=394 width=16) (actual time=0.011..0.035 rows=3 loops=1)

  • Filter: (type_id = 7)
  • Rows Removed by Filter: 10
6. 2.670 34.524 ↑ 1.2 4,470 1

Sort (cost=5,133.66..5,147.53 rows=5,549 width=114) (actual time=33.898..34.524 rows=4,470 loops=1)

  • Sort Key: g.org_id
  • Sort Method: quicksort Memory: 1380kB
7. 31.854 31.854 ↑ 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.021..31.854 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
8. 0.000 17.880 ↑ 1.0 1 4,470

Limit (cost=0.00..2.54 rows=1 width=2) (actual time=0.004..0.004 rows=1 loops=4,470)

9. 17.880 17.880 ↑ 1.0 1 4,470

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

  • Filter: (id = g.payment_method_id)
  • Rows Removed by Filter: 30
10. 0.000 4.470 ↑ 1.0 1 4,470

Limit (cost=0.00..1.10 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=4,470)

11. 4.470 4.470 ↑ 1.0 1 4,470

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

  • Filter: (id = g.care_regimen_id)
12. 0.006 0.014 ↑ 1.0 20 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 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.003..0.008 rows=20 loops=1)

Planning time : 0.600 ms
Execution time : 71.879 ms