explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qqU1P

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 172.439 ↑ 2.0 2 1

Sort (cost=130,485.20..130,485.21 rows=4 width=426) (actual time=172.438..172.439 rows=2 loops=1)

  • Sort Key: "*SELECT* 1".section_detail_id, "*SELECT* 1".section_id, "*SELECT* 1".field_display_order, "*SELECT* 1".option_display_order
  • Sort Method: quicksort Memory: 25kB
2.          

Initplan (forSort)

3. 0.021 0.021 ↑ 1.0 1 1

Index Scan using pat_dyn_pres_idx on patient_dynamic_section_details (cost=0.43..4.47 rows=1 width=0) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: (prescription_id = 22146140)
  • Filter: (visit_type = 'o'::text)
4. 0.024 172.414 ↑ 2.0 2 1

Result (cost=1,001.27..130,480.69 rows=4 width=426) (actual time=172.395..172.414 rows=2 loops=1)

  • One-Time Filter: $0
5. 0.003 172.390 ↑ 2.0 2 1

Append (cost=1,001.27..130,480.57 rows=4 width=620) (actual time=172.372..172.390 rows=2 loops=1)

6. 0.000 172.385 ↑ 1.5 2 1

Subquery Scan on *SELECT* 1 (cost=1,001.27..130,480.57 rows=3 width=262) (actual time=172.370..172.385 rows=2 loops=1)

7. 20.753 184.376 ↑ 1.5 2 1

Gather (cost=1,001.27..130,480.46 rows=3 width=206) (actual time=172.365..184.376 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 0.002 163.623 ↑ 1.0 1 3

Nested Loop Left Join (cost=1.27..129,480.16 rows=1 width=206) (actual time=163.619..163.623 rows=1 loops=3)

9. 0.000 163.616 ↑ 1.0 1 3

Nested Loop (cost=0.99..129,475.84 rows=1 width=111) (actual time=163.613..163.616 rows=1 loops=3)

10. 0.000 163.598 ↑ 1.0 1 3

Nested Loop (cost=0.71..129,471.52 rows=1 width=77) (actual time=163.596..163.598 rows=1 loops=3)

11. 0.001 163.587 ↑ 1.0 1 3

Nested Loop (cost=0.43..129,471.20 rows=1 width=43) (actual time=163.585..163.587 rows=1 loops=3)

12. 163.572 163.572 ↑ 2.0 1 3

Parallel Seq Scan on patient_dynamic_section_values v (cost=0.00..129,462.26 rows=2 width=37) (actual time=163.572..163.572 rows=1 loops=3)

  • Filter: (prescription_id = 22146140)
  • Rows Removed by Filter: 1807740
13. 0.014 0.014 ↑ 1.0 1 2

Index Scan using patient_dynamic_section_details_pkey on patient_dynamic_section_details psd (cost=0.43..4.47 rows=1 width=10) (actual time=0.014..0.014 rows=1 loops=2)

  • Index Cond: (section_detail_id = v.section_detail_id)
  • Filter: (visit_type = 'o'::text)
14. 0.013 0.013 ↑ 1.0 1 2

Index Scan using physician_form_desc_pkey on section_master sm (cost=0.28..0.32 rows=1 width=38) (actual time=0.013..0.013 rows=1 loops=2)

  • Index Cond: (section_id = psd.section_id)
15. 0.019 0.019 ↑ 1.0 1 2

Index Scan using sfd_field_id_idx on section_field_desc sfd (cost=0.28..4.32 rows=1 width=38) (actual time=0.019..0.019 rows=1 loops=2)

  • Index Cond: (field_id = v.field_id)
16. 0.005 0.005 ↓ 0.0 0 2

Index Scan using sfo_option_id_idx on section_field_options o (cost=0.29..4.32 rows=1 width=23) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (v.option_id = option_id)
17. 0.002 0.002 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=187) (actual time=0.002..0.002 rows=0 loops=1)

  • One-Time Filter: false
Planning time : 3.569 ms
Execution time : 184.736 ms