explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KzBy

Settings
# exclusive inclusive rows x rows loops node
1. 206.948 1,412.717 ↓ 2.3 2,724 1

GroupAggregate (cost=123,745.62..125,296.78 rows=1,164 width=200) (actual time=1,188.676..1,412.717 rows=2,724 loops=1)

  • Group Key: stat_default_201908.domain_id, stat_default_201908.post_id
2. 56.352 1,205.769 ↓ 7.5 87,732 1

Sort (cost=123,745.62..123,774.72 rows=11,641 width=64) (actual time=1,188.577..1,205.769 rows=87,732 loops=1)

  • Sort Key: stat_default_201908.post_id
  • Sort Method: quicksort Memory: 15,410kB
3. 8.322 1,149.417 ↓ 7.5 87,732 1

Append (cost=21,837.42..122,959.45 rows=11,641 width=64) (actual time=296.247..1,149.417 rows=87,732 loops=1)

4. 328.119 557.341 ↓ 16.4 25,180 1

Bitmap Heap Scan on stat_default_201908 (cost=21,837.42..58,479.88 rows=1,532 width=64) (actual time=296.246..557.341 rows=25,180 loops=1)

  • Recheck Cond: ((exclude_traffic = ANY ('{1,3}'::integer[])) AND (domain_id = 2,393))
  • Filter: ((create_date >= '2019-08-19'::date) AND (create_date <= '2019-09-17'::date) AND (stat_date >= '2019-08-19'::date) AND (stat_date <= '2019-10-01'::date))
  • Rows Removed by Filter: 198,151
  • Heap Blocks: exact=118,127
5. 16.412 229.222 ↓ 0.0 0 1

BitmapAnd (cost=21,837.42..21,837.42 rows=33,973 width=0) (actual time=229.222..229.222 rows=0 loops=1)

6. 101.355 101.355 ↓ 1.0 513,028 1

Bitmap Index Scan on stat_default_201908_exclude_traffic_idx (cost=0.00..8,324.17 rows=504,300 width=0) (actual time=101.355..101.355 rows=513,028 loops=1)

  • Index Cond: (exclude_traffic = ANY ('{1,3}'::integer[]))
7. 111.455 111.455 ↓ 1.0 816,200 1

Bitmap Index Scan on stat_default_201908_domain_id_longtail_idx (cost=0.00..13,512.23 rows=814,050 width=0) (actual time=111.455..111.455 rows=816,200 loops=1)

  • Index Cond: (domain_id = 2,393)
8. 362.454 578.570 ↓ 6.2 62,321 1

Bitmap Heap Scan on stat_default_201909 (cost=22,175.95..63,217.86 rows=10,037 width=64) (actual time=255.959..578.570 rows=62,321 loops=1)

  • Recheck Cond: ((exclude_traffic = ANY ('{1,3}'::integer[])) AND (domain_id = 2,393))
  • Filter: ((create_date >= '2019-08-19'::date) AND (create_date <= '2019-09-17'::date) AND (stat_date >= '2019-08-19'::date) AND (stat_date <= '2019-10-01'::date))
  • Rows Removed by Filter: 172,664
  • Heap Blocks: exact=126,982
9. 16.624 216.116 ↓ 0.0 0 1

BitmapAnd (cost=22,175.95..22,175.95 rows=38,344 width=0) (actual time=216.116..216.116 rows=0 loops=1)

10. 81.964 81.964 ↓ 1.0 532,697 1

Bitmap Index Scan on stat_default_201909_exclude_traffic_idx (cost=0.00..8,441.65 rows=522,164 width=0) (actual time=81.964..81.964 rows=532,697 loops=1)

  • Index Cond: (exclude_traffic = ANY ('{1,3}'::integer[]))
11. 117.528 117.528 ↓ 1.0 867,993 1

Bitmap Index Scan on stat_default_201909_domain_id_longtail_idx (cost=0.00..13,729.03 rows=844,586 width=0) (actual time=117.528..117.528 rows=867,993 loops=1)

  • Index Cond: (domain_id = 2,393)
12. 3.395 5.184 ↓ 3.2 231 1

Bitmap Heap Scan on stat_default_201910 (cost=243.71..1,203.50 rows=72 width=64) (actual time=1.943..5.184 rows=231 loops=1)

  • Recheck Cond: ((domain_id = 2,393) AND (exclude_traffic = ANY ('{1,3}'::integer[])))
  • Filter: ((create_date >= '2019-08-19'::date) AND (create_date <= '2019-09-17'::date) AND (stat_date >= '2019-08-19'::date) AND (stat_date <= '2019-10-01'::date))
  • Rows Removed by Filter: 3,119
  • Heap Blocks: exact=1,179
13. 0.101 1.789 ↓ 0.0 0 1

BitmapAnd (cost=243.71..243.71 rows=960 width=0) (actual time=1.789..1.789 rows=0 loops=1)

14. 0.806 0.806 ↓ 1.2 11,200 1

Bitmap Index Scan on stat_default_201910_domain_id_longtail_idx (cost=0.00..119.49 rows=9,130 width=0) (actual time=0.806..0.806 rows=11,200 loops=1)

  • Index Cond: (domain_id = 2,393)
15. 0.882 0.882 ↓ 1.1 10,794 1

Bitmap Index Scan on stat_default_201910_exclude_traffic_idx (cost=0.00..123.93 rows=9,666 width=0) (actual time=0.882..0.882 rows=10,794 loops=1)

  • Index Cond: (exclude_traffic = ANY ('{1,3}'::integer[]))
Planning time : 2.254 ms
Execution time : 1,426.115 ms