explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4hHF

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

HashAggregate (cost=4,330,275.42..4,331,470.30 rows=95,590 width=22) (actual rows= loops=)

  • Group Key: donation_individual_contributions.donor_id
  • Filter: (sum(CASE WHEN (tmp_zeldin_committees.committee_id IS NOT NULL) THEN donation_individual_contributions.transaction_amount ELSE '0'::double precision END) = '0'::double precision)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=101.25..4,326,929.77 rows=95,590 width=22) (actual rows= loops=)

  • Hash Cond: (donation_individual_contributions.recipient_id = tmp_zeldin_committees.committee_id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=87.45..4,326,555.16 rows=95,590 width=22) (actual rows= loops=)

  • Hash Cond: (donation_individual_contributions.recipient_id = tmp_trump_committees.committee_id)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=20.07..4,295,767.03 rows=95,590 width=18) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=19.50..1,488,877.76 rows=84,473 width=4) (actual rows= loops=)

  • Hash Cond: (donation_people.mappy_zipcode_id = mappy_congressional_districts_zipcodes.zipcode_id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on donation_people (cost=0.00..1,178,016.88 rows=35,428,188 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=18.49..18.49 rows=81 width=4) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using tmp_mappy_congressional_districts_zipcodes on mappy_congressional_districts_zipcodes (cost=0.29..18.49 rows=81 width=4) (actual rows= loops=)

  • Index Cond: (congressional_district_id = 262)
9. 0.000 0.000 ↓ 0.0

Index Scan using index_donation_individual_contributions_on_donor_id on donation_individual_contributions (cost=0.57..33.15 rows=8 width=18) (actual rows= loops=)

  • Index Cond: (donor_id = donation_people.id)
  • Filter: (election_cycle = ANY ('{2018,2020}'::integer[]))
10. 0.000 0.000 ↓ 0.0

Hash (cost=35.50..35.50 rows=2,550 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_trump_committees (cost=0.00..35.50 rows=2,550 width=4) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=7.80..7.80 rows=480 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_zeldin_committees (cost=0.00..7.80 rows=480 width=4) (actual rows= loops=)