explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lQBW

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 2,139.220 ↓ 0.0 0 1

Sort (cost=1,310.04..1,310.04 rows=1 width=70) (actual time=2,139.220..2,139.220 rows=0 loops=1)

  • Sort Key: tb_operation_bonds.id_basket, tb_operation_bonds.seq
  • Sort Method: quicksort Memory: 25kB
2. 0.001 2,139.213 ↓ 0.0 0 1

Nested Loop (cost=55.74..1,310.03 rows=1 width=70) (actual time=2,139.213..2,139.213 rows=0 loops=1)

3. 405.801 2,139.212 ↓ 0.0 0 1

Hash Join (cost=55.32..1,307.88 rows=1 width=53) (actual time=2,139.211..2,139.212 rows=0 loops=1)

  • Hash Cond: (tb_operation_bonds.id_operation = tb_operation.id_operation)
4. 3.644 3.644 ↑ 48.7 37 1

Index Scan using tb_operation_bonds_id_broker_account_cblc_cd_side_dt_pre_se_idx on tb_operation_bonds (cost=0.41..1,246.21 rows=1,802 width=37) (actual time=0.352..3.644 rows=37 loops=1)

  • Index Cond: ((cd_side = 'B'::bpchar) AND (dt_pre_settl_money IS NULL) AND (dt_settl_money IS NULL))
  • Filter: (dt_settl_custody IS NULL)
5. 664.612 1,729.767 ↓ 1,528.4 2,419,471 1

Hash (cost=35.12..35.12 rows=1,583 width=24) (actual time=1,729.767..1,729.767 rows=2,419,471 loops=1)

  • Buckets: 1,048,576 (originally 2048) Batches: 4 (originally 1) Memory Usage: 57,345kB
6. 276.075 1,065.155 ↓ 1,528.4 2,419,471 1

Nested Loop (cost=1.27..35.12 rows=1,583 width=24) (actual time=0.038..1,065.155 rows=2,419,471 loops=1)

7. 0.005 0.032 ↑ 1.0 1 1

Nested Loop (cost=0.84..4.89 rows=1 width=20) (actual time=0.028..0.032 rows=1 loops=1)

8. 0.018 0.018 ↑ 1.0 1 1

Index Scan using tb_oms_account_pk on tb_oms_account (cost=0.42..2.44 rows=1 width=13) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: ((id_broker = '13'::smallint) AND ((account)::text = '88840020'::text))
9. 0.009 0.009 ↑ 1.0 1 1

Index Scan using tb_investor_broker_account_idx0 on tb_investor_broker_account (cost=0.42..2.44 rows=1 width=16) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: ((id_broker = '13'::smallint) AND (account_number = (tb_oms_account.account)::bigint))
  • Filter: (id_contract = 8)
10. 789.048 789.048 ↓ 2,661.7 2,419,471 1

Index Scan using tb_operation_id_investor_idx on tb_operation (cost=0.43..21.13 rows=909 width=18) (actual time=0.009..789.048 rows=2,419,471 loops=1)

  • Index Cond: (id_investor = tb_investor_broker_account.id_investor)
  • Filter: (id_broker = '13'::smallint)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_instrument_pk on tb_instrument (cost=0.42..2.14 rows=1 width=33) (never executed)

  • Index Cond: (id_instrument = tb_operation_bonds.id_instrument)