explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5EkM

Settings
# exclusive inclusive rows x rows loops node
1. 369.262 24,612.415 ↓ 5.7 112,985 1

Gather (cost=3,514,327.92..3,735,951.79 rows=19,788 width=62) (actual time=24,107.221..24,612.415 rows=112,985 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1,590.191 24,243.153 ↓ 4.6 37,662 3 / 3

Merge Join (cost=3,513,327.92..3,732,915.28 rows=8,245 width=62) (actual time=23,827.954..24,243.153 rows=37,662 loops=3)

  • Merge Cond: (h.c8389_activityid = t1949_emaildistinctactivitydomains.c8293_activityid)
  • Join Filter: (((t1949_emaildistinctactivitydomains.start_stamp > '1558418795069'::bigint) AND (t1949_emaildistinctactivitydomains.start_stamp <= '1558818795069'::bigint) AND (h.start_stamp <= t1949_emaildistinctactivitydomains.start_stamp) AND (h.end_stamp > t1949_emaildistinctactivitydomains.start_stamp)) OR ((h.start_stamp > '1558418795069'::bigint) AND (h.start_stamp <= '1558818795069'::bigint) AND (t1949_emaildistinctactivitydomains.start_stamp <= h.start_stamp) AND (t1949_emaildistinctactivitydomains.end_stamp > h.start_stamp)))
  • Rows Removed by Join Filter: 3,014,259
3. 2,836.201 4,799.345 ↑ 1.3 3,519,868 3 / 3

Sort (cost=1,564,727.16..1,576,464.69 rows=4,695,013 width=33) (actual time=4,324.795..4,799.345 rows=3,519,868 loops=3)

  • Sort Key: h.c8389_activityid
  • Sort Method: external merge Disk: 151,648kB
4. 1,963.144 1,963.144 ↑ 1.3 3,519,868 3 / 3

Parallel Seq Scan on t2014_emaildomainactivityaccounthierarchy h (cost=0.00..787,696.39 rows=4,695,013 width=33) (actual time=0.026..1,963.144 rows=3,519,868 loops=3)

  • Filter: ((c8390_activitydomainsid IS NULL) OR (c8390_activitydomainsid = 12))
  • Rows Removed by Filter: 10,488,546
5. 820.498 17,853.617 ↑ 1.0 9,125,425 3 / 3

Materialize (cost=1,948,598.64..1,994,891.18 rows=9,258,508 width=28) (actual time=15,917.408..17,853.617 rows=9,125,425 loops=3)

6. 14,552.472 17,033.119 ↑ 1.0 9,125,425 3 / 3

Sort (cost=1,948,598.64..1,971,744.91 rows=9,258,508 width=28) (actual time=15,917.402..17,033.119 rows=9,125,425 loops=3)

  • Sort Key: t1949_emaildistinctactivitydomains.c8293_activityid
  • Sort Method: external merge Disk: 343,320kB
7. 2,480.647 2,480.647 ↑ 1.0 9,231,482 3 / 3

Seq Scan on t1949_emaildistinctactivitydomains (cost=0.00..434,243.56 rows=9,258,508 width=28) (actual time=1,009.178..2,480.647 rows=9,231,482 loops=3)

  • Filter: ((NOT deleted) AND (NOT c8294_customdeletedparticipant))
  • Rows Removed by Filter: 10,201,521
Planning time : 1.749 ms
Execution time : 24,689.949 ms