explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cO6q

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

HashAggregate (cost=52,661,636.98..52,662,036.98 rows=40,000 width=42) (actual rows= loops=)

  • Group Key: hd_1.incident_number, hd_1.doa_vertical
2. 0.000 0.000 ↓ 0.0

Group (cost=48,519,958.41..52,139,212.71 rows=4,446,164 width=80) (actual rows= loops=)

  • Group Key: hd_1.incident_number, hd_1.hd_doa, hd_1.department_of_authority, hd_1.doa_vertical, lk.doa_vertical, hd_1.dispatch_date, lk.support_center_flag
3. 0.000 0.000 ↓ 0.0

Sort (cost=48,519,958.41..48,972,365.20 rows=180,962,715 width=80) (actual rows= loops=)

  • Sort Key: hd_1.incident_number, hd_1.hd_doa, hd_1.department_of_authority, hd_1.doa_vertical, lk.doa_vertical, hd_1.dispatch_date, lk.support_center_flag
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,746.14..14,280,657.26 rows=180,962,715 width=80) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on doa_lookup lk (cost=0.00..71.53 rows=2,353 width=71) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on doa_containment_records hd_1 (cost=1,746.14..5,755.11 rows=31,399 width=86) (actual rows= loops=)

  • Recheck Cond: (((COALESCE(assigned_group, ''::character varying))::text = COALESCE(lk.assigned_group_name, ''::text)) OR ((COALESCE(xm_group_name, ''::character varying))::text = COALESCE(lk.xm_group_name, ''::text)))
  • Filter: (lk.doa_vertical = doa_vertical)
7. 0.000 0.000 ↓ 0.0

BitmapOr (cost=1,746.14..1,746.14 rows=222,308 width=0) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on contain_idx1 (cost=0.00..867.75 rows=111,154 width=0) (actual rows= loops=)

  • Index Cond: ((COALESCE(assigned_group, ''::character varying))::text = COALESCE(lk.assigned_group_name, ''::text))
9. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on contain_idx2 (cost=0.00..862.69 rows=111,154 width=0) (actual rows= loops=)