explain.depesz.com

A tool for finding a real cause for slow queries.

Result: ufQ

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 158.789 3299383.839 ↓ 413.6 30608 1

Sort (cost=1893308.89..1893309.08 rows=74 width=1045) (actual time=3299380.150..3299383.839 rows=30608 loops=1)

  • Sort Key: cabmnt.cabmntcsu
  • Sort Method: quicksort Memory: 8899kB
2. 1314609.121 3299225.050 ↓ 413.6 30608 1

Nested Loop Left Join (cost=0.00..1893306.59 rows=74 width=1045) (actual time=71.800..3299225.050 rows=30608 loops=1)

  • Join Filter: (((ade2_2.rfoadegch)::text >= (ade3_2.rfoadegch)::text) AND ((ade2_2.rfoadedrt)::text <= (ade3_2.rfoadedrt)::text))
  • Filter: ((((ade2_2.rfoade___rfovdeide)::text = 'ANA'::text) AND (ade2_2.rfoadeaxe = 2) AND ((ade3_2.rfoade_i_rfodstide)::text = 'ETS'::text) AND (ade3_2.rfoadervs = 1)) OR (cabmnt.cabmnt_2_rfodstide IS NULL))
3. 1249.772 3908.085 ↓ 42.4 1180398 1

Nested Loop Left Join (cost=0.00..21685.11 rows=27809 width=1270) (actual time=1.587..3908.085 rows=1180398 loops=1)

  • Join Filter: ((cabmnt.cabmnt___rforefide)::text = (ade2_2.rfoade___rforefide)::text)
4. 67.927 607.577 ↓ 19.9 30608 1

Nested Loop (cost=0.00..19489.49 rows=1540 width=1045) (actual time=0.123..607.577 rows=30608 loops=1)

  • Join Filter: (((ant2.rfoantgch)::text >= (ant3.rfoantgch)::text) AND ((ant2.rfoantdrt)::text <= (ant3.rfoantdrt)::text))
5. 0.029 0.029 ↑ 1.0 1 1

Index Scan using rfoant_pk on rfoant ant3 (cost=0.00..3.28 rows=1 width=215) (actual time=0.028..0.029 rows=1 loops=1)

  • Index Cond: (((rfoant___rforefide)::text = 'HPLUS'::text) AND ((rfoant___rfovntide)::text = 'TBAN'::text) AND ((rfoant_i_rfontride)::text = 'ETS'::text) AND (rfoantrvs = 1))
6. 89.486 539.621 ↓ 2.2 30608 1

Nested Loop (cost=0.00..19278.36 rows=13857 width=1260) (actual time=0.092..539.621 rows=30608 loops=1)

7. 118.345 118.345 ↓ 1.8 33179 1

Index Scan using cabmnt_rpvsd_idx on cabmnt (cost=0.00..12227.63 rows=18169 width=1045) (actual time=0.075..118.345 rows=33179 loops=1)

  • Index Cond: (((cabmnt___rforefide)::text = 'HPLUS'::text) AND ((cabmnt___rteprcide)::text = 'CANA_ENCC'::text) AND ((cabmnt___rfovsnide)::text = '201205_001'::text) AND ((cabmnt___rtestdide)::text = 'REEL'::text) AND (cabmntdtd >= '2012-01-01 00:00:00'::timestamp without time zone))
  • Filter: (cabmntdtf <= '2012-12-31 23:59:59.999'::timestamp without time zone)
8. 331.790 331.790 ↑ 1.0 1 33179

Index Scan using rfoant_pk on rfoant ant2 (cost=0.00..0.38 rows=1 width=222) (actual time=0.008..0.010 rows=1 loops=33179)

  • Index Cond: (((ant2.rfoant___rforefide)::text = 'HPLUS'::text) AND ((ant2.rfoant___rfovntide)::text = 'TBAN'::text) AND ((ant2.rfoant_i_rfontride)::text = (cabmnt.cabmnt___rfontride)::text) AND (ant2.rfoantrvs = 1))
9. 2050.736 2050.736 ↓ 2.4 39 30608

Index Scan using rfoade_dsi_idx on rfoade ade2_2 (cost=0.00..1.19 rows=16 width=234) (actual time=0.010..0.067 rows=39 loops=30608)

  • Index Cond: ((cabmnt.cabmnt_2_rfodstide)::text = (ade2_2.rfoade_i_rfodstide)::text)
  • Filter: ((ade2_2.rfoade___rforefide)::text = 'HPLUS'::text)
10. 1980707.844 1980707.844 ↓ 9.7 3187 1180398

Index Scan using fki_rfoade_fk_ade on rfoade ade3_2 (cost=0.00..55.86 rows=327 width=234) (actual time=0.034..1.678 rows=3187 loops=1180398)

  • Index Cond: (((ade3_2.rfoade___rforefide)::text = 'HPLUS'::text) AND ((ade2_2.rfoade___rforefide)::text = (ade3_2.rfoade___rforefide)::text) AND ((ade2_2.rfoade___rfovdeide)::text = (ade3_2.rfoade___rfovdeide)::text) AND (ade2_2.rfoadeaxe = ade3_2.rfoadeaxe) AND (ade2_2.rfoadervs = ade3_2.rfoadervs))