explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R6O : Optimization for: Optimization for: Optimization for: 1; plan #DTLq; plan #j7pc; plan #N5av

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 10.097 424.576 ↑ 1.2 4,470 1

Nested Loop (cost=16.66..137,930.79 rows=5,549 width=156) (actual time=0.142..424.576 rows=4,470 loops=1)

2. 1.553 405.539 ↑ 1.2 4,470 1

Nested Loop (cost=16.52..136,871.41 rows=5,549 width=152) (actual time=0.134..405.539 rows=4,470 loops=1)

3. 2.060 386.106 ↑ 1.2 4,470 1

Nested Loop (cost=16.52..130,628.79 rows=5,549 width=124) (actual time=0.129..386.106 rows=4,470 loops=1)

4. 2.857 357.226 ↑ 1.2 4,470 1

Nested Loop (cost=16.52..116,437.22 rows=5,549 width=126) (actual time=0.117..357.226 rows=4,470 loops=1)

5. 36.999 36.999 ↑ 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..36.999 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
6. 4.470 317.370 ↑ 1.0 1 4,470

Limit (cost=16.09..20.10 rows=1 width=12) (actual time=0.071..0.071 rows=1 loops=4,470)

7. 8.940 312.900 ↑ 1.0 1 4,470

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

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

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

9. 17.880 17.880 ↓ 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.004..0.004 rows=7 loops=4,470)

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

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

  • Index Cond: (type_id = 7)
11. 4.470 26.820 ↑ 1.0 1 4,470

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

12. 22.350 22.350 ↑ 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.005 rows=1 loops=4,470)

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

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

14. 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)
15. 8.940 8.940 ↑ 1.0 1 4,470

Index Scan using mc_case_init_goal_pk on mc_case_init_goal i (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=4,470)

  • Index Cond: (id = g.init_goal_id)
Planning time : 0.529 ms
Execution time : 425.217 ms