explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZRp4

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 22,420.533 ↑ 1.0 500 1

Limit (cost=563,819.63..563,820.88 rows=500 width=68) (actual time=22,420.471..22,420.533 rows=500 loops=1)

  • Output: simple0_.ws_simple_id, config1_.ws_config_id
  • Buffers: shared hit=1201689 read=92122
2. 35.556 22,420.492 ↑ 1.1 500 1

Sort (cost=563,819.63..563,820.97 rows=536 width=68) (actual time=22,420.470..22,420.492 rows=500 loops=1)

  • Output: simple0_.ws_simple_id, config1_.ws_config_id
  • Sort Key: config1_.ws_config_id
  • Sort Method: top-N heapsort Memory: 112kB
  • Buffers: shared hit=1201689 read=92122
3. 17.381 22,384.936 ↓ 129.0 69,121 1

Nested Loop (cost=0.99..563,795.33 rows=536 width=68) (actual time=0.700..22,384.936 rows=69,121 loops=1)

  • Output: simple0_.ws_simple_id, config1_.ws_config_id
  • Buffers: shared hit=1201689 read=92122
4. 116.612 116.612 ↓ 31.9 9,153 1

Index Scan using wholesale_config_supplier_code_brand_code_season_code_index on wholesale_articles.wholesale_config config1_ (cost=0.43..1,202.89 rows=287 width=147) (actual time=0.073..116.612 rows=9,153 loops=1)

  • Output: config1_.ws_config_id, config1_.country_of_origin, config1_.material_composition
  • Index Cond: (((config1_.supplier_code)::text = 'K71407'::text) AND ((config1_.brand_code)::text = ANY ('{CO4,DE1,JOC,NI2,NI5,NI4,N12,NIC,NS4,NI1,N13}'::text[])) AND ((config1_.season_code)::text = 'FS20'::text))
  • Buffers: shared hit=5707 read=2641
5. 892.554 22,250.943 ↓ 1.3 8 9,153

Index Scan using simple_ws_config_id on wholesale_articles.wholesale_simple simple0_ (cost=0.56..1,960.19 rows=6 width=299) (actual time=0.453..2.431 rows=8 loops=9,153)

  • Output: simple0_.ws_simple_id, simple0_.ws_config_id, simple0_.recommended_retail_price, simple0_.gtin
  • Index Cond: ((simple0_.ws_config_id)::text = (config1_.ws_config_id)::text)
  • Filter: ((NOT simple0_.deleted) AND ((config1_.country_of_origin IS NULL) OR (config1_.material_composition IS NULL) OR (simple0_.recommended_retail_price IS NULL) OR (simple0_.gtin IS NULL)) AND ((SubPlan 1) >= 0))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=1195982 read=89481
6.          

SubPlan (for Index Scan)

7. 138.242 21,358.389 ↑ 1.0 1 69,121

Aggregate (cost=81.03..81.04 rows=1 width=8) (actual time=0.309..0.309 rows=1 loops=69,121)

  • Output: count(externalar95_.reference_id)
  • Buffers: shared hit=1127202 read=81154
8. 21,220.147 21,220.147 ↑ 1.4 13 69,121

Index Scan using external_article_reference_by_simple_id on wholesale_articles.external_article_reference externalar95_ (cost=0.56..80.99 rows=18 width=11) (actual time=0.238..0.307 rows=13 loops=69,121)

  • Output: externalar95_.ws_simple_id, externalar95_.referencing_type, externalar95_.reference_id, externalar95_.reference_status, externalar95_.delivery_date_from
  • Index Cond: ((externalar95_.ws_simple_id)::text = (simple0_.ws_simple_id)::text)
  • Filter: (((externalar95_.referencing_type)::text = ANY ('{PO,LEGACY_PO}'::text[])) AND ((externalar95_.reference_status)::text <> 'CANCELED'::text))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=1127202 read=81154
Planning time : 3.186 ms
Execution time : 22,420.620 ms