explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M1mS

Settings
# exclusive inclusive rows x rows loops node
1. 0.191 11,862.856 ↑ 1.0 1,000 1

Limit (cost=666,291.35..666,346.35 rows=1,000 width=502) (actual time=11,856.720..11,862.856 rows=1,000 loops=1)

2. 0.706 11,862.665 ↑ 570.5 1,000 1

Unique (cost=666,291.35..697,666.37 rows=570,455 width=502) (actual time=11,856.718..11,862.665 rows=1,000 loops=1)

3. 6,525.423 11,861.959 ↑ 570.5 1,000 1

Sort (cost=666,291.35..667,717.49 rows=570,455 width=502) (actual time=11,856.716..11,861.959 rows=1,000 loops=1)

  • Sort Key: t.trade_id, t.id, t.created_at, t.trade_type, t.instrument_id, t.trade_date, t.settlement_date, t.is_contractual, t.schema
  • Sort Method: external merge Disk: 242,816kB
4. 1,051.947 5,336.536 ↑ 1.0 569,280 1

Gather (cost=1,000.86..354,374.85 rows=570,455 width=502) (actual time=9.083..5,336.536 rows=569,280 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 4,284.589 4,284.589 ↑ 1.3 189,760 3 / 3

Nested Loop (cost=0.86..296,329.35 rows=237,690 width=502) (actual time=5.105..4,284.589 rows=189,760 loops=3)

  • -> Parallel Index Scan using trade_actions_idx on trade_actions a (cost=0.43..24038.24 rows=238,636 width=153) (actual
  • Index Cond: (effective_date = '2020-09-18'::date)
  • -> Index Scan using trades_uq on trades t (cost=0.43..1.14 rows=1 width=322) (actual time=0.021..0.021 rows=1 loops=57
  • Index Cond: ((trade_id)::text = (a.trade_id)::text)
  • Filter: (account_id = 100,029)
  • Rows Removed by Filter: 0
Planning time : 0.725 ms
Execution time : 11,919.611 ms