explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Maqa

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 4,576.378 ↓ 0.0 0 1

Sort (cost=5,284.98..5,286.26 rows=514 width=70) (actual time=4,576.378..4,576.378 rows=0 loops=1)

  • Sort Key: tb_operation_bonds.id_basket, tb_operation_bonds.seq
  • Sort Method: quicksort Memory: 25kB
2. 0.000 4,576.371 ↓ 0.0 0 1

Nested Loop (cost=2.11..5,261.83 rows=514 width=70) (actual time=4,576.371..4,576.371 rows=0 loops=1)

3. 0.001 4,576.371 ↓ 0.0 0 1

Nested Loop (cost=1.69..2,684.50 rows=1 width=72) (actual time=4,576.371..4,576.371 rows=0 loops=1)

4. 1,025.014 4,576.370 ↓ 0.0 0 1

Nested Loop (cost=1.27..2,682.36 rows=1 width=55) (actual time=4,576.370..4,576.370 rows=0 loops=1)

5. 275.489 1,131.885 ↓ 1,528.4 2,419,471 1

Nested Loop (cost=0.85..1,973.83 rows=1,583 width=26) (actual time=2.175..1,131.885 rows=2,419,471 loops=1)

6. 2.157 2.157 ↑ 1.0 1 1

Index Scan using tb_investor_broker_account_idx0 on tb_investor_broker_account (cost=0.42..1,171.96 rows=1 width=16) (actual time=2.155..2.157 rows=1 loops=1)

  • Index Cond: (account_number = '88840020'::bigint)
  • Filter: (id_contract = 8)
7. 854.239 854.239 ↓ 2,661.7 2,419,471 1

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

  • Index Cond: (id_investor = tb_investor_broker_account.id_investor)
  • Filter: (tb_investor_broker_account.id_broker = id_broker)
8. 2,419.471 2,419.471 ↓ 0.0 0 2,419,471

Index Scan using tb_operation_bonds_pk on tb_operation_bonds (cost=0.41..0.44 rows=1 width=37) (actual time=0.001..0.001 rows=0 loops=2,419,471)

  • Index Cond: ((id_broker = '13'::smallint) AND (id_operation = tb_operation.id_operation))
  • Filter: ((dt_pre_settl_money IS NULL) AND (dt_settl_money IS NULL) AND (dt_settl_custody IS NULL) AND (cd_side = 'B'::bpchar))
9. 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)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using tb_oms_account_pk on tb_oms_account (cost=0.42..2,572.19 rows=514 width=13) (never executed)

  • Index Cond: (id_broker = tb_operation.id_broker)
  • Filter: ((account)::bigint = '88840020'::bigint)