explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DQyq

Settings
# exclusive inclusive rows x rows loops node
1. 42.275 1,205.501 ↓ 9.0 137,702 1

Unique (cost=72,597.19..72,673.62 rows=15,285 width=2,151) (actual time=1,038.057..1,205.501 rows=137,702 loops=1)

2. 803.723 1,163.226 ↓ 9.0 137,702 1

Sort (cost=72,597.19..72,635.40 rows=15,285 width=2,151) (actual time=1,038.056..1,163.226 rows=137,702 loops=1)

  • Sort Key: sku_catalog_price_caches.sku_id, sku_catalog_price_caches.active_at DESC, sku_catalog_price_caches.store_id
  • Sort Method: external merge Disk: 145448kB
3. 0.000 359.503 ↓ 9.0 137,702 1

Gather (cost=1,000.42..57,321.40 rows=15,285 width=2,151) (actual time=0.506..359.503 rows=137,702 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 248.819 383.104 ↓ 7.2 45,901 3

Nested Loop (cost=0.42..54,792.90 rows=6,369 width=2,151) (actual time=0.131..383.104 rows=45,901 loops=3)

5. 134.281 134.281 ↓ 7.2 45,901 3

Parallel Seq Scan on skus (cost=0.00..46,535.94 rows=6,388 width=2,058) (actual time=0.082..134.281 rows=45,901 loops=3)

  • Filter: (usable AND (NOT dummy) AND ('2019-03-11 02:37:32.776245'::timestamp without time zone >= COALESCE(start_display_date_cache, '2019-03-09 16:00:00'::timestamp without time zone)) AND ('2019-03-11 02:37:32.776245'::timestamp without time zone <= COALESCE(end_display_date_cache, '2019-03-16 15:59:59.999999'::timestamp without time zone)) AND ((product_status_cache)::text = 'published'::text) AND ((color_option_status_cache)::text = 'published'::text) AND ((size_option_status_cache)::text = 'published'::text))
  • Rows Removed by Filter: 52
6. 0.004 0.004 ↑ 1.0 1 137,702

Index Scan using index_sku_catalog_price_caches_on_sku_id on sku_catalog_price_caches (cost=0.42..1.28 rows=1 width=81) (actual time=0.004..0.004 rows=1 loops=137,702)

  • Index Cond: (sku_id = skus.id)
  • Filter: ((store_id IS NULL) AND (active_at <= '2019-03-11 02:37:32.758578'::timestamp without time zone) AND ((currency_code)::text = 'HKD'::text))