explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dTmk

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.075 2.968 ↓ 17.0 51 1

Sort (cost=120.26..120.26 rows=3 width=480) (actual time=2.964..2.968 rows=51 loops=1)

  • Sort Key: fop.id
  • Sort Method: quicksort Memory: 30kB
  • Buffers: shared hit=506
2. 0.160 2.893 ↓ 17.0 51 1

Nested Loop (cost=67.83..120.23 rows=3 width=480) (actual time=0.988..2.893 rows=51 loops=1)

  • Buffers: shared hit=506
3. 0.023 0.023 ↑ 1.0 1 1

Seq Scan on provider p (cost=0..1.46 rows=1 width=116) (actual time=0.022..0.023 rows=1 loops=1)

  • Filter: (p.id = 51)
  • Buffers: shared hit=1
4. 0.034 2.710 ↓ 17.0 51 1

Nested Loop (cost=67.83..118.48 rows=3 width=244) (actual time=0.952..2.71 rows=51 loops=1)

  • Buffers: shared hit=505
5. 0.049 2.574 ↓ 17.0 51 1

Nested Loop (cost=67.56..117.35 rows=3 width=226) (actual time=0.945..2.574 rows=51 loops=1)

  • Buffers: shared hit=399
6. 0.052 2.525 ↓ 17.0 51 1

Nested Loop (cost=67.28..114.15 rows=3 width=203) (actual time=0.943..2.525 rows=51 loops=1)

  • Buffers: shared hit=399
7. 0.030 2.371 ↓ 17.0 51 1

Nested Loop (cost=67.13..113.6 rows=3 width=202) (actual time=0.938..2.371 rows=51 loops=1)

  • Buffers: shared hit=297
8. 0.041 2.239 ↓ 17.0 51 1

Nested Loop (cost=66.99..113.04 rows=3 width=201) (actual time=0.932..2.239 rows=51 loops=1)

  • Buffers: shared hit=195
9. 0.348 1.994 ↓ 17.0 51 1

Hash Join (cost=66.71..109.93 rows=3 width=166) (actual time=0.917..1.994 rows=51 loops=1)

  • Buffers: shared hit=42
10. 0.326 1.323 ↑ 1.0 662 1

Hash Join (cost=39.81..81.3 rows=662 width=74) (actual time=0.587..1.323 rows=662 loops=1)

  • Buffers: shared hit=30
11. 0.423 0.423 ↑ 1.0 662 1

Seq Scan on financial_transaction to_tr (cost=0..31.55 rows=663 width=37) (actual time=0.008..0.423 rows=662 loops=1)

  • Filter: (to_tr.sum >= '0'::numeric)
  • Buffers: shared hit=15
12. 0.210 0.574 ↓ 1.0 662 1

Hash (cost=31.55..31.55 rows=661 width=37) (actual time=0.574..0.574 rows=662 loops=1)

  • Buffers: shared hit=15
13. 0.364 0.364 ↓ 1.0 662 1

Seq Scan on financial_transaction fr_tr (cost=0..31.55 rows=661 width=37) (actual time=0.005..0.364 rows=662 loops=1)

  • Filter: (fr_tr.sum < '0'::numeric)
  • Buffers: shared hit=15
14. 0.180 0.323 ↑ 1.0 662 1

Hash (cost=18.62..18.62 rows=662 width=108) (actual time=0.323..0.323 rows=662 loops=1)

  • Buffers: shared hit=12
15. 0.143 0.143 ↑ 1.0 662 1

Seq Scan on financial_operation fop (cost=0..18.62 rows=662 width=108) (actual time=0.006..0.143 rows=662 loops=1)

  • Buffers: shared hit=12
16. 0.204 0.204 ↑ 1.0 1 51

Index Scan using idx_124355_primary on user usr (cost=0.28..1.04 rows=1 width=35) (actual time=0.004..0.004 rows=1 loops=51)

  • Index Cond: (usr.id = fop.user_id)
  • Buffers: shared hit=153
17. 0.102 0.102 ↑ 1.0 1 51

Index Scan using idx_123765_primary on currency from_curr (cost=0.14..0.18 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=51)

  • Index Cond: (from_curr.id = fr_tr.currency_id)
  • Buffers: shared hit=102
18. 0.102 0.102 ↑ 1.0 1 51

Index Scan using idx_123765_primary on currency to_curr (cost=0.14..0.18 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=51)

  • Index Cond: (to_curr.id = to_tr.currency_id)
  • Buffers: shared hit=102
19. 0.000 0.000 ↓ 0.0 0 51

Index Scan using idx_123916_primary on game game (cost=0.28..1.07 rows=1 width=23) (actual time=0..0 rows=0 loops=51)

  • Index Cond: (fop.game_id = game.id)
20. 0.102 0.102 ↓ 0.0 0 51

Index Scan using idx_123688_balance_lof_fo_fk_idx on balance_log bal (cost=0.28..0.37 rows=1 width=26) (actual time=0.002..0.002 rows=0 loops=51)

  • Index Cond: (bal.financial_operation_id = fop.id)
  • Buffers: shared hit=106
Planning time : 9.143 ms
Execution time : 3.236 ms