Original query:

Limit  (cost=136693.32..136693.37 rows=10 width=988)
  ->  Unique  (cost=136693.32..136693.64 rows=63 width=988)
        ->  Sort  (cost=136693.32..136693.48 rows=63 width=988)
              Sort Key: report_keyword.keyword_text
              ->  GroupAggregate  (cost=136685.45..136691.44 rows=63 width=988)
                    Group Key: optimization_group_settings.group_name, campaign.id, campaign.campaign_type, campaign.profile_id, report_keyword.ad_group_id, report_keyword.ad_group_name, report_keyword.match_type, report_keyword.impressions, report_keyword.clicks, report_keyword.attributed_units_ordered_14d, report_keyword.attributed_conversions_14d, report_keyword.attributed_sales_14d, keyword.clicks_life, keyword.vpc_life, keyword.bid, optimization_group_settings.max_bid, report_keyword.cost, optimization_group_settings.max_bid_increase, optimization_group_settings.max_bid_decrease, optimization_group_settings.click_low, optimization_group_settings.click_mid, optimization_group_settings.click_high, optimization_group_settings.click_min, optimization_group_settings.max_acos, report_keyword.keyword_text
                    ->  Sort  (cost=136685.45..136685.61 rows=63 width=859)
                          Sort Key: optimization_group_settings.group_name, campaign.id, campaign.campaign_type, report_keyword.ad_group_id, report_keyword.ad_group_name, report_keyword.match_type, report_keyword.impressions, report_keyword.clicks, report_keyword.attributed_units_ordered_14d, report_keyword.attributed_conversions_14d, report_keyword.attributed_sales_14d, keyword.clicks_life, keyword.vpc_life, keyword.bid, optimization_group_settings.max_bid, report_keyword.cost, optimization_group_settings.max_bid_increase, optimization_group_settings.max_bid_decrease, optimization_group_settings.click_low, optimization_group_settings.click_mid, optimization_group_settings.click_high, optimization_group_settings.click_min, optimization_group_settings.max_acos, report_keyword.keyword_text
                          ->  Nested Loop Left Join  (cost=934.49..136683.57 rows=63 width=859)
                                ->  Nested Loop  (cost=934.06..136516.59 rows=3 width=847)
                                      ->  Nested Loop Left Join  (cost=0.29..12.20 rows=1 width=131)
                                            Join Filter: (optimization_group_settings.id = campaign.optimization_group_id)
                                            ->  Index Scan using campaign_group_optimization_id on campaign  (cost=0.29..8.31 rows=1 width=92)
                                                  Index Cond: (optimization_group_id > 0)
                                                  Filter: (((serving_status)::text ~~ '%CAMPAIGN_STATUS_ENABLED%'::text) AND (profile_id = '2764510910046654'::bigint))
                                            ->  Seq Scan on optimization_group_settings  (cost=0.00..2.84 rows=84 width=47)
                                      ->  Bitmap Heap Scan on report_keyword  (cost=933.77..136501.87 rows=252 width=724)
                                            Recheck Cond: (campaign_id = campaign.id)
                                            Filter: ((report_date >= '2018-01-01'::date) AND (report_date <= '2020-01-01'::date))
                                            ->  Bitmap Index Scan on report_keyword_campaign_id  (cost=0.00..933.71 rows=50303 width=0)
                                                  Index Cond: (campaign_id = campaign.id)
                                ->  Index Scan using keyword_text_idx on keyword  (cost=0.43..55.45 rows=21 width=32)
                                      Index Cond: ((keyword_text)::text = (report_keyword.keyword_text)::text)