explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MDTZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.081 1,739.766 ↑ 60.4 40 1

HashAggregate (cost=1,140,120.92..1,140,145.08 rows=2,416 width=12) (actual time=1,739.746..1,739.766 rows=40 loops=1)

  • Group Key: (count(DISTINCT t2608_emailactivityaccountfact_copy_sentha.c9655_activitychecksum)), t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
2. 0.012 1,739.685 ↑ 60.4 40 1

Append (cost=570,665.50..1,140,108.84 rows=2,416 width=12) (actual time=405.581..1,739.685 rows=40 loops=1)

3. 129.607 594.665 ↑ 60.4 20 1

GroupAggregate (cost=570,665.50..575,312.10 rows=1,208 width=12) (actual time=405.581..594.665 rows=20 loops=1)

  • Group Key: t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
4. 190.341 465.058 ↓ 1.1 687,934 1

Sort (cost=570,665.50..572,210.34 rows=617,935 width=8) (actual time=401.987..465.058 rows=687,934 loops=1)

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha.c9638_accountid
  • Sort Method: external merge Disk: 12,176kB
5. 227.122 274.717 ↓ 1.1 687,934 1

Bitmap Heap Scan on t2608_emailactivityaccountfact_copy_sentha (cost=39,024.73..502,780.13 rows=617,935 width=8) (actual time=53.342..274.717 rows=687,934 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}'::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: 64,403
  • Heap Blocks: exact=38,701
6. 47.595 47.595 ↓ 1.0 752,337 1

Bitmap Index Scan on idx_accountid_partial_sentha1 (cost=0.00..38,870.25 rows=720,387 width=0) (actual time=47.595..47.595 rows=752,337 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}'::integer[])) AND (c9660_isinternalinitiated = false) AND (end_stamp > '1593172558000'::bigint) AND (start_stamp <= '1593172558000'::bigint))
7. 332.865 1,145.008 ↑ 60.4 20 1

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

  • Group Key: t2608_emailactivityaccountfact_copy_sentha_1.c9638_accountid
8. 345.720 812.143 ↓ 2.3 1,248,153 1

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

  • Sort Key: t2608_emailactivityaccountfact_copy_sentha_1.c9638_accountid
  • Sort Method: external merge Disk: 22,056kB
9. 380.138 466.423 ↓ 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.963..466.423 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. 86.285 86.285 ↓ 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=86.285..86.285 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.759 ms
Execution time : 1,746.040 ms