explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kteI

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

Finalize GroupAggregate (cost=802,444.94..815,078.93 rows=40,000 width=200) (actual time=3,835.946..3,861.617 rows=6,920 loops=1)

  • Group Key: stat_d1588_future.domain_id, stat_d1588_future.post_id
2. 96.516 3,920.197 ↑ 5.2 15,375 1

Gather Merge (cost=802,444.94..811,778.93 rows=80,000 width=136) (actual time=3,835.914..3,920.197 rows=15,375 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 3.493 3,823.681 ↑ 7.8 5,125 3 / 3

Sort (cost=801,444.92..801,544.92 rows=40,000 width=136) (actual time=3,822.278..3,823.681 rows=5,125 loops=3)

  • Sort Key: stat_d1588_future.post_id
  • Sort Method: quicksort Memory: 888kB
  • Worker 0: Sort Method: quicksort Memory: 863kB
  • Worker 1: Sort Method: quicksort Memory: 989kB
4. 544.934 3,820.188 ↑ 7.8 5,125 3 / 3

Partial HashAggregate (cost=797,587.38..798,387.38 rows=40,000 width=136) (actual time=3,813.660..3,820.188 rows=5,125 loops=3)

  • Group Key: stat_d1588_future.domain_id, stat_d1588_future.post_id
5. 20.079 3,275.254 ↑ 1.3 223,982 3 / 3

Parallel Append (cost=0.43..761,570.67 rows=282,484 width=64) (actual time=0.941..3,275.254 rows=223,982 loops=3)

6. 1,189.204 1,189.204 ↓ 2.6 47,208 1 / 3

Parallel Index Scan using stat_d1588_future_exclude_traffic_idx on stat_d1588_future (cost=0.43..234,400.92 rows=17,958 width=64) (actual time=2.301..3,567.611 rows=47,208 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: 1086397
7. 862.466 862.466 ↓ 2.6 58,596 1 / 3

Parallel Index Scan using stat_d1588_201912_exclude_traffic_idx on stat_d1588_201912 (cost=0.43..167,470.34 rows=22,873 width=64) (actual time=0.327..2,587.399 rows=58,596 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: 926084
8. 479.117 479.117 ↑ 1.3 92,088 3 / 3

Parallel Index Scan using stat_d1588_201910_exclude_traffic_idx on stat_d1588_201910 (cost=0.43..127,040.90 rows=120,311 width=64) (actual time=0.065..479.117 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
9. 379.441 379.441 ↓ 2.7 106,635 1 / 3

Parallel Index Scan using stat_d1588_201911_exclude_traffic_idx on stat_d1588_201911 (cost=0.43..120,573.56 rows=39,078 width=64) (actual time=0.089..1,138.322 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
10. 344.948 344.948 ↓ 2.2 183,242 1 / 3

Parallel Index Scan using stat_d1588_201909_exclude_traffic_idx on stat_d1588_201909 (cost=0.43..110,672.53 rows=82,264 width=64) (actual time=0.186..1,034.843 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 : 1.894 ms
Execution time : 3,951.033 ms