explain.depesz.com

PostgreSQL's explain analyze made readable

Result: H3gM

Settings
# exclusive inclusive rows x rows loops node
1. 569.126 16,724.675 ↑ 1.0 440,840 1

Unique (cost=5,483,027.80..5,529,689.35 rows=440,840 width=2,278) (actual time=10,032.746..16,724.675 rows=440,840 loops=1)

2. 5,669.620 16,155.549 ↓ 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=10,032.740..16,155.549 rows=1,597,358 loops=1)

3. 3,470.023 10,485.929 ↓ 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=10,032.716..10,485.929 rows=1,597,358 loops=1)

  • Sort Key: a.id, bp_stan_produkt.data_od DESC
  • Sort Method: external sort Disk: 570672kB
4. 1,131.338 7,015.906 ↓ 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=261.340..7,015.906 rows=1,597,358 loops=1)

  • Hash Cond: ((bp_stan_produkt.id_podstan_produkt = d2.id) AND (a.id_bank = d2.id_bank))
5. 1,180.394 5,882.946 ↓ 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=259.704..5,882.946 rows=1,597,358 loops=1)

  • Hash Cond: ((bp_stan_produkt.id_stan_produkt = d1.id) AND (a.id_bank = d1.id_bank))
6. 1,170.667 4,701.865 ↓ 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=259.007..4,701.865 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))
7. 1,229.656 3,531.069 ↓ 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=258.856..3,531.069 rows=1,597,358 loops=1)

  • Merge Cond: (a.id = bp_stan_produkt.id_produkt)
8. 705.039 1,372.499 ↑ 1.0 440,840 1

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

  • Merge Cond: (a.id = z.id_produkt)
9. 272.567 272.567 ↑ 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.013..272.567 rows=440,840 loops=1)

10. 66.706 394.893 ↑ 1.0 440,840 1

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

11. 273.897 328.187 ↑ 1.0 440,840 1

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

  • Sort Key: z.id_produkt
  • Sort Method: external sort Disk: 11456kB
12. 54.290 54.290 ↑ 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=0.008..54.290 rows=440,840 loops=1)

13. 928.914 928.914 ↑ 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.016..928.914 rows=1,555,385 loops=1)

14. 0.066 0.129 ↑ 1.0 408 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
15. 0.063 0.063 ↑ 1.0 408 1

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

16. 0.321 0.687 ↑ 1.0 2,040 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 165kB
17. 0.366 0.366 ↑ 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=0.003..0.366 rows=2,040 loops=1)

18. 0.816 1.622 ↑ 1.0 5,202 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 443kB
19. 0.806 0.806 ↑ 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..0.806 rows=5,202 loops=1)

Planning time : 2.115 ms