explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oVm4

Settings
# exclusive inclusive rows x rows loops node
1. 36.619 1,172.476 ↓ 9.0 137,702 1

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

2. 781.358 1,135.857 ↓ 9.0 137,702 1

Sort (cost=72,597.19..72,635.40 rows=15,285 width=2,151) (actual time=1,042.791..1,135.857 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 354.499 ↓ 9.0 137,702 1

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

  • Workers Planned: 2
  • Workers Launched: 2
4. 244.651 380.199 ↓ 7.2 45,901 3

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

5. 135.544 135.544 ↓ 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.091..135.544 rows=45,901 loops=3)

  • Filter: (usable AND (NOT dummy) AND ('2019-03-08 10:05:15.52616'::timestamp without time zone >= COALESCE(start_display_date_cache, '2019-03-02 16:00:00'::timestamp without time zone)) AND ('2019-03-08 10:05:15.52616'::timestamp without time zone <= COALESCE(end_display_date_cache, '2019-03-09 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-08 10:05:15.331055'::timestamp without time zone) AND ((currency_code)::text = 'HKD'::text))