explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n2mE

Settings
# exclusive inclusive rows x rows loops node
1. 0.142 1,848.767 ↑ 241.2 40 1

HashAggregate (cost=2,422,300.28..2,422,396.78 rows=9,650 width=12) (actual time=1,848.704..1,848.767 rows=40 loops=1)

  • Group Key: (count(DISTINCT t2608_emailactivityaccountfact_copy_sentha.c9655_activitychecksum)), t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
2. 0.019 1,848.625 ↑ 241.2 40 1

Append (cost=508,317.13..2,422,252.03 rows=9,650 width=12) (actual time=138.204..1,848.625 rows=40 loops=1)

3. 36.904 188.080 ↑ 241.6 5 1

GroupAggregate (cost=508,317.13..511,104.16 rows=1,208 width=12) (actual time=138.203..188.080 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
4. 63.130 151.176 ↑ 2.0 184,938 1

Sort (cost=508,317.13..509,242.11 rows=369,994 width=8) (actual time=134.697..151.176 rows=184,938 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
  • Sort Method: external merge Disk: 3,272kB
5. 71.729 88.046 ↑ 2.0 184,938 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha (cost=23,505.64..469,036.97 rows=369,994 width=8) (actual time=18.795..88.046 rows=184,938 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{8543,81,648,124,2591}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 22,909
  • Heap Blocks: exact=17,885
6. 16.317 16.317 ↑ 2.1 207,847 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..23,413.14 rows=431,338 width=0) (actual time=16.317..16.317 rows=207,847 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{8543,81,648,124,2591}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
7. 45.372 219.396 ↑ 241.6 5 1

GroupAggregate (cost=316,350.35..317,301.40 rows=1,208 width=12) (actual time=166.413..219.396 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_1.c9638_accountid
8. 76.745 174.024 ↓ 1.9 239,188 1

Sort (cost=316,350.35..316,663.34 rows=125,196 width=8) (actual time=153.119..174.024 rows=239,188 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_1.c9638_accountid
  • Sort Method: external merge Disk: 4,232kB
9. 81.099 97.279 ↓ 1.9 239,188 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_1 (cost=8,014.24..305,750.11 rows=125,196 width=8) (actual time=18.327..97.279 rows=239,188 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{8165,431,91,1068,9391}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 25,655
  • Heap Blocks: exact=15,776
10. 16.180 16.180 ↓ 1.8 264,843 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..7,982.94 rows=145,953 width=0) (actual time=16.180..16.180 rows=264,843 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{8165,431,91,1068,9391}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
11. 52.249 228.968 ↑ 241.6 5 1

GroupAggregate (cost=304,283.36..305,175.40 rows=1,208 width=12) (actual time=157.602..228.968 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_2.c9638_accountid
12. 83.057 176.719 ↓ 2.1 250,139 1

Sort (cost=304,283.36..304,576.68 rows=117,328 width=8) (actual time=154.441..176.719 rows=250,139 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_2.c9638_accountid
  • Sort Method: external merge Disk: 4,424kB
13. 77.882 93.662 ↓ 2.1 250,139 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_2 (cost=7,519.59..294,404.23 rows=117,328 width=8) (actual time=17.441..93.662 rows=250,139 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{21442,1361,700,1168,963}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 15,340
  • Heap Blocks: exact=13,517
14. 15.780 15.780 ↓ 1.9 265,479 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..7,490.26 rows=136,781 width=0) (actual time=15.780..15.780 rows=265,479 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{21442,1361,700,1168,963}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
15. 2.797 13.731 ↑ 238.8 5 1

GroupAggregate (cost=23,625.43..23,677.99 rows=1,194 width=12) (actual time=11.034..13.731 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_3.c9638_accountid
16. 2.301 10.934 ↓ 2.5 13,669 1

Sort (cost=23,625.43..23,638.97 rows=5,417 width=8) (actual time=10.314..10.934 rows=13,669 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_3.c9638_accountid
  • Sort Method: quicksort Memory: 1,025kB
17. 7.290 8.633 ↓ 2.5 13,669 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_3 (cost=353.34..23,289.48 rows=5,417 width=8) (actual time=1.760..8.633 rows=13,669 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{9249,117,19596,73031,932}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 499
  • Heap Blocks: exact=3,535
18. 1.343 1.343 ↓ 2.2 14,168 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..351.99 rows=6,315 width=0) (actual time=1.343..1.343 rows=14,168 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{9249,117,19596,73031,932}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
19. 20.989 87.666 ↑ 241.6 5 1

GroupAggregate (cost=240,547.78..241,172.87 rows=1,208 width=12) (actual time=60.471..87.666 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_4.c9638_accountid
20. 28.265 66.677 ↓ 1.0 85,562 1

Sort (cost=240,547.78..240,752.11 rows=81,735 width=8) (actual time=59.670..66.677 rows=85,562 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_4.c9638_accountid
  • Sort Method: external merge Disk: 1,520kB
21. 30.795 38.412 ↓ 1.0 85,562 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_4 (cost=5,242.37..233,878.74 rows=81,735 width=8) (actual time=8.543..38.412 rows=85,562 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{23938,335,22279,540,705}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 8,552
  • Heap Blocks: exact=7,152
22. 7.617 7.617 ↑ 1.0 94,114 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..5,221.94 rows=95,287 width=0) (actual time=7.617..7.617 rows=94,114 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{23938,335,22279,540,705}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
23. 177.944 601.678 ↑ 241.6 5 1

GroupAggregate (cost=447,241.98..449,121.48 rows=1,208 width=12) (actual time=384.917..601.678 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_5.c9638_accountid
24. 184.170 423.734 ↓ 2.5 622,265 1

Sort (cost=447,241.98..447,864.46 rows=248,989 width=8) (actual time=366.821..423.734 rows=622,265 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_5.c9638_accountid
  • Sort Method: external merge Disk: 10,984kB
25. 199.157 239.564 ↓ 2.5 622,265 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_5 (cost=15,886.68..421,519.94 rows=248,989 width=8) (actual time=43.684..239.564 rows=622,265 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{481,9080,578,77,2553}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 92,933
  • Heap Blocks: exact=24,540
26. 40.407 40.407 ↓ 2.5 715,198 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..15,824.44 rows=290,271 width=0) (actual time=40.407..40.407 rows=715,198 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{481,9080,578,77,2553}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
27. 71.057 272.427 ↑ 241.6 5 1

GroupAggregate (cost=321,628.77..322,606.60 rows=1,208 width=12) (actual time=203.300..272.427 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_6.c9638_accountid
28. 99.724 201.370 ↓ 2.1 267,687 1

Sort (cost=321,628.77..321,950.69 rows=128,766 width=8) (actual time=178.926..201.370 rows=267,687 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_6.c9638_accountid
  • Sort Method: external merge Disk: 4,728kB
29. 79.891 101.646 ↓ 2.1 267,687 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_6 (cost=8,249.45..310,700.15 rows=128,766 width=8) (actual time=23.023..101.646 rows=267,687 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{9074,58181,2392,18329,6790}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 19,658
  • Heap Blocks: exact=10,196
30. 21.755 21.755 ↓ 1.9 287,345 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..8,217.26 rows=150,115 width=0) (actual time=21.755..21.755 rows=287,345 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{9074,58181,2392,18329,6790}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
31. 65.903 236.660 ↑ 241.6 5 1

GroupAggregate (cost=251,329.91..251,995.64 rows=1,208 width=12) (actual time=169.360..236.660 rows=5 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_7.c9638_accountid
32. 74.238 170.757 ↓ 3.1 272,639 1

Sort (cost=251,329.91..251,547.79 rows=87,153 width=8) (actual time=146.201..170.757 rows=272,639 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_7.c9638_accountid
  • Sort Method: external merge Disk: 4,824kB
33. 80.200 96.519 ↓ 3.1 272,639 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_7 (cost=5,592.98..244,178.46 rows=87,153 width=8) (actual time=17.632..96.519 rows=272,639 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{21215,1719,1521,1872,11255}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 22,482
  • Heap Blocks: exact=10,544
34. 16.319 16.319 ↓ 2.9 295,121 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..5,571.19 rows=101,602 width=0) (actual time=16.319..16.319 rows=295,121 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{21215,1719,1521,1872,11255}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
Planning time : 4.532 ms
Execution time : 1,855.883 ms