explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CIGl

Settings
# exclusive inclusive rows x rows loops node
1. 7.128 55,062.765 ↓ 279.0 279 1

Unique (cost=381,485.15..381,485.15 rows=1 width=103) (actual time=55,051.722..55,062.765 rows=279 loops=1)

2. 175.669 55,055.637 ↓ 78,541.0 78,541 1

Sort (cost=381,485.15..381,485.15 rows=1 width=103) (actual time=55,051.720..55,055.637 rows=78,541 loops=1)

  • Sort Key: dm.sku, dm.date DESC
  • Sort Method: quicksort Memory: 17957kB
3. 3,935.442 54,879.968 ↓ 78,541.0 78,541 1

Nested Loop (cost=0.34..381,485.15 rows=1 width=103) (actual time=0.564..54,879.968 rows=78,541 loops=1)

  • Join Filter: ((p.sku)::text = (dm.sku)::text)
  • Rows Removed by Join Filter: 51369939
4. 2.974 51.286 ↑ 1.5 340 1

Nested Loop (cost=0.20..22,305.03 rows=494 width=52) (actual time=0.079..51.286 rows=340 loops=1)

5. 5.578 5.578 ↑ 6.2 929 1

Index Only Scan using products_seller_marketplace_sku_unique on products p (cost=0.11..803.83 rows=5,715 width=60) (actual time=0.056..5.578 rows=929 loops=1)

  • Index Cond: ((seller_id = 'A197WTHT9C3SV1'::text) AND (marketplace_id = 'ATVPDKIKX0DER'::text))
  • Heap Fetches: 105
6. 42.734 42.734 ↓ 0.0 0 929

Index Scan using product_firsts_nonnull_cost_or_ad_data_index on product_firsts pfs (cost=0.09..3.76 rows=1 width=24) (actual time=0.046..0.046 rows=0 loops=929)

  • Index Cond: (tm_product_id = p.tm_id)
7. 50,893.240 50,893.240 ↓ 2.0 151,319 340

Index Scan using dpm_ongoing_totals__sellerid__marketplaceid__date__parent_asin on daily_product_metrics_ongoing_totals dm (cost=0.14..464.45 rows=75,039 width=103) (actual time=0.072..149.686 rows=151,319 loops=340)

  • Index Cond: (((seller_id)::text = 'A197WTHT9C3SV1'::text) AND ((marketplace_id)::text = 'ATVPDKIKX0DER'::text) AND (date >= (pfs.cost_data_first_set_at)::date) AND (date <= '2019-06-07 00:00:00'::timestamp without time zone))
Planning time : 5.519 ms
Execution time : 55,064.436 ms