explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oaZd

Settings
# exclusive inclusive rows x rows loops node
1. 0.586 626,265.426 ↑ 23.5 336 1

Sort (cost=45,114,127.76..45,114,147.51 rows=7,900 width=56) (actual time=626,265.391..626,265.426 rows=336 loops=1)

  • Sort Key: (count(DISTINCT ect.email_address)) DESC
  • Sort Method: quicksort Memory: 66kB
2. 166,824.737 626,264.840 ↑ 23.5 336 1

GroupAggregate (cost=44,155,408.27..45,113,616.32 rows=7,900 width=56) (actual time=433,299.343..626,264.840 rows=336 loops=1)

  • Group Key: ect.event_series_name, ecta.tag_code, ecta.tag_name
3. 285,546.285 459,440.103 ↓ 1.1 85,242,008 1

Sort (cost=44,155,408.27..44,347,034.08 rows=76,650,324 width=72) (actual time=433,299.316..459,440.103 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. 13,924.134 173,893.818 ↓ 1.1 85,242,008 1

Nested Loop (cost=1,891,543.96..28,727,886.88 rows=76,650,324 width=72) (actual time=14,150.385..173,893.818 rows=85,242,008 loops=1)

5. 2,796.223 48,734.324 ↓ 1.2 5,561,768 1

Merge Anti Join (cost=1,891,543.27..3,659,359.38 rows=4,583,977 width=80) (actual time=14,150.350..48,734.324 rows=5,561,768 loops=1)

  • Merge Cond: ((ect.email_address)::text = (e.email_address)::text)
6. 29,134.400 29,134.400 ↑ 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,107.74 rows=5,753,641 width=80) (actual time=0.074..29,134.400 rows=5,747,627 loops=1)

  • Filter: ((market_code)::text = 'MC_MNFG'::text)
  • Rows Removed by Filter: 13,105,870
7. 10,661.525 16,803.701 ↓ 2.5 1,876,490 1

Sort (cost=1,891,542.70..1,893,422.24 rows=751,817 width=23) (actual time=14,150.269..16,803.701 rows=1,876,490 loops=1)

  • Sort Key: e.email_address
  • Sort Method: external merge Disk: 60,192kB
8. 6,142.176 6,142.176 ↓ 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=492.034..6,142.176 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. 111,235.360 111,235.360 ↑ 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.014..0.020 rows=15 loops=5,561,768)

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