explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4m8K

Settings
# exclusive inclusive rows x rows loops node
1. 3,601.652 61,868.275 ↑ 3.5 440,840 1

Unique (cost=10,279,019.71..11,290,019.96 rows=1,555,385 width=2,278) (actual time=57,876.817..61,868.275 rows=440,840 loops=1)

2. 39,885.482 58,266.623 ↓ 1.0 1,597,358 1

Sort (cost=10,279,019.71..10,282,908.17 rows=1,555,385 width=2,278) (actual time=57,876.815..58,266.623 rows=1,597,358 loops=1)

  • Sort Key: a.id, a.id_bank, a.id_status_produkt, a.id_produkt_bank, a.id_waluta, a.nr_umowy, a.data_umowy, a.data_start, a.data_stop, a.termin_stop, a.iban, a.id_portfel, a.data_ins, a.opr_ins, a.data_up, a.opr_up, a.b_id, a.data_import, a.numer_spr (...)
  • Sort Method: external sort Disk: 595376kB
3. 6,010.041 18,381.141 ↓ 1.0 1,597,358 1

WindowAgg (cost=5,483,027.80..5,525,800.88 rows=1,555,385 width=2,278) (actual time=11,830.563..18,381.141 rows=1,597,358 loops=1)

4. 3,585.375 12,371.100 ↓ 1.0 1,597,358 1

Sort (cost=5,483,027.80..5,486,916.26 rows=1,555,385 width=2,278) (actual time=11,830.537..12,371.100 rows=1,597,358 loops=1)

  • Sort Key: a.id, bp_stan_produkt.data_od DESC
  • Sort Method: external sort Disk: 570672kB
5. 1,138.907 8,785.725 ↓ 1.0 1,597,358 1

Hash Left Join (cost=57,714.02..729,808.97 rows=1,555,385 width=2,278) (actual time=326.900..8,785.725 rows=1,597,358 loops=1)

  • Hash Cond: ((bp_stan_produkt.id_podstan_produkt = d2.id) AND (a.id_bank = d2.id_bank))
6. 1,195.215 7,637.452 ↓ 1.0 1,597,358 1

Hash Left Join (cost=57,493.97..514,082.03 rows=1,555,385 width=2,263) (actual time=317.501..7,637.452 rows=1,597,358 loops=1)

  • Hash Cond: ((bp_stan_produkt.id_stan_produkt = d1.id) AND (a.id_bank = d1.id_bank))
7. 1,182.513 6,430.011 ↓ 1.0 1,597,358 1

Hash Left Join (cost=57,401.97..335,120.76 rows=1,555,385 width=2,248) (actual time=305.260..6,430.011 rows=1,597,358 loops=1)

  • Hash Cond: ((a.id_status_produkt = d_bp_status_produkt.id) AND (a.id_bank = d_bp_status_produkt.id_bank))
8. 1,232.893 5,247.344 ↓ 1.0 1,597,358 1

Merge Left Join (cost=57,385.77..280,666.08 rows=1,555,385 width=2,234) (actual time=305.084..5,247.344 rows=1,597,358 loops=1)

  • Merge Cond: (a.id = bp_stan_produkt.id_produkt)
9. 714.205 1,504.880 ↑ 1.0 440,840 1

Merge Left Join (cost=57,380.06..139,516.26 rows=440,840 width=2,202) (actual time=305.064..1,504.880 rows=440,840 loops=1)

  • Merge Cond: (a.id = z.id_produkt)
10. 342.502 342.502 ↑ 1.0 440,840 1

Index Scan using bp_produkt_pkey on bp_produkt a (cost=0.42..73,320.26 rows=440,840 width=2,196) (actual time=0.007..342.502 rows=440,840 loops=1)

11. 70.419 448.173 ↑ 1.0 440,840 1

Materialize (cost=57,379.42..59,583.62 rows=440,840 width=14) (actual time=305.044..448.173 rows=440,840 loops=1)

12. 283.050 377.754 ↑ 1.0 440,840 1

Sort (cost=57,379.42..58,481.52 rows=440,840 width=14) (actual time=305.039..377.754 rows=440,840 loops=1)

  • Sort Key: z.id_produkt
  • Sort Method: external sort Disk: 11456kB
13. 94.704 94.704 ↑ 1.0 440,840 1

Seq Scan on an_mz_saldo_akt z (cost=0.00..8,515.40 rows=440,840 width=14) (actual time=7.573..94.704 rows=440,840 loops=1)

14. 2,509.571 2,509.571 ↑ 1.0 1,555,385 1

Index Scan using idxbp_stan_produkt_id_produkt on bp_stan_produkt (cost=0.43..120,605.41 rows=1,555,385 width=40) (actual time=0.014..2,509.571 rows=1,555,385 loops=1)

15. 0.065 0.154 ↑ 1.0 408 1

Hash (cost=10.08..10.08 rows=408 width=30) (actual time=0.154..0.154 rows=408 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
16. 0.089 0.089 ↑ 1.0 408 1

Seq Scan on d_bp_status_produkt (cost=0.00..10.08 rows=408 width=30) (actual time=0.011..0.089 rows=408 loops=1)

17. 0.404 12.226 ↑ 1.0 2,040 1

Hash (cost=61.40..61.40 rows=2,040 width=39) (actual time=12.226..12.226 rows=2,040 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 165kB
18. 11.822 11.822 ↑ 1.0 2,040 1

Seq Scan on d_bp_stan_produkt d1 (cost=0.00..61.40 rows=2,040 width=39) (actual time=5.532..11.822 rows=2,040 loops=1)

19. 1.008 9.366 ↑ 1.0 5,202 1

Hash (cost=142.02..142.02 rows=5,202 width=39) (actual time=9.366..9.366 rows=5,202 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 443kB
20. 8.358 8.358 ↑ 1.0 5,202 1

Seq Scan on d_bp_podstan_produkt d2 (cost=0.00..142.02 rows=5,202 width=39) (actual time=0.004..8.358 rows=5,202 loops=1)

Planning time : 369.346 ms