explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hif6 : Optimization for: Optimization for: plan #lYHc; plan #99Dr

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.490 204.302 ↑ 2.2 256 1

Sort (cost=29,207.78..29,209.20 rows=567 width=2,295) (actual time=204.243..204.302 rows=256 loops=1)

  • Sort Key: main_product.is_main_color_variant DESC
  • Sort Method: quicksort Memory: 441kB
2.          

CTE main_product

3. 32.432 32.432 ↑ 1.1 53,814 1

Seq Scan on shop_catalog_product (cost=0.00..5,797.18 rows=58,558 width=224) (actual time=0.012..32.432 rows=53,814 loops=1)

  • Filter: (is_main_size_variant AND ((main_image)::text <> ''::text))
  • Rows Removed by Filter: 79,320
4. 7.231 203.812 ↑ 2.2 256 1

Hash Join (cost=21,988.25..23,384.67 rows=567 width=2,295) (actual time=129.894..203.812 rows=256 loops=1)

  • Hash Cond: (main_product.id = shop_catalog_productsupplierinfo.product_id)
5. 66.731 66.731 ↑ 1.1 53,814 1

CTE Scan on main_product (cost=0.00..1,171.16 rows=58,558 width=1,458) (actual time=0.014..66.731 rows=53,814 loops=1)

6. 2.398 129.850 ↓ 1.5 1,971 1

Hash (cost=21,972.15..21,972.15 rows=1,288 width=837) (actual time=129.849..129.850 rows=1,971 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 1,978kB
7. 127.452 127.452 ↓ 1.5 1,971 1

Seq Scan on shop_catalog_productsupplierinfo (cost=0.00..21,972.15 rows=1,288 width=837) (actual time=0.167..127.452 rows=1,971 loops=1)

  • Filter: ((remote_color_group_id IS NOT NULL) AND ((remote_color_group_id)::text = ANY ('{makros-3879822,1-000021900,makros-5944421,makros-6307900,884,1-000032034,1013,36842,108239,1-000016584,00000004253,makros-8234375,makros-4605364,makros-8469708,makros-6653143,makros-2870184,makros-9756433,makros-1144739,00000003847,701825,105977,makros-1550214,893,105082,36459,00000008288,makros-1895838,00000000386,160387,makros-7383248,makros-3915666,76158,60029,makros-7621158,00000011966,makros-9669287,makros-5140298,makros-5042068,39706}'::text[])))
  • Rows Removed by Filter: 131,155
Planning time : 0.588 ms
Execution time : 211.467 ms