explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P8rl

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.143 355,665.016 ↑ 1.4 2,632 1

Unique (cost=1,314,615.29..1,314,670.52 rows=3,681 width=23) (actual time=355,662.508..355,665.016 rows=2,632 loops=1)

  • Output: source_system, instrument_id, local_security_code, security_board, oms_exchange_id
  • Buffers: shared hit=398031 read=747952 dirtied=46 written=5152
2. 12.559 355,662.873 ↓ 2.0 7,513 1

Sort (cost=1,314,615.29..1,314,624.49 rows=3,682 width=23) (actual time=355,662.507..355,662.873 rows=7,513 loops=1)

  • Output: source_system, instrument_id, local_security_code, security_board, oms_exchange_id
  • Sort Key: latest_orders.source_system, latest_orders.instrument_id, latest_orders.local_security_code, latest_orders.security_board, latest_orders.oms_exchange_id
  • Sort Method: quicksort Memory: 779kB
  • Buffers: shared hit=398031 read=747952 dirtied=46 written=5152
3. 24.962 355,650.314 ↓ 2.0 7,513 1

Gather (cost=1,000.59..1,314,397.20 rows=3,682 width=23) (actual time=22,853.672..355,650.314 rows=7,513 loops=1)

  • Output: source_system, instrument_id, local_security_code, security_board, oms_exchange_id
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=398025 read=747952 dirtied=46 written=5152
4. 355,625.352 355,625.352 ↓ 1.6 2,504 3 / 3

Parallel Index Scan using latest_orders_td_ss_cr_idx on trade_brain.latest_orders (cost=0.58..1,313,029.00 rows=1,534 width=23) (actual time=22,844.413..355,625.352 rows=2,504 loops=3)

  • Output: source_system, instrument_id, local_security_code, security_board, oms_exchange_id
  • Index Cond: ((latest_orders.trade_date >= (to_char(to_timestamp('19-MAY-20'::text, 'DD-MON-YY HH24:mi:ss:FF3'::text), 'YYYY-MM-DD'::text))::date) AND (latest_orders.trade_date <= (to_char(to_timestamp('20-MAY-20'::text, 'DD-MON-YY HH24: (...)
  • Filter: (CASE WHEN (((latest_orders.source_system)::text = 'LIQUID'::text) AND ((latest_orders.exchange_id)::text = ANY ('{JTOS,JCHX,JSBI,JTSE}'::text[])) AND ((latest_orders.order_rank)::text = 'CLOG'::text) AND (latest_orders.client_r (...)
  • Rows Removed by Filter: 396549
  • Buffers: shared hit=398025 read=747952 dirtied=46 written=5152
  • Worker 0: actual time=22833.838..355642.716 rows=2769 loops=1
  • Buffers: shared hit=128262 read=247011 dirtied=13 written=1730
  • Worker 1: actual time=22846.873..355620.011 rows=2309 loops=1
  • Buffers: shared hit=140261 read=260824 dirtied=18 written=1576
Planning time : 1.605 ms
Execution time : 355,665.618 ms