explain.depesz.com

PostgreSQL's explain analyze made readable

Result: myh

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

Finalize GroupAggregate (cost=989,347.99..1,013,805.53 rows=40,000 width=200) (actual time=2,355.889..2,412.572 rows=6,920 loops=1)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
2. 100.840 2,448.578 ↑ 6.5 24,522 1

Gather Merge (cost=989,347.99..1,008,505.53 rows=160,000 width=136) (actual time=2,355.689..2,448.578 rows=24,522 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 3.208 2,347.738 ↑ 8.2 4,904 5 / 5

Sort (cost=988,347.93..988,447.93 rows=40,000 width=136) (actual time=2,347.056..2,347.738 rows=4,904 loops=5)

  • Sort Key: stat_d1588_201910.post_id
  • Sort Method: quicksort Memory: 889kB
  • Worker 0: Sort Method: quicksort Memory: 952kB
  • Worker 1: Sort Method: quicksort Memory: 783kB
  • Worker 2: Sort Method: quicksort Memory: 983kB
  • Worker 3: Sort Method: quicksort Memory: 804kB
4. 401.834 2,344.530 ↑ 8.2 4,904 5 / 5

Partial HashAggregate (cost=984,490.39..985,290.39 rows=40,000 width=136) (actual time=2,336.072..2,344.530 rows=4,904 loops=5)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
5. 15.172 1,942.696 ↑ 1.3 134,390 5 / 5

Parallel Append (cost=0.43..963,044.89 rows=168,200 width=64) (actual time=0.702..1,942.696 rows=134,390 loops=5)

6. 526.554 526.554 ↑ 1.3 55,253 5 / 5

Parallel Index Scan using stat_d1588_201910_exclude_traffic_idx on stat_d1588_201910 (cost=0.43..242,070.12 rows=71,406 width=64) (actual time=0.097..526.554 rows=55,253 loops=5)

  • 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: 116823
7. 448.222 448.222 ↓ 1.2 61,081 3 / 5

Parallel Index Scan using stat_d1588_201909_exclude_traffic_idx on stat_d1588_201909 (cost=0.43..213,477.11 rows=49,778 width=64) (actual time=0.907..747.037 rows=61,081 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: 195282
8. 339.148 339.148 ↓ 1.8 23,606 2 / 5

Parallel Index Scan using stat_d1588_202001_exclude_traffic_idx on stat_d1588_202001 (cost=0.43..191,455.94 rows=13,372 width=64) (actual time=0.163..847.869 rows=23,606 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: 543230
9. 352.249 352.249 ↓ 2.1 29,297 2 / 5

Parallel Index Scan using stat_d1588_201912_exclude_traffic_idx on stat_d1588_201912 (cost=0.43..168,508.06 rows=13,900 width=64) (actual time=0.126..880.622 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. 261.352 261.352 ↓ 4.7 106,635 1 / 5

Parallel Index Scan using stat_d1588_201911_exclude_traffic_idx on stat_d1588_201911 (cost=0.43..146,692.66 rows=22,753 width=64) (actual time=0.225..1,306.758 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 : 4.283 ms
Execution time : 2,504.457 ms