explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gBtvw

Settings
# exclusive inclusive rows x rows loops node
1. 0.537 681,747.791 ↓ 4.1 336 1

Sort (cost=3,659,543.87..3,659,544.07 rows=82 width=56) (actual time=681,747.757..681,747.791 rows=336 loops=1)

  • Sort Key: (count(DISTINCT ect.email_address)) DESC
  • Sort Method: quicksort Memory: 66kB
2. 153,864.266 681,747.254 ↓ 4.1 336 1

GroupAggregate (cost=3,659,539.42..3,659,541.26 rows=82 width=56) (actual time=503,503.033..681,747.254 rows=336 loops=1)

  • Group Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
3. 275,387.218 527,882.988 ↓ 1,039,536.7 85,242,008 1

Sort (cost=3,659,539.42..3,659,539.62 rows=82 width=72) (actual time=503,503.000..527,882.988 rows=85,242,008 loops=1)

  • Sort Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
  • Sort Method: external merge Disk: 6,507,000kB
4. 12,774.969 252,495.770 ↓ 1,039,536.7 85,242,008 1

Nested Loop (cost=1,891,543.96..3,659,536.81 rows=82 width=72) (actual time=18,045.416..252,495.770 rows=85,242,008 loops=1)

5. 2,455.735 78,429.529 ↓ 5,561,768.0 5,561,768 1

Merge Anti Join (cost=1,891,543.27..3,659,531.34 rows=1 width=80) (actual time=18,045.378..78,429.529 rows=5,561,768 loops=1)

  • Merge Cond: ((ect.email_address)::text = (e.email_address)::text)
6. 55,594.276 55,594.276 ↓ 1.0 5,747,627 1

Index Scan using idx_eloqua_contact_transaction_email_address on eloqua_contact_transaction ect (cost=0.56..1,744,413.68 rows=5,738,694 width=80) (actual time=0.089..55,594.276 rows=5,747,627 loops=1)

  • Filter: ((market_code)::text = 'MC_MNFG'::text)
  • Rows Removed by Filter: 13,105,870
7. 9,789.578 20,379.518 ↓ 2.5 1,876,490 1

Sort (cost=1,891,542.70..1,893,422.24 rows=751,817 width=23) (actual time=18,045.281..20,379.518 rows=1,876,490 loops=1)

  • Sort Key: e.email_address
  • Sort Method: external merge Disk: 60,192kB
8. 10,589.940 10,589.940 ↓ 2.5 1,876,490 1

Seq Scan on eloqua_contact_preference e (cost=0.00..1,809,353.28 rows=751,817 width=23) (actual time=2,072.734..10,589.940 rows=1,876,490 loops=1)

  • Filter: (((email_group)::text = '136'::text) AND ((consent)::text = 'NO'::text))
  • Rows Removed by Filter: 52,259,062
9. 161,291.272 161,291.272 ↑ 10.7 15 5,561,768

Index Only Scan using idx_eloqua_contact_tag_mdm_tag_code_tag_name on eloqua_contact_tag ecta (cost=0.69..3.86 rows=161 width=66) (actual time=0.020..0.029 rows=15 loops=5,561,768)

  • Index Cond: (mdm_person_id = (ect.mdm_person_id)::text)
  • Heap Fetches: 85,242,008
Planning time : 139.695 ms