explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4OwV

Settings
# exclusive inclusive rows x rows loops node
1. 16.880 6,180.417 ↓ 1.4 61,170 1

Nested Loop Left Join (cost=82,052.23..178,248.48 rows=45,097 width=201) (actual time=688.652..6,180.417 rows=61,170 loops=1)

2. 195.658 964.087 ↓ 1.4 61,170 1

Hash Right Join (cost=82,051.81..117,065.96 rows=45,097 width=189) (actual time=661.733..964.087 rows=61,170 loops=1)

  • Hash Cond: (s.id_produkt = a.id)
3. 140.940 140.940 ↓ 1.1 440,840 1

Seq Scan on an_v_sprawy s (cost=0.00..20,956.74 rows=391,874 width=96) (actual time=0.008..140.940 rows=440,840 loops=1)

4. 21.434 627.489 ↓ 1.4 61,170 1

Hash (cost=80,783.10..80,783.10 rows=45,097 width=101) (actual time=627.489..627.489 rows=61,170 loops=1)

  • Buckets: 32768 (originally 32768) Batches: 4 (originally 2) Memory Usage: 3841kB
5. 108.919 606.055 ↓ 1.4 61,170 1

Hash Right Join (cost=55,954.70..80,783.10 rows=45,097 width=101) (actual time=360.857..606.055 rows=61,170 loops=1)

  • Hash Cond: (d.id_produkt = a.id)
6. 136.537 136.537 ↓ 1.0 437,662 1

Seq Scan on an_v_dluznik d (cost=0.00..16,352.44 rows=428,446 width=30) (actual time=0.016..136.537 rows=437,662 loops=1)

  • Filter: ((id_rola_dluznik = 1) AND (rn = 1))
  • Rows Removed by Filter: 12259
7. 17.930 360.599 ↓ 1.4 61,170 1

Hash (cost=54,817.98..54,817.98 rows=45,097 width=79) (actual time=360.599..360.599 rows=61,170 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 3777kB
8. 100.154 342.669 ↓ 1.4 61,170 1

Hash Right Join (cost=38,890.28..54,817.98 rows=45,097 width=79) (actual time=126.229..342.669 rows=61,170 loops=1)

  • Hash Cond: (mk2.id_produkt = a.id)
9. 136.929 136.929 ↑ 1.0 436,791 1

Seq Scan on an_t_saldo_pocz_cesja mk2 (cost=0.00..9,047.91 rows=436,791 width=15) (actual time=20.340..136.929 rows=436,791 loops=1)

10. 15.592 105.586 ↓ 1.4 61,170 1

Hash (cost=37,797.57..37,797.57 rows=45,097 width=68) (actual time=105.586..105.586 rows=61,170 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 3431kB
11. 14.502 89.994 ↓ 1.4 61,170 1

Nested Loop (cost=5.92..37,797.57 rows=45,097 width=68) (actual time=16.716..89.994 rows=61,170 loops=1)

12. 5.192 5.192 ↑ 3.6 25 1

Seq Scan on an_v_pakiety p (cost=0.00..12.88 rows=91 width=60) (actual time=5.138..5.192 rows=25 loops=1)

  • Filter: (sektor = 'Bank'::text)
  • Rows Removed by Filter: 38
13. 32.050 70.300 ↓ 15.8 2,447 25

Bitmap Heap Scan on bp_produkt a (cost=5.92..413.67 rows=155 width=24) (actual time=1.620..2.812 rows=2,447 loops=25)

  • Recheck Cond: ((id_portfel = p.id_portfel) AND (id_bank = p.id_bank))
  • Heap Blocks: exact=21195
14. 38.250 38.250 ↓ 15.8 2,447 25

Bitmap Index Scan on idxbp_produkt_id_portfel_id_bank (cost=0.00..5.88 rows=155 width=0) (actual time=1.530..1.530 rows=2,447 loops=25)

  • Index Cond: ((id_portfel = p.id_portfel) AND (id_bank = p.id_bank))
15. 5,199.450 5,199.450 ↑ 1.0 1 61,170

Index Scan using idxbp_zadluzenie_id_produkt on bp_zadluzenie za (cost=0.42..1.35 rows=1 width=20) (actual time=0.084..0.085 rows=1 loops=61,170)

  • Index Cond: (id_produkt = a.id)
Planning time : 219.614 ms
Execution time : 6,250.298 ms