explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S8Up

Settings
# exclusive inclusive rows x rows loops node
1. 0.557 1,819,855.672 ↑ 23.4 336 1

Sort (cost=42,954,712.00..42,954,731.62 rows=7,850 width=56) (actual time=1,819,855.637..1,819,855.672 rows=336 loops=1)

  • Sort Key: (count(DISTINCT ect.email_address)) DESC
  • Sort Method: quicksort Memory: 66kB
2. 177,756.018 1,819,855.115 ↑ 23.4 336 1

GroupAggregate (cost=42,111,935.64..42,954,204.16 rows=7,850 width=56) (actual time=1,613,316.499..1,819,855.115 rows=336 loops=1)

  • Group Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
3. 297,569.429 1,642,099.097 ↓ 1.3 85,242,110 1

Sort (cost=42,111,935.64..42,280,373.64 rows=67,375,202 width=72) (actual time=1,613,316.474..1,642,099.097 rows=85,242,110 loops=1)

  • Sort Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
  • Sort Method: external merge Disk: 6,506,984kB
4. 18,045.681 1,344,529.668 ↓ 1.3 85,242,110 1

Nested Loop (cost=1,891,543.96..28,613,910.35 rows=67,375,202 width=72) (actual time=25,128.141..1,344,529.668 rows=85,242,110 loops=1)

5. 3,551.055 225,250.953 ↓ 1.2 5,561,783 1

Merge Anti Join (cost=1,891,543.27..3,659,398.95 rows=4,586,446 width=80) (actual time=25,123.748..225,250.953 rows=5,561,783 loops=1)

  • Merge Cond: ((ect.email_address)::text = (e.email_address)::text)
6. 193,312.716 193,312.716 ↑ 1.0 5,747,642 1

Index Scan using idx_eloqua_contact_transaction_email_address on eloqua_contact_transaction ect (cost=0.56..1,744,122.77 rows=5,758,614 width=80) (actual time=0.068..193,312.716 rows=5,747,642 loops=1)

  • Filter: ((market_code)::text = 'MC_MNFG'::text)
  • Rows Removed by Filter: 13,106,009
7. 11,323.918 28,387.182 ↓ 2.5 1,876,490 1

Sort (cost=1,891,542.70..1,893,422.24 rows=751,817 width=23) (actual time=25,123.673..28,387.182 rows=1,876,490 loops=1)

  • Sort Key: e.email_address
  • Sort Method: external merge Disk: 60,192kB
8. 17,063.264 17,063.264 ↓ 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=1,212.320..17,063.264 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. 1,101,233.034 1,101,233.034 ↑ 10.7 15 5,561,783

Index Only Scan using idx_eloqua_contact_tag_mdm_tag_code_tag_name on eloqua_contact_tag ecta (cost=0.69..3.84 rows=160 width=66) (actual time=0.129..0.198 rows=15 loops=5,561,783)

  • Index Cond: (mdm_person_id = (ect.mdm_person_id)::text)
  • Heap Fetches: 85,242,195
Planning time : 4,009.409 ms