explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BuJZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.569 1,485,979.885 ↓ 4.1 336 1

Sort (cost=3,662,188.07..3,662,188.27 rows=82 width=56) (actual time=1,485,979.849..1,485,979.885 rows=336 loops=1)

  • Sort Key: (count(DISTINCT ect.email_address)) DESC
  • Sort Method: quicksort Memory: 66kB
2. 154,043.062 1,485,979.316 ↓ 4.1 336 1

GroupAggregate (cost=3,662,183.62..3,662,185.46 rows=82 width=56) (actual time=1,308,336.779..1,485,979.316 rows=336 loops=1)

  • Group Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
3. 298,759.223 1,331,936.254 ↓ 1,039,532.1 85,241,636 1

Sort (cost=3,662,183.62..3,662,183.82 rows=82 width=72) (actual time=1,308,336.749..1,331,936.254 rows=85,241,636 loops=1)

  • Sort Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
  • Sort Method: external merge Disk: 6,506,976kB
4. 11,917.097 1,033,177.031 ↓ 1,039,532.1 85,241,636 1

Nested Loop (cost=1,892,475.29..3,662,181.01 rows=82 width=72) (actual time=17,706.831..1,033,177.031 rows=85,241,636 loops=1)

5. 3,164.716 53,517.696 ↓ 5,561,737.0 5,561,737 1

Merge Anti Join (cost=1,892,474.60..3,662,175.54 rows=1 width=80) (actual time=17,700.355..53,517.696 rows=5,561,737 loops=1)

  • Merge Cond: ((ect.email_address)::text = (e.email_address)::text)
6. 29,401.578 29,401.578 ↓ 1.0 5,747,596 1

Index Scan using idx_eloqua_contact_transaction_email_address on eloqua_contact_transaction ect (cost=0.56..1,743,891.68 rows=5,736,869 width=80) (actual time=0.069..29,401.578 rows=5,747,596 loops=1)

  • Filter: ((market_code)::text = 'MC_MNFG'::text)
  • Rows Removed by Filter: 13,104,536
7. 11,077.578 20,951.402 ↓ 2.5 1,876,490 1

Sort (cost=1,892,474.04..1,894,374.43 rows=760,157 width=23) (actual time=17,700.278..20,951.402 rows=1,876,490 loops=1)

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

Seq Scan on eloqua_contact_preference e (cost=0.00..1,809,312.14 rows=760,157 width=23) (actual time=1,373.033..9,873.824 rows=1,876,490 loops=1)

  • Filter: (((email_group)::text = '136'::text) AND ((consent)::text = 'NO'::text))
  • Rows Removed by Filter: 52,258,591
9. 967,742.238 967,742.238 ↑ 10.7 15 5,561,737

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.112..0.174 rows=15 loops=5,561,737)

  • Index Cond: (mdm_person_id = (ect.mdm_person_id)::text)
  • Heap Fetches: 85,241,720
Planning time : 47.255 ms