explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ST2U

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 116,741.812 ↑ 5.8 6,920 1

Finalize GroupAggregate (cost=1,020,555.35..1,033,189.33 rows=40,000 width=200) (actual time=116,718.116..116,741.812 rows=6,920 loops=1)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
2. 207.413 116,914.599 ↑ 5.0 15,960 1

Gather Merge (cost=1,020,555.35..1,029,889.33 rows=80,000 width=136) (actual time=116,716.297..116,914.599 rows=15,960 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.860 116,707.186 ↑ 7.5 5,320 3 / 3

Sort (cost=1,019,555.33..1,019,655.33 rows=40,000 width=136) (actual time=116,706.677..116,707.186 rows=5,320 loops=3)

  • Sort Key: stat_d1588_201910.post_id
  • Sort Method: quicksort Memory: 908kB
  • Worker 0: Sort Method: quicksort Memory: 1099kB
  • Worker 1: Sort Method: quicksort Memory: 815kB
4. 573.519 116,704.326 ↑ 7.5 5,320 3 / 3

Partial HashAggregate (cost=1,015,697.78..1,016,497.78 rows=40,000 width=136) (actual time=116,696.761..116,704.326 rows=5,320 loops=3)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
5. 24.792 116,130.807 ↑ 1.3 223,983 3 / 3

Parallel Append (cost=0.43..979,945.76 rows=280,408 width=64) (actual time=3.743..116,130.807 rows=223,983 loops=3)

6. 47,012.591 47,012.591 ↑ 1.3 92,088 3 / 3

Parallel Index Scan using stat_d1588_201910_exclude_traffic_idx on stat_d1588_201910 (cost=0.43..245,307.54 rows=119,009 width=64) (actual time=0.928..47,012.591 rows=92,088 loops=3)

  • Index Cond: (exclude_traffic = ANY ('{1,3,2}'::integer[]))
  • Filter: ((create_date >= '2019-09-01'::date) AND (create_date <= '2019-10-31'::date) AND (stat_date >= '2019-09-01'::date) AND (stat_date <= '2020-01-28'::date) AND (domain_id = 1588))
  • Rows Removed by Filter: 194705
7. 16,156.484 16,156.484 ↓ 2.2 183,242 1 / 3

Parallel Index Scan using stat_d1588_201909_exclude_traffic_idx on stat_d1588_201909 (cost=0.43..216,389.97 rows=82,962 width=64) (actual time=7.115..48,469.451 rows=183,242 loops=1)

  • Index Cond: (exclude_traffic = ANY ('{1,3,2}'::integer[]))
  • Filter: ((create_date >= '2019-09-01'::date) AND (create_date <= '2019-10-31'::date) AND (stat_date >= '2019-09-01'::date) AND (stat_date <= '2020-01-28'::date) AND (domain_id = 1588))
  • Rows Removed by Filter: 585847
8. 3,824.914 3,824.914 ↓ 2.7 47,212 1 / 3

Parallel Index Scan using stat_d1588_202001_exclude_traffic_idx on stat_d1588_202001 (cost=0.43..194,757.24 rows=17,347 width=64) (actual time=2.151..11,474.741 rows=47,212 loops=1)

  • Index Cond: (exclude_traffic = ANY ('{1,3,2}'::integer[]))
  • Filter: ((create_date >= '2019-09-01'::date) AND (create_date <= '2019-10-31'::date) AND (stat_date >= '2019-09-01'::date) AND (stat_date <= '2020-01-28'::date) AND (domain_id = 1588))
  • Rows Removed by Filter: 1088961
9. 24,151.899 24,151.899 ↓ 1.3 29,297 2 / 3

Parallel Index Scan using stat_d1588_201912_exclude_traffic_idx on stat_d1588_201912 (cost=0.43..172,271.53 rows=23,168 width=64) (actual time=11.879..36,227.849 rows=29,297 loops=2)

  • Index Cond: (exclude_traffic = ANY ('{1,3,2}'::integer[]))
  • Filter: ((create_date >= '2019-09-01'::date) AND (create_date <= '2019-10-31'::date) AND (stat_date >= '2019-09-01'::date) AND (stat_date <= '2020-01-28'::date) AND (domain_id = 1588))
  • Rows Removed by Filter: 463030
10. 24,960.128 24,960.128 ↓ 2.8 106,635 1 / 3

Parallel Index Scan using stat_d1588_201911_exclude_traffic_idx on stat_d1588_201911 (cost=0.43..149,817.44 rows=37,922 width=64) (actual time=3.890..74,880.383 rows=106,635 loops=1)

  • Index Cond: (exclude_traffic = ANY ('{1,3,2}'::integer[]))
  • Filter: ((create_date >= '2019-09-01'::date) AND (create_date <= '2019-10-31'::date) AND (stat_date >= '2019-09-01'::date) AND (stat_date <= '2020-01-28'::date) AND (domain_id = 1588))
  • Rows Removed by Filter: 728229
Planning time : 13.598 ms
Execution time : 116,941.879 ms