explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AyWR

Settings
# exclusive inclusive rows x rows loops node
1. 0.051 180,197.928 ↓ 0.0 0 1

Sort (cost=23,471,105.43..23,596,194.17 rows=50,035,496 width=43) (actual time=180,197.928..180,197.928 rows=0 loops=1)

  • Sort Key: psf.display_order
  • Sort Method: quicksort Memory: 25kB
2. 0.016 180,197.877 ↓ 0.0 0 1

Hash Join (cost=8,722,001.25..15,533,272.97 rows=50,035,496 width=43) (actual time=180,197.877..180,197.877 rows=0 loops=1)

  • Hash Cond: (psf.form_id = fc.id)
3. 55,737.903 180,197.418 ↓ 0.0 0 1

Hash Join (cost=8,721,985.50..15,400,483.08 rows=50,035,496 width=12) (actual time=180,197.418..180,197.418 rows=0 loops=1)

  • Hash Cond: (psf.section_detail_id = psd.section_detail_id)
4. 40,979.790 40,979.790 ↓ 1.0 114,526,848 1

Seq Scan on patient_section_forms psf (cost=0.00..4,834,052.80 rows=113,287,916 width=12) (actual time=0.042..40,979.790 rows=114,526,848 loops=1)

  • Filter: ((form_type)::text = 'Form_CONS'::text)
  • Rows Removed by Filter: 140933003
5. 18,012.902 83,479.725 ↓ 1.0 112,995,552 1

Hash (cost=6,870,896.08..6,870,896.08 rows=112,828,274 width=8) (actual time=83,479.725..83,479.725 rows=112,995,552 loops=1)

  • Buckets: 2097152 Batches: 128 Memory Usage: 50886kB
6. 65,466.823 65,466.823 ↓ 1.0 112,995,552 1

Seq Scan on patient_section_details psd (cost=0.00..6,870,896.08 rows=112,828,274 width=8) (actual time=0.691..65,466.823 rows=112,995,552 loops=1)

  • Filter: (section_item_id = 0)
  • Rows Removed by Filter: 142464294
7. 0.198 0.443 ↓ 1.0 390 1

Hash (cost=10.89..10.89 rows=389 width=35) (actual time=0.443..0.443 rows=390 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
8. 0.245 0.245 ↓ 1.0 390 1

Seq Scan on form_components fc (cost=0.00..10.89 rows=389 width=35) (actual time=0.014..0.245 rows=390 loops=1)

Planning time : 19.302 ms
Execution time : 180,199.799 ms