explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LnqG

Settings

Optimization(s) for this plan:

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

Unique (cost=13,407,579.96..13,407,580.67 rows=703 width=103) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=13,407,579.96..13,407,580.31 rows=703 width=103) (actual rows= loops=)

  • Sort Key: dm.sku, dm.date DESC
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=332,369.23..13,407,573.31 rows=703 width=103) (actual rows= loops=)

  • Join Filter: (dm.date >= (pfs.cost_data_first_set_at)::date)
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=332,369.15..13,373,867.14 rows=26,078 width=119) (actual rows= loops=)

  • Hash Cond: ((dm.sku)::text = (p.sku)::text)
5. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on daily_product_metrics_ongoing_totals dm (cost=317,575.86..13,352,534.26 rows=12,456,362 width=103) (actual rows= loops=)

  • Recheck Cond: (((seller_id)::text = 'A3TUJE1XKIZPOF'::text) AND ((marketplace_id)::text = 'ATVPDKIKX0DER'::text) AND (date <= '2019-06-08 00:00:00'::timestamp without time zone))
6. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on dpm_ongoing_totals__sellerid__marketplaceid__date__parent_asin (cost=0.00..316,953.05 rows=12,456,362 width=0) (actual rows= loops=)

  • Index Cond: (((seller_id)::text = 'A3TUJE1XKIZPOF'::text) AND ((marketplace_id)::text = 'ATVPDKIKX0DER'::text) AND (date <= '2019-06-08 00:00:00'::timestamp without time zone))
7. 0.000 0.000 ↓ 0.0

Hash (cost=14,387.95..14,387.95 rows=115,810 width=60) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Only Scan using products_seller_marketplace_sku_unique on products p (cost=0.11..14,387.95 rows=115,810 width=60) (actual rows= loops=)

  • Index Cond: ((seller_id = 'A3TUJE1XKIZPOF'::text) AND (marketplace_id = 'ATVPDKIKX0DER'::text))
9. 0.000 0.000 ↓ 0.0

Index Scan using product_firsts_nonnull_cost_or_ad_data_index on product_firsts pfs (cost=0.09..1.29 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (tm_product_id = p.tm_id)