explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LUDp : Optimization for: plan #HzH3

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 45.228 152.073 ↓ 0.0 0 1

Gather (cost=1,001.83..4,353,200.35 rows=1,716 width=5,013) (actual time=149.111..152.073 rows=0 loops=1)

  • Output: orderhist.uuid, orderhist.source_system, orderhist.ldm_version, orderhist.model_name, orderhist.order_id, orderhist.client_reference, orderhist.created_timestamp, orderhist.dealer_id, orderhist.oms_exchange_id, orderhist.dealer_instruction, order (...)
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=18179
2. 0.001 106.845 ↓ 0.0 0 3 / 3

Nested Loop (cost=1.82..4,352,028.75 rows=715 width=5,013) (actual time=106.845..106.845 rows=0 loops=3)

  • Output: orderhist.uuid, orderhist.source_system, orderhist.ldm_version, orderhist.model_name, orderhist.order_id, orderhist.client_reference, orderhist.created_timestamp, orderhist.dealer_id, orderhist.oms_exchange_id, orderhist.dealer_instruction, (...)
  • Join Filter: ((sglord.order_id)::text = (orderhist.order_id)::text)
  • Buffers: shared hit=18179
  • Worker 0: actual time=87.582..87.582 rows=0 loops=1
  • Buffers: shared hit=3972
  • Worker 1: actual time=87.579..87.579 rows=0 loops=1
  • Buffers: shared hit=4316
3. 0.011 106.844 ↓ 0.0 0 3 / 3

Nested Loop (cost=1.13..766,784.38 rows=17,868 width=3,264) (actual time=106.844..106.844 rows=0 loops=3)

  • Output: sglord.uuid, sglord.source_system, sglord.ldm_version, sglord.model_name, sglord.order_id, sglord.client_reference, sglord.created_timestamp, sglord.dealer_id, sglord.oms_exchange_id, sglord.dealer_instruction, sglord.daily_cumulative (...)
  • Buffers: shared hit=18179
  • Worker 0: actual time=87.581..87.581 rows=0 loops=1
  • Buffers: shared hit=3972
  • Worker 1: actual time=87.578..87.578 rows=0 loops=1
  • Buffers: shared hit=4316
4. 106.833 106.833 ↓ 0.0 0 3 / 3

Parallel Index Scan using latest_orders_td_ss_cr_idx on trade_brain.latest_orders sglord (cost=0.56..559,906.36 rows=25,712 width=2,278) (actual time=106.833..106.833 rows=0 loops=3)

  • Output: sglord.uuid, sglord.source_system, sglord.ldm_version, sglord.model_name, sglord.order_id, sglord.client_reference, sglord.created_timestamp, sglord.dealer_id, sglord.oms_exchange_id, sglord.dealer_instruction, sglord.daily_cumu (...)
  • Index Cond: ((sglord.trade_date >= '2020-01-20'::date) AND (sglord.trade_date <= '2020-02-06'::date) AND (sglord.client_reference = 5151411))
  • Filter: (((sglord.order_rank)::text <> 'ALOG'::text) AND ((sglord.exchange_id)::text = ANY ('{JTOS,JCHX,JSBI,JTSE,SEHK,NSE,BSE}'::text[])))
  • Rows Removed by Filter: 12420
  • Buffers: shared hit=18179
  • Worker 0: actual time=87.557..87.558 rows=0 loops=1
  • Buffers: shared hit=3972
  • Worker 1: actual time=87.573..87.573 rows=0 loops=1
  • Buffers: shared hit=4316
5. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using latest_new_order_request_pkey on trade_brain.latest_new_order_request neworderreq (cost=0.56..8.04 rows=1 width=986) (never executed)

  • Output: neworderreq.uuid, neworderreq.source_system, neworderreq.ldm_version, neworderreq.model_name, neworderreq.order_id, neworderreq.trade_date, neworderreq.parent_order_id, neworderreq.client_id, neworderreq.client_order_id, neworde (...)
  • Index Cond: ((neworderreq.order_id)::text = (sglord.order_id)::text)
6. 0.000 0.000 ↓ 0.0 0 / 3

Index Scan using orders_order_id_last_modified_event_type_idx on trade_brain_data.orders orderhist (cost=0.70..200.63 rows=2 width=1,749) (never executed)

  • Output: orderhist.uuid, orderhist.source_system, orderhist.ldm_version, orderhist.model_name, orderhist.order_id, orderhist.client_reference, orderhist.created_timestamp, orderhist.dealer_id, orderhist.oms_exchange_id, orderhist.dealer_instru (...)
  • Index Cond: (((orderhist.order_id)::text = (neworderreq.order_id)::text) AND ((orderhist.last_modified_event_type)::text = 'NEW_ACCEPTED'::text))
  • Filter: ((orderhist.created_timestamp >= to_timestamp(concat('2020-01-20', ' 21:00:01'), 'YYYY-MM-DD hh24:mi:ss'::text)) AND (orderhist.created_timestamp <= to_timestamp(concat('2020-02-06', ' 21:00:00'), 'YYYY-MM-DD hh24:mi:ss'::text)))
Planning time : 84.493 ms
Execution time : 152.588 ms