explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Sx3A

Settings
# exclusive inclusive rows x rows loops node
1. 2,536.299 30,384.283 ↑ 6.8 381,556 1

GroupAggregate (cost=2,767,711.09..2,972,295.34 rows=2,608,115 width=226) (actual time=27,054.156..30,384.283 rows=381,556 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=2092762, temp read=19027 written=19027
2. 24,023.257 27,847.984 ↓ 1.1 3,748,815 1

Sort (cost=2,767,711.09..2,776,433.00 rows=3,488,763 width=46) (actual time=27,054.110..27,847.984 rows=3,748,815 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
  • Sort Key: d_daily_brand_performance.asin, d_daily_brand_performance.gcid
  • Sort Method: external merge Disk: 152200kB
  • Buffers: shared hit=2092762, temp read=19027 written=19027
3. 454.184 3,824.727 ↓ 1.1 3,748,815 1

Result (cost=0.00..2,388,582.26 rows=3,488,763 width=46) (actual time=0.035..3,824.727 rows=3,748,815 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=2092759
4. 274.471 3,370.543 ↓ 1.1 3,748,815 1

Append (cost=0.00..2,353,694.63 rows=3,488,763 width=46) (actual time=0.035..3,370.543 rows=3,748,815 loops=1)

  • Buffers: shared hit=2092759
5. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on booker.d_daily_brand_performance (cost=0.00..0.00 rows=1 width=262) (actual time=0.001..0.001 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 >= '2018-12-31 12:00:00'::timestamp without time zone) AND (d_daily_brand_performance.metrics_date <= '2019-01-15 12:00:00'::timestamp without time zone) AND (d_daily_brand_performance.marketplace_id = 1) AND (d_daily_brand_performance.brand_owner_id = 142499351))
6. 0.016 0.016 ↓ 0.0 0 1

Index Scan using i_dbac_201812_1 on booker.dbac_201812 (cost=0.70..2.72 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)

  • Output: dbac_201812.asin, dbac_201812.page_views, dbac_201812.buy_box_page_views, dbac_201812.gcid, dbac_201812.ratings_avg, dbac_201812.ratings_cnt, dbac_201812.sales_rank
  • Index Cond: ((dbac_201812.marketplace_id = 1) AND (dbac_201812.brand_owner_id = 142499351) AND (dbac_201812.metrics_date >= '2018-12-31 12:00:00'::timestamp without time zone) AND (dbac_201812.metrics_date <= '2019-01-15 12:00:00'::timestamp without time zone))
  • Buffers: shared hit=8
7. 3,096.055 3,096.055 ↓ 1.1 3,748,815 1

Index Scan using i_ddbp_201901_1 on booker.ddbp_201901 (cost=0.70..2,353,691.91 rows=3,488,761 width=46) (actual time=0.017..3,096.055 rows=3,748,815 loops=1)

  • Output: ddbp_201901.asin, ddbp_201901.page_views, ddbp_201901.buy_box_page_views, ddbp_201901.gcid, ddbp_201901.ratings_avg, ddbp_201901.ratings_cnt, ddbp_201901.sales_rank
  • Index Cond: ((ddbp_201901.marketplace_id = 1) AND (ddbp_201901.brand_owner_id = 142499351) AND (ddbp_201901.metrics_date >= '2018-12-31 12:00:00'::timestamp without time zone) AND (ddbp_201901.metrics_date <= '2019-01-15 12:00:00'::timestamp without time zone))
  • Buffers: shared hit=2092751
Planning time : 7.150 ms