explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l0wM

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

XN Merge (cost=1,000,001,033,853.67..1,000,001,033,853.68 rows=1 width=274) (actual rows= loops=)

  • Merge Key: round((COALESCE(sales.sum_order_items, 0::bigint))::double precision), COALESCE(tr.asin, sales.asin)
2. 0.000 0.000 ↓ 0.0

XN Network (cost=1,000,001,033,853.67..1,000,001,033,853.68 rows=1 width=274) (actual rows= loops=)

  • Send to leader
3. 0.000 0.000 ↓ 0.0

XN Sort (cost=1,000,001,033,853.67..1,000,001,033,853.68 rows=1 width=274) (actual rows= loops=)

  • Sort Key: round((COALESCE(sales.sum_order_items, 0::bigint))::double precision), COALESCE(tr.asin, sales.asin)
4. 0.000 0.000 ↓ 0.0

XN Nested Loop DS_BCAST_INNER (cost=307,186.85..1,033,853.66 rows=1 width=274) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

XN Subquery Scan totals (cost=306,926.78..306,926.79 rows=1 width=16) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_BOTH (cost=260.07..486,926.80 rows=1 width=258) (actual rows= loops=)

  • Outer Dist Key: sales.asin
  • Inner Dist Key: tr.asin
  • Hash Cond: ((("outer".asin)::text = ("inner".asin)::text) AND ("outer".merchant_customer_id = "inner".merchant_customer_id) AND (("outer".parent_asin)::text = ("inner".parent_asin)::text))
7. 0.000 0.000 ↓ 0.0

XN Subquery Scan sales (cost=5.04..5.06 rows=1 width=176) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

XN Hash (cost=255.03..255.03 rows=1 width=98) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

XN Aggregate (cost=306,926.78..306,926.78 rows=1 width=16) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

XN Subquery Scan tr (cost=255.00..255.03 rows=1 width=98) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=5.04..5.05 rows=1 width=77) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_BOTH (cost=260.04..306,926.77 rows=1 width=16) (actual rows= loops=)

  • Outer Dist Key: tr.asin
  • Inner Dist Key: sales.asin
  • Hash Cond: ((("outer".asin)::text = ("inner".asin)::text) AND ("outer".merchant_customer_id = "inner".merchant_customer_id) AND (("outer".parent_asin)::text = ("inner".parent_asin)::text))
13. 0.000 0.000 ↓ 0.0

XN Subquery Scan tr (cost=254.99..255.00 rows=1 width=90) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

XN Seq Scan on fct_merchant_sales_metrics_daily_20190308 (cost=0.00..5.02 rows=1 width=77) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=255.00..255.02 rows=1 width=60) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

XN Hash (cost=5.04..5.04 rows=1 width=74) (actual rows= loops=)

  • Filter: ((dataset_date > '2019-03-31'::date) AND (dataset_date <= '2019-04-15'::date) AND (merchant_customer_id = 142499351) AND (marketplace_id = 1) AND (units > 0))
17. 0.000 0.000 ↓ 0.0

XN Subquery Scan sales (cost=5.03..5.04 rows=1 width=74) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

XN Seq Scan on fct_merchant_asin_activity_daily_20190308 (cost=0.00..254.98 rows=1 width=60) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=254.99..254.99 rows=1 width=52) (actual rows= loops=)

  • Filter: ((dataset_date > '2019-03-31'::date) AND (dataset_date <= '2019-04-15'::date) AND (merchant_customer_id = 142499351) AND (marketplace_id = 1))
20. 0.000 0.000 ↓ 0.0

XN Seq Scan on fct_merchant_asin_activity_daily_20190308 (cost=0.00..254.98 rows=1 width=52) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=5.03..5.03 rows=1 width=53) (actual rows= loops=)

  • Filter: ((dataset_date > '2019-03-31'::date) AND (dataset_date <= '2019-04-15'::date) AND (merchant_customer_id = 142499351) AND (marketplace_id = 1))
22. 0.000 0.000 ↓ 0.0

XN Seq Scan on fct_merchant_sales_metrics_daily_20190308 (cost=0.00..5.02 rows=1 width=53) (actual rows= loops=)

  • Filter: ((dataset_date > '2019-03-31'::date) AND (dataset_date <= '2019-04-15'::date) AND (merchant_customer_id = 142499351) AND (marketplace_id = 1) AND (units > 0))