explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BivM

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.068 41.726 ↓ 10.1 81 1

WindowAgg (cost=374,495.91..374,496.23 rows=8 width=68) (actual time=41.701..41.726 rows=81 loops=1)

2. 0.147 41.658 ↓ 10.1 81 1

GroupAggregate (cost=374,495.91..374,496.13 rows=8 width=60) (actual time=41.500..41.658 rows=81 loops=1)

  • Group Key: d.keyword_id, d.account_id, d.campaign_id, d.ad_group_id
3. 0.058 41.511 ↓ 10.1 81 1

Sort (cost=374,495.91..374,495.93 rows=8 width=28) (actual time=41.486..41.511 rows=81 loops=1)

  • Sort Key: d.keyword_id, d.account_id, d.campaign_id, d.ad_group_id
  • Sort Method: quicksort Memory: 31kB
4. 0.034 41.453 ↓ 10.1 81 1

Subquery Scan on d (cost=374,495.63..374,495.79 rows=8 width=28) (actual time=40.524..41.453 rows=81 loops=1)

5. 0.499 41.419 ↓ 10.1 81 1

Group (cost=374,495.63..374,495.71 rows=8 width=60) (actual time=40.522..41.419 rows=81 loops=1)

  • Group Key: d_1.keyword_id, d_1.campaign_id, d_1.ad_group_id
6. 1.063 40.920 ↓ 219.4 1,755 1

Sort (cost=374,495.63..374,495.65 rows=8 width=24) (actual time=40.520..40.920 rows=1,755 loops=1)

  • Sort Key: d_1.keyword_id, d_1.ad_group_id
  • Sort Method: quicksort Memory: 186kB
7. 0.682 39.857 ↓ 219.4 1,755 1

Append (cost=0.00..374,495.51 rows=8 width=24) (actual time=4.649..39.857 rows=1,755 loops=1)

8. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on yandex_direct_keyword d_1 (cost=0.00..0.00 rows=1 width=24) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date) AND (account_id = 1) AND (campaign_id = 35227015))
9. 8.260 12.504 ↓ 109.0 436 1

Bitmap Heap Scan on data_yandex_direct_keyword_2018_11_0 d_2 (cost=3,135.59..274,678.41 rows=4 width=24) (actual time=4.645..12.504 rows=436 loops=1)

  • Recheck Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
  • Filter: (campaign_id = 35227015)
  • Rows Removed by Filter: 56113
  • Heap Blocks: exact=1187
10. 4.244 4.244 ↑ 1.5 56,549 1

Bitmap Index Scan on data_yandex_direct_keyword_2018_11_0_account_id_date_idx (cost=0.00..3,135.59 rows=84,402 width=0) (actual time=4.244..4.244 rows=56,549 loops=1)

  • Index Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
11. 5.380 8.039 ↓ 320.0 320 1

Bitmap Heap Scan on data_yandex_direct_keyword_2018_11_1 d_3 (cost=306.28..31,300.46 rows=1 width=24) (actual time=3.081..8.039 rows=320 loops=1)

  • Recheck Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
  • Filter: (campaign_id = 35227015)
  • Rows Removed by Filter: 35208
  • Heap Blocks: exact=696
12. 2.659 2.659 ↓ 4.4 35,528 1

Bitmap Index Scan on data_yandex_direct_keyword_2018_11_1_account_id_date_idx (cost=0.00..306.28 rows=8,137 width=0) (actual time=2.659..2.659 rows=35,528 loops=1)

  • Index Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
13. 4.445 6.792 ↓ 422.0 422 1

Bitmap Heap Scan on data_yandex_direct_keyword_2018_11_2 d_4 (cost=295.79..29,350.11 rows=1 width=24) (actual time=2.745..6.792 rows=422 loops=1)

  • Recheck Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
  • Filter: (campaign_id = 35227015)
  • Rows Removed by Filter: 31166
  • Heap Blocks: exact=629
14. 2.347 2.347 ↓ 4.1 31,588 1

Bitmap Index Scan on data_yandex_direct_keyword_2018_11_2_account_id_date_idx (cost=0.00..295.79 rows=7,618 width=0) (actual time=2.347..2.347 rows=31,588 loops=1)

  • Index Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
15. 7.180 11.839 ↓ 577.0 577 1

Bitmap Heap Scan on data_yandex_direct_keyword_2018_11_3 d_5 (cost=399.43..39,166.52 rows=1 width=24) (actual time=5.423..11.839 rows=577 loops=1)

  • Recheck Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))
  • Filter: (campaign_id = 35227015)
  • Rows Removed by Filter: 48283
  • Heap Blocks: exact=1194
16. 4.659 4.659 ↓ 6.1 62,101 1

Bitmap Index Scan on data_yandex_direct_keyword_2018_11_3_account_id_date_idx (cost=0.00..399.43 rows=10,149 width=0) (actual time=4.659..4.659 rows=62,101 loops=1)

  • Index Cond: ((account_id = 1) AND (date >= '2018-11-01'::date) AND (date <= '2018-11-30'::date))