explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nl1q

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

Finalize GroupAggregate (cost=1,019,708.54..1,032,342.52 rows=40,000 width=200) (actual time=80,089.619..80,115.045 rows=6,920 loops=1)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
2. 184.972 80,251.120 ↑ 5.2 15,510 1

Gather Merge (cost=1,019,708.54..1,029,042.52 rows=80,000 width=136) (actual time=80,089.593..80,251.120 rows=15,510 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 3.021 80,066.148 ↑ 7.7 5,170 3 / 3

Sort (cost=1,018,708.52..1,018,808.52 rows=40,000 width=136) (actual time=80,065.701..80,066.148 rows=5,170 loops=3)

  • Sort Key: stat_d1588_201910.post_id
  • Sort Method: quicksort Memory: 826kB
  • Worker 0: Sort Method: quicksort Memory: 994kB
  • Worker 1: Sort Method: quicksort Memory: 939kB
4. 633.934 80,063.127 ↑ 7.7 5,170 3 / 3

Partial HashAggregate (cost=1,014,850.97..1,015,650.97 rows=40,000 width=136) (actual time=80,055.241..80,063.127 rows=5,170 loops=3)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
5. 26.360 79,429.193 ↑ 1.3 223,983 3 / 3

Parallel Append (cost=0.43..979,108.52 rows=280,333 width=64) (actual time=348.337..79,429.193 rows=223,983 loops=3)

6. 23,727.221 23,727.221 ↓ 2.3 276,265 1 / 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=101.099..71,181.664 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
7. 21,025.607 21,025.607 ↓ 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=748.607..63,076.822 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. 1,353.280 1,353.280 ↓ 2.7 47,212 1 / 3

Parallel Index Scan using stat_d1588_202001_exclude_traffic_idx on stat_d1588_202001 (cost=0.43..193,920.37 rows=17,272 width=64) (actual time=3.098..4,059.841 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: 1086461
9. 17,044.767 17,044.767 ↑ 1.2 19,531 3 / 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=6.226..17,044.767 rows=19,531 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: 308687
10. 16,251.957 16,251.957 ↓ 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=195.289..48,755.872 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 : 1.342 ms
Execution time : 80,279.381 ms