Hallo *all
Hier gab es folgendes Statement:
das läuft auf 25 Mio Datensätze 3-5 SekundenCode:with a as (select key1, key2, key3, dajj, damm, datt, stor from FILE1 where rgma = 140850022 and (bank = 9 and stgr not in(0, 1, 91) or bank <> 9) and stat = 9 and zahl < 0 and kzze = 1 ) select sum(zahl), count(*) from file1 where (key1, key2, key3, dajj, damm, datt, sanr) in (select key1, key2, key3, dajj, damm, datt, stor from a) and kzze = 1
mache ich aus dem
läuft das ding > 45 minutenCode:with a as (select key1, key2, key3, dajj, damm, datt, stor from FILE1 where rgma = 140850022 and (bank = 9 and stgr not in(0, 1, 91) or bank <> 9) and stat = 9 and zahl < 0 and kzze = 1 ) select key1, key2, key3, zahl from file1 where (key1, key2, key3, dajj, damm, datt, sanr) in (select key1, key2, key3, dajj, damm, datt, stor from a) and kzze = 1
muß er für SUM(Zahl), nicht auch alle passenden lesen?
LF mit key1, 2, 3 gibt es
wieso lauft das so lange
Robi
![[NEWSboard IBMi Forum]](images/duke/nblogo.gif)



Mit Zitat antworten
Bookmarks