explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZTZj

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

XN Merge (cost=1,000,001,033,333.86..1,000,001,033,333.86 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,333.86..1,000,001,033,333.86 rows=1 width=274) (actual rows= loops=)

  • Send to leader
3. 0.000 0.000 ↓ 0.0

XN Sort (cost=1,000,001,033,333.86..1,000,001,033,333.86 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=306,667.03..1,033,333.85 rows=1 width=274) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_BOTH (cost=0.16..486,666.90 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))
6. 0.000 0.000 ↓ 0.0

XN Subquery Scan sales (cost=0.06..0.07 rows=1 width=176) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=0.06..0.06 rows=1 width=176) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

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

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

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

10. 0.000 0.000 ↓ 0.0

XN Subquery Scan tr (cost=0.07..0.10 rows=1 width=98) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=0.07..0.09 rows=1 width=98) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

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

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

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

14. 0.000 0.000 ↓ 0.0

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

15. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_BOTH (cost=0.13..306,666.86 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))
16. 0.000 0.000 ↓ 0.0

XN Subquery Scan tr (cost=0.06..0.08 rows=1 width=90) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=0.06..0.07 rows=1 width=90) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

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

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

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

20. 0.000 0.000 ↓ 0.0

XN Subquery Scan sales (cost=0.05..0.06 rows=1 width=74) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=0.05..0.05 rows=1 width=152) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

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

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