explain.depesz.com

PostgreSQL's explain analyze made readable

Result: imDJ

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

Finalize GroupAggregate (cost=988,108.43..999,742.41 rows=40,000 width=136) (actual time=174,242.452..174,256.982 rows=6,920 loops=1)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
2. 213.220 174,446.415 ↑ 5.7 13,995 1

Gather Merge (cost=988,108.43..997,442.41 rows=80,000 width=72) (actual time=174,241.201..174,446.415 rows=13,995 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.006 174,233.195 ↑ 8.6 4,665 3 / 3

Sort (cost=987,108.41..987,208.41 rows=40,000 width=72) (actual time=174,232.739..174,233.195 rows=4,665 loops=3)

  • Sort Key: stat_d1588_201910.post_id
  • Sort Method: quicksort Memory: 597kB
  • Worker 0: Sort Method: quicksort Memory: 305kB
  • Worker 1: Sort Method: quicksort Memory: 709kB
4. 179.936 174,231.189 ↑ 8.6 4,665 3 / 3

Partial HashAggregate (cost=983,450.86..984,050.86 rows=40,000 width=72) (actual time=174,227.404..174,231.189 rows=4,665 loops=3)

  • Group Key: stat_d1588_201910.domain_id, stat_d1588_201910.post_id
5. 30.011 174,051.253 ↑ 1.3 223,983 3 / 3

Parallel Append (cost=0.43..979,945.76 rows=280,408 width=20) (actual time=84.050..174,051.253 rows=223,983 loops=3)

6. 49,503.776 49,503.776 ↓ 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=20) (actual time=4.077..148,511.329 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. 61,222.316 61,222.316 ↑ 1.4 61,081 3 / 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=20) (actual time=82.307..61,222.316 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. 3,329.339 3,329.339 ↓ 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=20) (actual time=5.837..9,988.018 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. 22,059.773 22,059.773 ↓ 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=20) (actual time=13.488..33,089.659 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. 37,906.038 37,906.038 ↓ 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=20) (actual time=5.987..113,718.113 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 : 31.486 ms
Execution time : 174,464.771 ms