explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hdHR

Settings
# exclusive inclusive rows x rows loops node
1. 12,186.848 18,775.012 ↓ 12.2 487,250 1

HashAggregate (cost=5,311,013.62..5,312,813.62 rows=40,000 width=226) (actual time=17,908.455..18,775.012 rows=487,250 loops=1)

  • Output: (d_daily_brand_performance.asin)::character varying(10), CASE WHEN (sum(d_daily_brand_performance.page_views) = '0'::numeric) THEN '0'::numeric ELSE round(('100'::numeric * (sum(d_daily_brand_performance.buy_box_page_views) / sum(d_daily_brand_performance.page_views))), 2) END, COALESCE((d_daily_brand_performance.gcid)::character varying(16), ' '::character varying), avg(NULLIF(d_daily_brand_performance.ratings_avg, '0'::numeric)), sum(d_daily_brand_performance.ratings_cnt), NULLIF(max(d_daily_brand_performance.sales_rank), '0'::numeric), d_daily_brand_performance.asin, d_daily_brand_performance.gcid
  • Group Key: d_daily_brand_performance.asin, d_daily_brand_performance.gcid
  • Buffers: shared hit=3869309
2. 710.436 6,588.164 ↑ 1.2 6,773,885 1

Result (cost=0.00..5,133,959.29 rows=7,869,081 width=46) (actual time=0.021..6,588.164 rows=6,773,885 loops=1)

  • Output: d_daily_brand_performance.asin, d_daily_brand_performance.gcid, d_daily_brand_performance.page_views, d_daily_brand_performance.buy_box_page_views, d_daily_brand_performance.ratings_avg, d_daily_brand_performance.ratings_cnt, d_daily_brand_performance.sales_rank
  • Buffers: shared hit=3869309
3. 536.917 5,877.728 ↑ 1.2 6,773,885 1

Append (cost=0.00..5,055,268.48 rows=7,869,081 width=46) (actual time=0.021..5,877.728 rows=6,773,885 loops=1)

  • Buffers: shared hit=3869309
4. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on booker.d_daily_brand_performance (cost=0.00..0.00 rows=1 width=262) (actual time=0.002..0.002 rows=0 loops=1)

  • Output: d_daily_brand_performance.asin, d_daily_brand_performance.page_views, d_daily_brand_performance.buy_box_page_views, d_daily_brand_performance.gcid, d_daily_brand_performance.ratings_avg, d_daily_brand_performance.ratings_cnt, d_daily_brand_performance.sales_rank
  • Filter: ((d_daily_brand_performance.metrics_date >= '2019-02-01 00:00:00'::timestamp without time zone) AND (d_daily_brand_performance.metrics_date <= '2019-02-28 00:00:00'::timestamp without time zone) AND (d_daily_brand_performance.marketplace_id = 1) AND (d_daily_brand_performance.brand_owner_id = 142499351))
5. 5,340.809 5,340.809 ↑ 1.2 6,773,885 1

Index Scan using i_ddbp_201902_1 on booker.ddbp_201902 (cost=0.70..5,055,268.48 rows=7,869,080 width=46) (actual time=0.019..5,340.809 rows=6,773,885 loops=1)

  • Output: ddbp_201902.asin, ddbp_201902.page_views, ddbp_201902.buy_box_page_views, ddbp_201902.gcid, ddbp_201902.ratings_avg, ddbp_201902.ratings_cnt, ddbp_201902.sales_rank
  • Index Cond: ((ddbp_201902.marketplace_id = 1) AND (ddbp_201902.brand_owner_id = 142499351) AND (ddbp_201902.metrics_date >= '2019-02-01 00:00:00'::timestamp without time zone) AND (ddbp_201902.metrics_date <= '2019-02-28 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=3869309
Planning time : 1.481 ms