explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r28u

Settings
# exclusive inclusive rows x rows loops node
1. 173.635 1,032.114 ↓ 9.0 137,702 1

Hash Join (cost=62,001.11..64,303.50 rows=15,285 width=81) (actual time=768.937..1,032.114 rows=137,702 loops=1)

  • Hash Cond: (active_sku_catalog_price_caches.id = sku_catalog_price_caches.id)
2. 22.893 758.659 ↓ 9.0 137,702 1

Subquery Scan on active_sku_catalog_price_caches (cost=54,524.81..54,754.09 rows=15,285 width=16) (actual time=668.777..758.659 rows=137,702 loops=1)

3. 35.874 735.766 ↓ 9.0 137,702 1

Unique (cost=54,524.81..54,601.24 rows=15,285 width=32) (actual time=668.775..735.766 rows=137,702 loops=1)

4. 171.867 699.892 ↓ 9.0 137,702 1

Sort (cost=54,524.81..54,563.02 rows=15,285 width=32) (actual time=668.772..699.892 rows=137,702 loops=1)

  • Sort Key: sku_catalog_price_caches_1.sku_id, sku_catalog_price_caches_1.active_at DESC, sku_catalog_price_caches_1.store_id
  • Sort Method: external merge Disk: 5672kB
5. 125.178 528.025 ↓ 9.0 137,702 1

Hash Join (cost=48,540.51..53,462.52 rows=15,285 width=32) (actual time=349.535..528.025 rows=137,702 loops=1)

  • Hash Cond: (sku_catalog_price_caches_1.sku_id = skus.id)
6. 53.349 53.349 ↑ 1.0 137,702 1

Seq Scan on sku_catalog_price_caches sku_catalog_price_caches_1 (cost=0.00..4,560.53 rows=137,702 width=32) (actual time=0.013..53.349 rows=137,702 loops=1)

  • Filter: ((store_id IS NULL) AND (active_at <= '2019-03-11 02:28:22.994349'::timestamp without time zone) AND ((currency_code)::text = 'HKD'::text))
7. 50.354 349.498 ↓ 9.0 137,702 1

Hash (cost=48,348.86..48,348.86 rows=15,332 width=4) (actual time=349.498..349.498 rows=137,702 loops=1)

  • Buckets: 131072 (originally 16384) Batches: 2 (originally 1) Memory Usage: 3445kB
8. 299.144 299.144 ↓ 9.0 137,702 1

Seq Scan on skus (cost=0.00..48,348.86 rows=15,332 width=4) (actual time=0.038..299.144 rows=137,702 loops=1)

  • Filter: (usable AND (NOT dummy) AND ('2019-03-11 02:28:22.994469'::timestamp without time zone >= COALESCE(start_display_date_cache, '2019-03-09 16:00:00'::timestamp without time zone)) AND ('2019-03-11 02:28:22.994469'::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: 155
9. 67.572 99.820 ↑ 1.0 137,702 1

Hash (cost=3,872.02..3,872.02 rows=137,702 width=81) (actual time=99.820..99.820 rows=137,702 loops=1)

  • Buckets: 32768 Batches: 8 Memory Usage: 2387kB
10. 32.248 32.248 ↑ 1.0 137,702 1

Seq Scan on sku_catalog_price_caches (cost=0.00..3,872.02 rows=137,702 width=81) (actual time=0.020..32.248 rows=137,702 loops=1)