explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JVci

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 3,515.970 3,551.791 ↑ 1.0 1,000 1

Hash Left Join (cost=335.88..2,399.81 rows=1,000 width=1,009) (actual time=34.876..3,551.791 rows=1,000 loops=1)

  • Hash Cond: ((counters.bank_code)::text = (insts.code)::text)
2. 5.137 35.560 ↑ 1.0 1,000 1

Hash Right Join (cost=328.10..389.33 rows=1,000 width=1,343) (actual time=29.735..35.560 rows=1,000 loops=1)

  • Hash Cond: ((traders.code)::text = (counters.trader_code)::text)
3. 0.734 0.734 ↑ 1.0 2,149 1

Seq Scan on trader traders (cost=0.00..40.49 rows=2,149 width=21) (actual time=0.020..0.734 rows=2,149 loops=1)

4. 2.211 29.689 ↑ 1.0 1,000 1

Hash (cost=315.60..315.60 rows=1,000 width=1,329) (actual time=29.689..29.689 rows=1,000 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 375kB
5. 1.741 27.478 ↑ 1.0 1,000 1

Hash Left Join (cost=265.02..315.60 rows=1,000 width=1,329) (actual time=11.468..27.478 rows=1,000 loops=1)

  • Hash Cond: ((counterb.trader_code)::text = (traderb.code)::text)
6. 1.537 22.664 ↑ 1.0 1,000 1

Hash Left Join (cost=197.67..245.62 rows=1,000 width=1,315) (actual time=8.373..22.664 rows=1,000 loops=1)

  • Hash Cond: ((counterb.bank_code)::text = (instb.code)::text)
7. 1.650 20.899 ↑ 1.0 1,000 1

Hash Left Join (cost=189.89..235.15 rows=1,000 width=1,286) (actual time=8.124..20.899 rows=1,000 loops=1)

  • Hash Cond: ((exu.underlying_code)::text = (u.code)::text)
8. 1.416 19.213 ↑ 1.0 1,000 1

Hash Left Join (cost=176.96..219.51 rows=1,000 width=770) (actual time=8.067..19.213 rows=1,000 loops=1)

  • Hash Cond: (t.seller_counterparty_id = counters.id)
9. 1.441 14.896 ↑ 1.0 1,000 1

Hash Left Join (cost=110.43..150.35 rows=1,000 width=756) (actual time=5.154..14.896 rows=1,000 loops=1)

  • Hash Cond: (t.buyer_counterparty_id = counterb.id)
10. 1.345 10.568 ↑ 1.0 1,000 1

Hash Join (cost=43.90..81.20 rows=1,000 width=742) (actual time=2.248..10.568 rows=1,000 loops=1)

  • Hash Cond: (si.strategy_template_id = st.template_id)
11. 1.436 9.017 ↑ 1.0 1,000 1

Hash Join (cost=39.31..73.88 rows=1,000 width=712) (actual time=2.029..9.017 rows=1,000 loops=1)

  • Hash Cond: (si.exchange_underlying_id = exu.id)
12. 1.621 7.509 ↑ 1.0 1,000 1

Hash Join (cost=37.50..69.14 rows=1,000 width=644) (actual time=1.939..7.509 rows=1,000 loops=1)

  • Hash Cond: (t.strategy_instance_id = si.id)
13. 3.991 3.991 ↑ 1.0 1,000 1

Seq Scan on trade t (cost=0.00..29.00 rows=1,000 width=613) (actual time=0.026..3.991 rows=1,000 loops=1)

14. 0.913 1.897 ↑ 1.0 1,000 1

Hash (cost=25.00..25.00 rows=1,000 width=35) (actual time=1.897..1.897 rows=1,000 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 75kB
15. 0.984 0.984 ↑ 1.0 1,000 1

Seq Scan on strategy_instance si (cost=0.00..25.00 rows=1,000 width=35) (actual time=0.010..0.984 rows=1,000 loops=1)

16. 0.043 0.072 ↑ 1.0 36 1

Hash (cost=1.36..1.36 rows=36 width=72) (actual time=0.072..0.072 rows=36 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
17. 0.029 0.029 ↑ 1.0 36 1

Seq Scan on exchange_underlying exu (cost=0.00..1.36 rows=36 width=72) (actual time=0.009..0.029 rows=36 loops=1)

18. 0.112 0.206 ↑ 1.0 115 1

Hash (cost=3.15..3.15 rows=115 width=34) (actual time=0.206..0.206 rows=115 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
19. 0.094 0.094 ↑ 1.0 115 1

Seq Scan on strategy_template st (cost=0.00..3.15 rows=115 width=34) (actual time=0.015..0.094 rows=115 loops=1)

20. 1.549 2.887 ↑ 1.0 2,157 1

Hash (cost=39.57..39.57 rows=2,157 width=18) (actual time=2.887..2.887 rows=2,157 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 143kB
21. 1.338 1.338 ↑ 1.0 2,157 1

Seq Scan on counterparty counterb (cost=0.00..39.57 rows=2,157 width=18) (actual time=0.015..1.338 rows=2,157 loops=1)

22. 1.575 2.901 ↑ 1.0 2,157 1

Hash (cost=39.57..39.57 rows=2,157 width=18) (actual time=2.901..2.901 rows=2,157 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 143kB
23. 1.326 1.326 ↑ 1.0 2,157 1

Seq Scan on counterparty counters (cost=0.00..39.57 rows=2,157 width=18) (actual time=0.015..1.326 rows=2,157 loops=1)

24. 0.016 0.036 ↑ 7.2 18 1

Hash (cost=11.30..11.30 rows=130 width=548) (actual time=0.036..0.036 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
25. 0.020 0.020 ↑ 7.2 18 1

Seq Scan on underlying u (cost=0.00..11.30 rows=130 width=548) (actual time=0.011..0.020 rows=18 loops=1)

26. 0.121 0.228 ↓ 1.0 169 1

Hash (cost=5.68..5.68 rows=168 width=36) (actual time=0.228..0.228 rows=169 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
27. 0.107 0.107 ↓ 1.0 169 1

Seq Scan on institution instb (cost=0.00..5.68 rows=168 width=36) (actual time=0.009..0.107 rows=169 loops=1)

28. 1.691 3.073 ↑ 1.0 2,149 1

Hash (cost=40.49..40.49 rows=2,149 width=21) (actual time=3.073..3.073 rows=2,149 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 146kB
29. 1.382 1.382 ↑ 1.0 2,149 1

Seq Scan on trader traderb (cost=0.00..40.49 rows=2,149 width=21) (actual time=0.038..1.382 rows=2,149 loops=1)

30. 0.159 0.261 ↓ 1.0 169 1

Hash (cost=5.68..5.68 rows=168 width=36) (actual time=0.261..0.261 rows=169 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
31. 0.102 0.102 ↓ 1.0 169 1

Seq Scan on institution insts (cost=0.00..5.68 rows=168 width=36) (actual time=0.009..0.102 rows=169 loops=1)

Planning time : 5.943 ms
Execution time : 3,552.738 ms