explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5OPEe

Settings
# exclusive inclusive rows x rows loops node
1. 183.613 2,198.553 ↓ 6.9 112,985 1

HashAggregate (cost=723,385.47..723,549.85 rows=16,438 width=62) (actual time=2,162.329..2,198.553 rows=112,985 loops=1)

  • Group Key: h.level, ('1592959635492'::bigint), ('4868882417747070219'::bigint), h.first, (true), (GREATEST(t1949_emaildistinctactivitydomains.start_stamp, h.start_stamp)), (LEAST(t1949_emaildistinctactivitydomains.end_stamp, h.end_stamp)), ('-1'::integer), t1949_emaildistinctactivitydomains.c8292_participantdomainsid, t1949_emaildistinctactivitydomains.sid, h.c8383_activityidroot, h.c8386_accountid, h.c8389_activityid
2. 17.723 2,014.940 ↓ 13.7 225,425 1

Append (cost=1,001.13..722,851.23 rows=16,438 width=62) (actual time=0.441..2,014.940 rows=225,425 loops=1)

3. 39.030 317.054 ↓ 29.7 112,985 1

Gather (cost=1,001.13..128,542.89 rows=3,805 width=62) (actual time=0.441..317.054 rows=112,985 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 48.299 278.024 ↓ 23.8 37,662 3 / 3

Nested Loop (cost=1.13..127,151.29 rows=1,585 width=62) (actual time=0.070..278.024 rows=37,662 loops=3)

5. 58.190 58.190 ↓ 2.7 42,884 3 / 3

Parallel Index Scan using emaildomainactivityaccounthierarchy_manual_index2 on t2014_emaildomainactivityaccounthierarchy h (cost=0.56..6,927.44 rows=15,716 width=33) (actual time=0.046..58.190 rows=42,884 loops=3)

  • Index Cond: ((start_stamp > '1558418795069'::bigint) AND (start_stamp <= '1558818795069'::bigint))
  • Filter: ((c8390_activitydomainsid IS NULL) OR (c8390_activitydomainsid = 12))
  • Rows Removed by Filter: 37,662
6. 171.535 171.535 ↑ 1.0 1 128,651 / 3

Index Scan using t1949_emaildistinctactivitydomains_manual_index2 on t1949_emaildistinctactivitydomains (cost=0.56..7.64 rows=1 width=28) (actual time=0.004..0.004 rows=1 loops=128,651)

  • Index Cond: ((c8293_activityid = h.c8389_activityid) AND (end_stamp > h.start_stamp) AND (start_stamp <= h.start_stamp))
  • Filter: ((NOT deleted) AND (NOT c8294_customdeletedparticipant))
  • Rows Removed by Filter: 1
7. 22.339 1,680.163 ↓ 8.9 112,440 1

Gather (cost=5,697.86..594,143.97 rows=12,633 width=62) (actual time=44.329..1,680.163 rows=112,440 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 13.915 1,657.824 ↓ 7.1 37,480 3 / 3

Nested Loop (cost=4,697.86..591,843.82 rows=5,264 width=62) (actual time=15.572..1,657.824 rows=37,480 loops=3)

9. 15.835 24.457 ↑ 1.2 37,662 3 / 3

Parallel Bitmap Heap Scan on t1949_emaildistinctactivitydomains t1949_emaildistinctactivitydomains_1 (cost=4,697.30..251,255.49 rows=44,196 width=28) (actual time=13.774..24.457 rows=37,662 loops=3)

  • Recheck Cond: ((start_stamp > '1558418795069'::bigint) AND (start_stamp <= '1558818795069'::bigint))
  • Filter: ((NOT deleted) AND (NOT c8294_customdeletedparticipant))
  • Rows Removed by Filter: 40,498
  • Heap Blocks: exact=2,581
10. 8.622 8.622 ↓ 1.1 234,480 1 / 3

Bitmap Index Scan on t1949_emaildistinctactivitydomains_manual_index1 (cost=0.00..4,670.78 rows=222,634 width=0) (actual time=25.866..25.866 rows=234,480 loops=1)

  • Index Cond: ((start_stamp > '1558418795069'::bigint) AND (start_stamp <= '1558818795069'::bigint))
11. 1,619.452 1,619.452 ↑ 1.0 1 112,985 / 3

Index Scan using emaildomainactivityaccounthierarchy_manual_index3 on t2014_emaildomainactivityaccounthierarchy h_1 (cost=0.56..7.70 rows=1 width=33) (actual time=0.041..0.043 rows=1 loops=112,985)

  • Index Cond: ((c8389_activityid = t1949_emaildistinctactivitydomains_1.c8293_activityid) AND (start_stamp <= t1949_emaildistinctactivitydomains_1.start_stamp) AND (end_stamp > t1949_emaildistinctactivitydomains_1.start_stamp))
  • Filter: ((c8390_activitydomainsid IS NULL) OR (c8390_activitydomainsid = 12))
  • Rows Removed by Filter: 2
Planning time : 1.932 ms
Execution time : 2,205.057 ms