explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DEgD

Settings
# exclusive inclusive rows x rows loops node
1. 21.437 139.715 ↑ 1.0 50 1

Limit (cost=1,001.14..148,145.12 rows=50 width=68) (actual time=6.339..139.715 rows=50 loops=1)

  • Output: simple0_.ws_simple_id, config1_.ws_config_id
  • Buffers: shared hit=3987 read=1124
2. 0.000 118.278 ↑ 10.7 50 1

Nested Loop (cost=1,001.14..1,578,384.68 rows=536 width=68) (actual time=6.338..118.278 rows=50 loops=1)

  • Output: simple0_.ws_simple_id, config1_.ws_config_id
  • Buffers: shared hit=1534 read=102
3. 0.000 138.469 ↑ 31.9 9 1

Gather Merge (cost=1,000.58..1,015,792.24 rows=287 width=147) (actual time=6.282..138.469 rows=9 loops=1)

  • Output: config1_.ws_config_id, config1_.country_of_origin, config1_.material_composition
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=3052 read=1124
4. 286.668 286.668 ↑ 24.0 5 3

Parallel Index Scan using article_pkey on wholesale_articles.wholesale_config config1_ (cost=0.55..1,014,759.09 rows=120 width=147) (actual time=0.251..95.556 rows=5 loops=3)

  • Output: config1_.ws_config_id, config1_.country_of_origin, config1_.material_composition
  • Filter: (((config1_.supplier_code)::text = 'K71407'::text) AND ((config1_.season_code)::text = 'FS20'::text) AND ((config1_.brand_code)::text = ANY ('{CO4,DE1,JOC,NI2,NI5,NI4,N12,NIC,NS4,NI1,N13}'::text[])))
  • Rows Removed by Filter: 1450
  • Buffers: shared hit=3052 read=1124
  • Worker 0: actual time=0.154..114.200 rows=4 loops=1
  • Buffers: shared hit=1222 read=496
  • Worker 1: actual time=0.144..133.512 rows=8 loops=1
  • Buffers: shared hit=1231 read=526
5. 0.156 1.206 ↑ 1.0 6 9

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.042..0.134 rows=6 loops=9)

  • 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))
  • Buffers: shared hit=935
6.          

SubPlan (for Index Scan)

7. 0.100 1.050 ↑ 1.0 1 50

Aggregate (cost=81.03..81.04 rows=1 width=8) (actual time=0.021..0.021 rows=1 loops=50)

  • Output: count(externalar95_.reference_id)
  • Buffers: shared hit=860
8. 0.950 0.950 ↑ 1.5 12 50

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.011..0.019 rows=12 loops=50)

  • 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=860
Planning time : 0.460 ms
Execution time : 139.765 ms