explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ei2G

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

XN Merge (cost=1,000,000,906,667.18..1,000,000,906,667.18 rows=1 width=196) (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,000,906,667.18..1,000,000,906,667.18 rows=1 width=196) (actual rows= loops=)

  • Send to leader
3. 0.000 0.000 ↓ 0.0

XN Sort (cost=1,000,000,906,667.18..1,000,000,906,667.18 rows=1 width=196) (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.01..906,667.17 rows=1 width=196) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

XN Hash Full Join DS_DIST_BOTH (cost=0.15..360,000.22 rows=1 width=180) (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))
6. 0.000 0.000 ↓ 0.0

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

7. 0.000 0.000 ↓ 0.0

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

8. 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))
9. 0.000 0.000 ↓ 0.0

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

10. 0.000 0.000 ↓ 0.0

XN Subquery Scan sales (cost=0.05..0.07 rows=1 width=98) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

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

12. 0.000 0.000 ↓ 0.0

XN Seq Scan on fct_merchant_sales_metrics_daily_20190308 (cost=0.00..0.03 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.86..306,666.87 rows=1 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

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

15. 0.000 0.000 ↓ 0.0

XN Hash Full Join DS_DIST_BOTH (cost=0.12..306,666.85 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.05..0.05 rows=1 width=74) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

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

21. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=0.04..0.04 rows=1 width=74) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

XN Seq Scan on fct_merchant_sales_metrics_daily_20190308 (cost=0.00..0.03 rows=1 width=74) (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))