explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OgB7

Settings
# exclusive inclusive rows x rows loops node
1. 202.008 7,132.770 ↓ 6.9 112,985 1

HashAggregate (cost=1,413,614.73..1,413,778.01 rows=16,328 width=62) (actual time=7,089.081..7,132.770 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. 18.278 6,930.762 ↓ 13.8 225,425 1

Append (cost=614,557.80..1,413,084.07 rows=16,328 width=62) (actual time=4,956.992..6,930.762 rows=225,425 loops=1)

3. 295.694 5,862.253 ↓ 29.7 112,985 1

Gather (cost=614,557.80..711,164.46 rows=3,805 width=62) (actual time=4,956.992..5,862.253 rows=112,985 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 810.897 5,566.559 ↓ 23.8 37,662 3 / 3

Hash Join (cost=613,557.80..709,772.86 rows=1,585 width=62) (actual time=4,718.554..5,566.559 rows=37,662 loops=3)

  • Hash Cond: (h.c8389_activityid = t1949_emaildistinctactivitydomains.c8293_activityid)
  • Join Filter: ((t1949_emaildistinctactivitydomains.start_stamp <= h.start_stamp) AND (t1949_emaildistinctactivitydomains.end_stamp > h.start_stamp))
5. 39.606 39.606 ↓ 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.052..39.606 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. 1,770.548 4,716.056 ↑ 1.0 9,235,934 3 / 3

Hash (cost=434,449.90..434,449.90 rows=9,262,907 width=28) (actual time=4,716.056..4,716.056 rows=9,235,934 loops=3)

  • Buckets: 65,536 Batches: 256 Memory Usage: 2,631kB
7. 2,945.508 2,945.508 ↑ 1.0 9,235,934 3 / 3

Seq Scan on t1949_emaildistinctactivitydomains (cost=0.00..434,449.90 rows=9,262,907 width=28) (actual time=1,065.903..2,945.508 rows=9,235,934 loops=3)

  • Filter: ((NOT deleted) AND (NOT c8294_customdeletedparticipant))
  • Rows Removed by Filter: 10,206,247
8. 98.495 1,050.231 ↓ 9.0 112,440 1

Gather (cost=1,000.57..701,756.33 rows=12,523 width=62) (actual time=407.598..1,050.231 rows=112,440 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 32.630 951.736 ↓ 7.2 37,480 3 / 3

Nested Loop (cost=0.56..699,467.50 rows=5,218 width=62) (actual time=354.994..951.736 rows=37,480 loops=3)

10. 730.798 730.798 ↑ 1.2 37,662 3 / 3

Parallel Seq Scan on t1949_emaildistinctactivitydomains t1949_emaildistinctactivitydomains_1 (cost=0.00..361,541.69 rows=43,811 width=28) (actual time=354.958..730.798 rows=37,662 loops=3)

  • Filter: ((NOT deleted) AND (NOT c8294_customdeletedparticipant) AND (start_stamp > '1558418795069'::bigint) AND (start_stamp <= '1558818795069'::bigint))
  • Rows Removed by Filter: 6,443,065
11. 188.308 188.308 ↑ 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.004..0.005 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.256 ms
Execution time : 7,139.806 ms