explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vApm

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

Finalize GroupAggregate (cost=784,276.95..802,776.95 rows=40,000 width=200) (actual time=3,091.576..3,119.111 rows=6,920 loops=1)

  • Group Key: stat_d1588_future.domain_id, stat_d1588_future.post_id
2. 83.454 3,164.691 ↑ 6.7 17,939 1

Gather Merge (cost=784,276.95..798,476.95 rows=120,000 width=136) (actual time=3,091.542..3,164.691 rows=17,939 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
3. 2.737 3,081.237 ↑ 8.9 4,485 4 / 4

Sort (cost=783,276.91..783,376.91 rows=40,000 width=136) (actual time=3,080.390..3,081.237 rows=4,485 loops=4)

  • Sort Key: stat_d1588_future.post_id
  • Sort Method: quicksort Memory: 906kB
  • Worker 0: Sort Method: quicksort Memory: 904kB
  • Worker 1: Sort Method: quicksort Memory: 603kB
  • Worker 2: Sort Method: quicksort Memory: 783kB
4. 425.301 3,078.500 ↑ 8.9 4,485 4 / 4

Partial HashAggregate (cost=779,419.36..780,219.36 rows=40,000 width=136) (actual time=3,072.364..3,078.500 rows=4,485 loops=4)

  • Group Key: stat_d1588_future.domain_id, stat_d1588_future.post_id
5. 15.895 2,653.199 ↑ 1.3 167,986 4 / 4

Parallel Append (cost=0.43..751,535.50 rows=218,697 width=64) (actual time=0.677..2,653.199 rows=167,986 loops=4)

6. 920.943 920.943 ↑ 1.2 11,802 4 / 4

Parallel Index Scan using stat_d1588_future_exclude_traffic_idx on stat_d1588_future (cost=0.43..232,000.68 rows=13,903 width=64) (actual time=0.689..920.943 rows=11,802 loops=4)

  • 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: 271599
7. 746.887 746.887 ↓ 1.7 29,298 2 / 4

Parallel Index Scan using stat_d1588_201912_exclude_traffic_idx on stat_d1588_201912 (cost=0.43..165,339.44 rows=17,708 width=64) (actual time=0.248..1,493.774 rows=29,298 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: 463042
8. 341.400 341.400 ↓ 3.0 276,265 1 / 4

Parallel Index Scan using stat_d1588_201910_exclude_traffic_idx on stat_d1588_201910 (cost=0.43..125,201.71 rows=93,144 width=64) (actual time=0.101..1,365.600 rows=276,265 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: 584116
9. 339.245 339.245 ↓ 1.8 53,318 2 / 4

Parallel Index Scan using stat_d1588_201911_exclude_traffic_idx on stat_d1588_201911 (cost=0.43..118,840.55 rows=30,254 width=64) (actual time=0.095..678.490 rows=53,318 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: 364114
10. 288.829 288.829 ↓ 2.9 183,242 1 / 4

Parallel Index Scan using stat_d1588_201909_exclude_traffic_idx on stat_d1588_201909 (cost=0.43..109,059.63 rows=63,688 width=64) (actual time=0.196..1,155.316 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
Planning time : 2.502 ms
Execution time : 3,194.484 ms