explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LFOWC

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 2,957.834 ↑ 5.0 1 1

Nested Loop (cost=2,544.35..5,941.71 rows=5 width=548) (actual time=2,793.139..2,957.834 rows=1 loops=1)

2. 0.016 2,957.143 ↑ 5.0 1 1

Nested Loop (cost=2,544.07..5,930.11 rows=5 width=548) (actual time=2,792.449..2,957.143 rows=1 loops=1)

3. 0.572 0.572 ↑ 1.0 1 1

Index Only Scan using physician_form_desc_pkey on section_master sm (cost=0.28..2.31 rows=1 width=4) (actual time=0.566..0.572 rows=1 loops=1)

  • Index Cond: (section_id = 120)
  • Heap Fetches: 0
4. 0.004 2,956.555 ↑ 5.0 1 1

Append (cost=2,543.79..5,927.49 rows=5 width=548) (actual time=2,791.867..2,956.555 rows=1 loops=1)

5. 0.005 2,791.869 ↑ 4.0 1 1

Subquery Scan on *SELECT* 1 (cost=2,543.79..3,377.35 rows=4 width=233) (actual time=2,791.866..2,791.869 rows=1 loops=1)

6. 0.011 2,791.864 ↑ 4.0 1 1

Nested Loop (cost=2,543.79..3,377.21 rows=4 width=177) (actual time=2,791.861..2,791.864 rows=1 loops=1)

  • Join Filter: (psd.section_detail_id = v.section_detail_id)
7. 0.012 2,791.797 ↑ 1.0 1 1

Nested Loop (cost=2,543.22..2,549.32 rows=1 width=80) (actual time=2,791.795..2,791.797 rows=1 loops=1)

8. 2.611 2,791.729 ↑ 1.0 1 1

Bitmap Heap Scan on patient_section_details psd (cost=2,542.65..2,544.68 rows=1 width=63) (actual time=2,791.729..2,791.729 rows=1 loops=1)

  • Recheck Cond: (((mr_no)::text = 'UD0500000330529'::text) AND (section_id = 120))
  • Filter: (section_status = 'A'::bpchar)
  • Rows Removed by Filter: 8
  • Heap Blocks: exact=8
9. 6.477 2,789.118 ↓ 0.0 0 1

BitmapAnd (cost=2,542.65..2,542.65 rows=1 width=0) (actual time=2,789.118..2,789.118 rows=0 loops=1)

10. 2.321 2.321 ↑ 2.5 669 1

Bitmap Index Scan on patient_section_details_mr_no_idx (cost=0.00..33.23 rows=1,688 width=0) (actual time=2.321..2.321 rows=669 loops=1)

  • Index Cond: ((mr_no)::text = 'UD0500000330529'::text)
11. 2,780.320 2,780.320 ↓ 4.5 563,046 1

Bitmap Index Scan on psd_section_id_idx (cost=0.00..2,509.16 rows=125,146 width=0) (actual time=2,780.320..2,780.320 rows=563,046 loops=1)

  • Index Cond: (section_id = 120)
12. 0.056 0.056 ↑ 1.0 1 1

Index Scan using psf_section_detail_id_idx on patient_section_forms psf (cost=0.57..4.61 rows=1 width=17) (actual time=0.055..0.056 rows=1 loops=1)

  • Index Cond: (section_detail_id = psd.section_detail_id)
13. 0.056 0.056 ↑ 7,865.0 1 1

Index Scan using ppfv_form_detail_id on patient_section_values v (cost=0.57..572.27 rows=7,865 width=29) (actual time=0.055..0.056 rows=1 loops=1)

  • Index Cond: (section_detail_id = psf.section_detail_id)
  • Filter: (available = 'Y'::bpchar)
14. 0.006 164.682 ↓ 0.0 0 1

Nested Loop (cost=2,543.65..2,550.12 rows=1 width=145) (actual time=164.682..164.682 rows=0 loops=1)

  • Join Filter: (psd_1.section_detail_id = img.section_detail_id)
15. 0.008 164.665 ↑ 1.0 1 1

Nested Loop (cost=2,543.22..2,549.32 rows=1 width=80) (actual time=164.665..164.665 rows=1 loops=1)

16. 0.031 164.640 ↑ 1.0 1 1

Bitmap Heap Scan on patient_section_details psd_1 (cost=2,542.65..2,544.68 rows=1 width=63) (actual time=164.640..164.640 rows=1 loops=1)

  • Recheck Cond: (((mr_no)::text = 'UD0500000330529'::text) AND (section_id = 120))
  • Filter: (section_status = 'A'::bpchar)
  • Rows Removed by Filter: 8
  • Heap Blocks: exact=8
17. 3.289 164.609 ↓ 0.0 0 1

BitmapAnd (cost=2,542.65..2,542.65 rows=1 width=0) (actual time=164.609..164.609 rows=0 loops=1)

18. 0.066 0.066 ↑ 2.5 669 1

Bitmap Index Scan on patient_section_details_mr_no_idx (cost=0.00..33.23 rows=1,688 width=0) (actual time=0.066..0.066 rows=669 loops=1)

  • Index Cond: ((mr_no)::text = 'UD0500000330529'::text)
19. 161.254 161.254 ↓ 4.5 563,046 1

Bitmap Index Scan on psd_section_id_idx (cost=0.00..2,509.16 rows=125,146 width=0) (actual time=161.254..161.254 rows=563,046 loops=1)

  • Index Cond: (section_id = 120)
20. 0.017 0.017 ↑ 1.0 1 1

Index Scan using psf_section_detail_id_idx on patient_section_forms psf_1 (cost=0.57..4.61 rows=1 width=17) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (section_detail_id = psd_1.section_detail_id)
21. 0.011 0.011 ↓ 0.0 0 1

Index Scan using ppfg_form_detail_id on patient_section_image_details img (cost=0.43..0.63 rows=5 width=29) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (section_detail_id = psf_1.section_detail_id)
  • Filter: (available = 'Y'::bpchar)
22. 0.685 0.685 ↑ 1.0 1 1

Index Only Scan using sfd_field_id_idx on section_field_desc sfd (cost=0.28..2.32 rows=1 width=4) (actual time=0.685..0.685 rows=1 loops=1)

  • Index Cond: (field_id = "*SELECT* 1".field_id)
  • Heap Fetches: 0
Planning time : 3.526 ms
Execution time : 2,958.254 ms