explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FCFS : Optimization for: Optimization for: plan #P8rl; plan #17xl

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.313 627.695 ↓ 6.9 2,243 1

Unique (cost=128,004.37..128,009.26 rows=326 width=23) (actual time=626.156..627.695 rows=2,243 loops=1)

  • Output: source_system, instrument_id, local_security_code, security_board, oms_exchange_id
  • Buffers: shared hit=6045 read=42099
2. 14.053 626.382 ↓ 18.7 6,112 1

Sort (cost=128,004.37..128,005.18 rows=326 width=23) (actual time=626.152..626.382 rows=6,112 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: 670kB
  • Buffers: shared hit=6045 read=42099
3. 612.329 612.329 ↓ 18.7 6,112 1

Index Scan using latest_orders_td_ss_cr_idx on trade_brain.latest_orders (cost=0.58..127,990.76 rows=326 width=23) (actual time=181.593..612.329 rows=6,112 loops=1)

  • Output: source_system, instrument_id, local_security_code, security_board, oms_exchange_id
  • Index Cond: ((latest_orders.trade_date >= (to_char(to_timestamp('27-MAR-20'::text, 'DD-MON-YY HH24:mi:ss:FF3'::text), 'YYYY-MM-DD'::text))::date) AND (latest_orders.trade_date <= (to_char(to_timestamp('28-MAR-20'::text, 'DD-MON-YY HH24:mi:ss: (...)
  • 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_referen (...)
  • Rows Removed by Filter: 672647
  • Buffers: shared hit=6045 read=42099
Planning time : 0.456 ms
Execution time : 627.829 ms