explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M9dc

Settings
# exclusive inclusive rows x rows loops node
1. 176.197 1,041.069 ↓ 9.0 137,701 1

Hash Join (cost=61,994.66..64,297.05 rows=15,285 width=81) (actual time=773.951..1,041.069 rows=137,701 loops=1)

  • Hash Cond: (active_sku_catalog_price_caches.id = sku_catalog_price_caches.id)
2. 22.964 777.642 ↓ 9.0 137,701 1

Subquery Scan on active_sku_catalog_price_caches (cost=54,518.36..54,747.64 rows=15,285 width=16) (actual time=686.455..777.642 rows=137,701 loops=1)

3. 36.775 754.678 ↓ 9.0 137,701 1

Unique (cost=54,518.36..54,594.79 rows=15,285 width=32) (actual time=686.452..754.678 rows=137,701 loops=1)

4. 178.250 717.903 ↓ 9.0 137,701 1

Sort (cost=54,518.36..54,556.57 rows=15,285 width=32) (actual time=686.450..717.903 rows=137,701 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. 132.994 539.653 ↓ 9.0 137,701 1

Hash Join (cost=48,534.06..53,456.07 rows=15,285 width=32) (actual time=353.469..539.653 rows=137,701 loops=1)

  • Hash Cond: (sku_catalog_price_caches_1.sku_id = skus.id)
6. 53.276 53.276 ↑ 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.015..53.276 rows=137,702 loops=1)

  • Filter: ((store_id IS NULL) AND (active_at <= '2019-03-11 05:08:52.573044'::timestamp without time zone) AND ((currency_code)::text = 'HKD'::text))
7. 50.187 353.383 ↓ 9.0 137,701 1

Hash (cost=48,342.78..48,342.78 rows=15,302 width=4) (actual time=353.383..353.383 rows=137,701 loops=1)

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

Seq Scan on skus (cost=0.00..48,342.78 rows=15,302 width=4) (actual time=0.036..303.196 rows=137,701 loops=1)

  • Filter: (usable AND (NOT dummy) AND ('2019-03-11 05:08:52.57317'::timestamp without time zone >= COALESCE(start_display_date_cache, '2019-03-09 16:00:00'::timestamp without time zone)) AND ('2019-03-11 05:08:52.57317'::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: 156
9. 63.586 87.230 ↑ 1.0 137,702 1

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

  • Buckets: 32768 Batches: 8 Memory Usage: 2387kB
10. 23.644 23.644 ↑ 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.011..23.644 rows=137,702 loops=1)