explain.depesz.com

PostgreSQL's explain analyze made readable

Result: z4C6

Settings
# exclusive inclusive rows x rows loops node
1. 0.099 3,246.549 ↑ 60.4 40 1

HashAggregate (cost=1,292,677.39..1,292,701.55 rows=2,416 width=12) (actual time=3,246.529..3,246.549 rows=40 loops=1)

  • Group Key: (count(DISTINCT t2608_emailactivityaccountfact_copy_sentha.c9655_activitychecksum)), t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
2. 0.018 3,246.450 ↑ 40.3 60 1

Append (cost=719,122.14..1,292,665.31 rows=2,416 width=12) (actual time=1,485.649..3,246.450 rows=60 loops=1)

3. 458.266 2,105.256 ↑ 30.2 40 1

GroupAggregate (cost=719,122.14..727,868.56 rows=1,208 width=12) (actual time=1,485.648..2,105.256 rows=40 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
4. 589.803 1,646.990 ↓ 1.7 1,936,087 1

Sort (cost=719,122.14..722,033.59 rows=1,164,579 width=8) (actual time=1,467.776..1,646.990 rows=1,936,087 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
  • Sort Method: external merge Disk: 34,160kB
5. 919.732 1,057.187 ↓ 1.7 1,936,087 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha (cost=72,452.44..585,857.78 rows=1,164,579 width=8) (actual time=144.041..1,057.187 rows=1,936,087 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{8543,81,648,124,2591,8165,431,91,1068,9391,21442,1361,700,1168,963,9249,117,19596,73031,932,23938,335,22279,540,705,481,9080,578,77,2553,9074,58181,2392,18329,6790,21215,1719,1521,1872,11255}'::integer[])) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint) AND c9657_isshared AND (NOT deleted))
  • Rows Removed by Index Recheck: 412,461
  • Filter: ((NOT c9660_isinternalinitiated) AND (c9653_activitydate >= '1561532400000'::bigint) AND (c9653_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 383,303
  • Heap Blocks: exact=41,807 lossy=33,419
6. 137.455 137.455 ↓ 1.6 2,144,115 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..72,161.30 rows=1,357,662 width=0) (actual time=137.455..137.455 rows=2,144,115 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{8543,81,648,124,2591,8165,431,91,1068,9391,21442,1361,700,1168,963,9249,117,19596,73031,932,23938,335,22279,540,705,481,9080,578,77,2553,9074,58181,2392,18329,6790,21215,1719,1521,1872,11255}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
7. 331.251 1,141.176 ↑ 60.4 20 1

GroupAggregate (cost=560,660.68..564,772.59 rows=1,208 width=12) (actual time=712.877..1,141.176 rows=20 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_1.c9638_accountid
8. 343.572 809.925 ↓ 2.3 1,248,153 1

Sort (cost=560,660.68..562,027.29 rows=546,643 width=8) (actual time=694.864..809.925 rows=1,248,153 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_1.c9638_accountid
  • Sort Method: external merge Disk: 22,056kB
9. 380.442 466.353 ↓ 2.3 1,248,153 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha t2608_emailactivityaccountfact_copy_sentha_1 (cost=34,559.41..501,088.95 rows=546,643 width=8) (actual time=92.541..466.353 rows=1,248,153 loops=1)

  • Recheck Cond: ((c9638_accountid = ANY ('{23938,335,22279,540,705,481,9080,578,77,2553,9074,58181,2392,18329,6790,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: 143,625
  • Heap Blocks: exact=45,235
10. 85.911 85.911 ↓ 2.2 1,391,778 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..34,422.75 rows=637,275 width=0) (actual time=85.911..85.911 rows=1,391,778 loops=1)

  • Index Cond: ((c9638_accountid = ANY ('{23938,335,22279,540,705,481,9080,578,77,2553,9074,58181,2392,18329,6790,21215,1719,1521,1872,11255}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
Planning time : 0.867 ms
Execution time : 3,257.236 ms