explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3GMh

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 180,897.863 ↓ 0.0 0 1

Sort (cost=23,471,082.75..23,596,171.46 rows=50,035,483 width=43) (actual time=180,897.863..180,897.863 rows=0 loops=1)

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

Hash Join (cost=8,721,986.74..15,533,255.55 rows=50,035,483 width=43) (actual time=180,897.846..180,897.846 rows=0 loops=1)

  • Hash Cond: (psf.form_id = fc.id)
3. 57,287.455 180,897.624 ↓ 0.0 0 1

Hash Join (cost=8,721,970.99..15,400,465.69 rows=50,035,483 width=12) (actual time=180,897.624..180,897.624 rows=0 loops=1)

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

Seq Scan on patient_section_forms psf (cost=0.00..4,834,051.00 rows=113,287,887 width=12) (actual time=0.135..40,069.878 rows=114,526,817 loops=1)

  • Filter: ((form_type)::text = 'Form_CONS'::text)
  • Rows Removed by Filter: 140932949
5. 17,776.911 83,540.291 ↓ 1.0 112,995,498 1

Hash (cost=6,870,884.86..6,870,884.86 rows=112,828,090 width=8) (actual time=83,540.291..83,540.291 rows=112,995,498 loops=1)

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

Seq Scan on patient_section_details psd (cost=0.00..6,870,884.86 rows=112,828,090 width=8) (actual time=0.453..65,763.380 rows=112,995,498 loops=1)

  • Filter: (section_item_id = 0)
  • Rows Removed by Filter: 142464263
7. 0.093 0.216 ↓ 1.0 390 1

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

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

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

Planning time : 0.469 ms
Execution time : 180,899.829 ms