Autor Beitrag
theo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

Win 2000, XP, Vista; Win 7
Delphi 6, 7, 2010, MSSQL, Firebird, DevExpress
BeitragVerfasst: Mi 23.01.08 10:49 
Hallo.

Ich habe in einem bestehenden Projekt FIREBIRD als DB. Die DB ist nicht groß (ca. 50 MByte). Alles ist im Vergleich zu MSSQL sehr sehr langsam, trotz guter Hardware. Mit XP auf dem Client kann der User noch arbeiten, aber langsam. Bei Vista-Clients ist alles nochmals langsamer. Die DB (Server) läuft auf einem Server 2003.

Das Projekt benutzt die FIBPlus-Komponenten und ist mit D7 erstellt.

Anbei ein extremes Beispiel für den Geschwindigkeitsunterschied. Ein "Select * from EZ_ENTWICKLUNG" habe ich auf dem Firebird nach ca. 30 MINUTEN!! ohne Ergebnis abgebrochen. Zum Test habe ich die Daten in einen MSQL2005 Express importiert Das Select brauchte ohne Indexe (!) ca. 4 Sekunden.

ausblenden volle Höhe SQL-Anweisung
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
CREATE VIEW EZ_ENTWICKLUNG(
  EZ_ID,
  HERKUNFT_ID,
  PUNKTION_ID,
  KRYO_AUFTAU_ID,
  THERAPIE_ID,
  DIAGNOSE_ID,
  VERWENDUNG_ID,
  SP_PROBE_ID,
  O_LI,
  O_RE,
  OVAR_ID,
  FRAU_ID,
  KULTUR_T0,
  ZUGANG,
  ABGANG,
  EZ_BEHANDLUNG,
  T0_EZ_TAG_ID,
  T0_STADIUM_ID,
  T0_EZ_BEHANDLUNG,
  T0_KRYO_AT,
  T0_KRYO_KON,
  T0_FOR_ET,
  T0_IN_ARREST,
  T0_LOST,
  T0_TRANSFER_ID,
  T0_PKD_ID,
  T0_AH_ID,
  T0_SCORE,
  T0_IDEAL,
  T1_IDEAL,
  T2_IDEAL,
  T3_IDEAL,
  T4_IDEAL,
  T5_IDEAL,
  T6_IDEAL,
  T7_IDEAL,
  T8_IDEAL,
  T9_IDEAL,
  T1_EZ_TAG_ID,
  T1_STADIUM_ID,
  T1_EZ_BEHANDLUNG,
  T1_KRYO_AT,
  T1_KRYO_KON,
  T1_FOR_ET,
  T1_IN_ARREST,
  T1_LOST,
  T1_TRANSFER_ID,
  T1_PKD_ID,
  T1_AH_ID,
  T1_SCORE,
  T2_EZ_TAG_ID,
  T2_STADIUM_ID,
  T2_EZ_BEHANDLUNG,
  T2_KRYO_AT,
  T2_KRYO_KON,
  T2_FOR_ET,
  T2_IN_ARREST,
  T2_LOST,
  T2_TRANSFER_ID,
  T2_PKD_ID,
  T2_AH_ID,
  T2_SCORE,
  T3_EZ_TAG_ID,
  T3_STADIUM_ID,
  T3_EZ_BEHANDLUNG,
  T3_KRYO_AT,
  T3_KRYO_KON,
  T3_FOR_ET,
  T3_IN_ARREST,
  T3_LOST,
  T3_TRANSFER_ID,
  T3_PKD_ID,
  T3_AH_ID,
  T3_SCORE,
  T4_EZ_TAG_ID,
  T4_STADIUM_ID,
  T4_EZ_BEHANDLUNG,
  T4_KRYO_AT,
  T4_KRYO_KON,
  T4_FOR_ET,
  T4_IN_ARREST,
  T4_LOST,
  T4_TRANSFER_ID,
  T4_PKD_ID,
  T4_AH_ID,
  T4_SCORE,
  T5_EZ_TAG_ID,
  T5_STADIUM_ID,
  T5_EZ_BEHANDLUNG,
  T5_KRYO_AT,
  T5_KRYO_KON,
  T5_FOR_ET,
  T5_IN_ARREST,
  T5_LOST,
  T5_TRANSFER_ID,
  T5_PKD_ID,
  T5_AH_ID,
  T5_SCORE,
  T6_EZ_TAG_ID,
  T6_STADIUM_ID,
  T6_EZ_BEHANDLUNG,
  T6_KRYO_AT,
  T6_KRYO_KON,
  T6_FOR_ET,
  T6_IN_ARREST,
  T6_LOST,
  T6_TRANSFER_ID,
  T6_PKD_ID,
  T6_AH_ID,
  T6_SCORE,
  T7_EZ_TAG_ID,
  T7_STADIUM_ID,
  T7_EZ_BEHANDLUNG,
  T7_KRYO_AT,
  T7_KRYO_KON,
  T7_FOR_ET,
  T7_IN_ARREST,
  T7_LOST,
  T7_TRANSFER_ID,
  T7_PKD_ID,
  T7_AH_ID,
  T7_SCORE,
  T8_EZ_TAG_ID,
  T8_STADIUM_ID,
  T8_EZ_BEHANDLUNG,
  T8_KRYO_AT,
  T8_KRYO_KON,
  T8_FOR_ET,
  T8_IN_ARREST,
  T8_LOST,
  T8_TRANSFER_ID,
  T8_PKD_ID,
  T8_AH_ID,
  T8_SCORE,
  T9_EZ_TAG_ID,
  T9_STADIUM_ID,
  T9_EZ_BEHANDLUNG,
  T9_KRYO_AT,
  T9_KRYO_KON,
  T9_FOR_ET,
  T9_IN_ARREST,
  T9_LOST,
  T9_TRANSFER_ID,
  T9_PKD_ID,
  T9_AH_ID,
  T9_SCORE)
AS
select
  ez_anz.EZ_ID,
  ez_anz.HERKUNFT_ID,
  ez_anz.PUNKTION_ID,
  ez_anz.KRYO_AUFTAU_ID,
  ez_anz.THERAPIE_ID,
  ez_anz.DIAGNOSE_ID,
  ez_anz.VERWENDUNG_ID,
  ez_anz.SP_PROBE_ID,
  ez_anz.O_LI,
  ez_anz.O_RE,
  ez_anz.OVAR_ID,
  ez_anz.FRAU_ID,
  ez_anz.KULTUR_T0,
  ez_anz.ZUGANG,
  ez_anz.ABGANG,
  ez_anz.EZ_BEHANDLUNG,
  t0.EZ_TAG_ID as t0_EZ_TAG_ID,
  t0.STADIUM_ID as t0_STADIUM_ID,
  t0.EZ_BEHANDLUNG as t0_EZ_BEHANDLUNG,
  t0.KRYO_AT as t0_KRYO_AT,
  t0.KRYO_KON as t0_KRYO_KON,
  t0.FOR_ET as t0_FOR_ET,
  t0.IN_ARREST as t0_IN_ARREST,
  t0.LOST as t0_LOST,
  t0.TRANSFER_ID as t0_TRANSFER_ID,
  t0.PKD_ID as t0_PKD_ID,
  t0.AH_ID as t0_AH_ID,
  t0.SCORE as t0_SCORE,
  t0.IDEAL as t0_IDEAL,
  t1.IDEAL as t1_IDEAL,
  t2.IDEAL as t2_IDEAL,
  t3.IDEAL as t3_IDEAL,
  t4.IDEAL as t4_IDEAL,
  t5.IDEAL as t5_IDEAL,
  t6.IDEAL as t6_IDEAL,
  t7.IDEAL as t7_IDEAL,
  t8.IDEAL as t8_IDEAL,
  t9.IDEAL as t9_IDEAL,
  t1.EZ_TAG_ID as t1_EZ_TAG_ID,
  t1.STADIUM_ID as t1_STADIUM_ID,
  t1.EZ_BEHANDLUNG as t1_EZ_BEHANDLUNG,
  t1.KRYO_AT as t1_KRYO_AT,
  t1.KRYO_KON as t1_KRYO_KON,
  t1.FOR_ET as t1_FOR_ET,
  t1.IN_ARREST as t1_IN_ARREST,
  t1.LOST as t1_LOST,
  t1.TRANSFER_ID as t1_TRANSFER_ID,
  t1.PKD_ID as t1_PKD_ID,
  t1.AH_ID as t1_AH_ID,
  t1.SCORE as t1_SCORE,
  t2.EZ_TAG_ID as t2_EZ_TAG_ID,
  t2.STADIUM_ID as t2_STADIUM_ID,
  t2.EZ_BEHANDLUNG as t2_EZ_BEHANDLUNG,
  t2.KRYO_AT as t2_KRYO_AT,
  t2.KRYO_KON as t2_KRYO_KON,
  t2.FOR_ET as t2_FOR_ET,
  t2.IN_ARREST as t2_IN_ARREST,
  t2.LOST as t2_LOST,
  t2.TRANSFER_ID as t2_TRANSFER_ID,
  t2.PKD_ID as t2_PKD_ID,
  t2.AH_ID as t2_AH_ID,
  t2.SCORE as t2_SCORE,
  t3.EZ_TAG_ID as t3_EZ_TAG_ID,
  t3.STADIUM_ID as t3_STADIUM_ID,
  t3.EZ_BEHANDLUNG as t3_EZ_BEHANDLUNG,
  t3.KRYO_AT as t3_KRYO_AT,
  t3.KRYO_KON as t3_KRYO_KON,
  t3.FOR_ET as t3_FOR_ET,
  t3.IN_ARREST as t3_IN_ARREST,
  t3.LOST as t3_LOST,
  t3.TRANSFER_ID as t3_TRANSFER_ID,
  t3.PKD_ID as t3_PKD_ID,
  t3.AH_ID as t3_AH_ID,
  t3.SCORE as t3_SCORE,
  t4.EZ_TAG_ID as t4_EZ_TAG_ID,
  t4.STADIUM_ID as t4_STADIUM_ID,
  t4.EZ_BEHANDLUNG as t4_EZ_BEHANDLUNG,
  t4.KRYO_AT as t4_KRYO_AT,
  t4.KRYO_KON as t4_KRYO_KON,
  t4.FOR_ET as t4_FOR_ET,
  t4.IN_ARREST as t4_IN_ARREST,
  t4.LOST as t4_LOST,
  t4.TRANSFER_ID as t4_TRANSFER_ID,
  t4.PKD_ID as t4_PKD_ID,
  t4.AH_ID as t4_AH_ID,
  t4.SCORE as t4_SCORE,
  t5.EZ_TAG_ID as t5_EZ_TAG_ID,
  t5.STADIUM_ID as t5_STADIUM_ID,
  t5.EZ_BEHANDLUNG as t5_EZ_BEHANDLUNG,
  t5.KRYO_AT as t5_KRYO_AT,
  t5.KRYO_KON as t5_KRYO_KON,
  t5.FOR_ET as t5_FOR_ET,
  t5.IN_ARREST as t5_IN_ARREST,
  t5.LOST as t5_LOST,
  t5.TRANSFER_ID as t5_TRANSFER_ID,
  t5.PKD_ID as t5_PKD_ID,
  t5.AH_ID as t5_AH_ID,
  t5.SCORE as t5_SCORE,
  t6.EZ_TAG_ID as t6_EZ_TAG_ID,
  t6.STADIUM_ID as t6_STADIUM_ID,
  t6.EZ_BEHANDLUNG as t6_EZ_BEHANDLUNG,
  t6.KRYO_AT as t6_KRYO_AT,
  t6.KRYO_KON as t6_KRYO_KON,
  t6.FOR_ET as t6_FOR_ET,
  t6.IN_ARREST as t6_IN_ARREST,
  t6.LOST as t6_LOST,
  t6.TRANSFER_ID as t6_TRANSFER_ID,
  t6.PKD_ID as t6_PKD_ID,
  t6.AH_ID as t6_AH_ID,
  t6.SCORE as t6_SCORE,
  t7.EZ_TAG_ID as t7_EZ_TAG_ID,
  t7.STADIUM_ID as t7_STADIUM_ID,
  t7.EZ_BEHANDLUNG as t7_EZ_BEHANDLUNG,
  t7.KRYO_AT as t7_KRYO_AT,
  t7.KRYO_KON as t7_KRYO_KON,
  t7.FOR_ET as t7_FOR_ET,
  t7.IN_ARREST as t7_IN_ARREST,
  t7.LOST as t7_LOST,
  t7.TRANSFER_ID as t7_TRANSFER_ID,
  t7.PKD_ID as t7_PKD_ID,
  t7.AH_ID as t7_AH_ID,
  t7.SCORE as t7_SCORE,
  t8.EZ_TAG_ID as t8_EZ_TAG_ID,
  t8.STADIUM_ID as t8_STADIUM_ID,
  t8.EZ_BEHANDLUNG as t8_EZ_BEHANDLUNG,
  t8.KRYO_AT as t8_KRYO_AT,
  t8.KRYO_KON as t8_KRYO_KON,
  t8.FOR_ET as t8_FOR_ET,
  t8.IN_ARREST as t8_IN_ARREST,
  t8.LOST as t8_LOST,
  t8.TRANSFER_ID as t8_TRANSFER_ID,
  t8.PKD_ID as t8_PKD_ID,
  t8.AH_ID as t8_AH_ID,
  t8.SCORE as t8_SCORE,
  t9.EZ_TAG_ID as t9_EZ_TAG_ID,
  t9.STADIUM_ID as t9_STADIUM_ID,
  t9.EZ_BEHANDLUNG as t9_EZ_BEHANDLUNG,
  t9.KRYO_AT as t9_KRYO_AT,
  t9.KRYO_KON as t9_KRYO_KON,
  t9.FOR_ET as t9_FOR_ET,
  t9.IN_ARREST as t9_IN_ARREST,
  t9.LOST as t9_LOST,
  t9.TRANSFER_ID as t9_TRANSFER_ID,
  t9.PKD_ID as t9_PKD_ID,
  t9.AH_ID as t9_AH_ID,
  t9.SCORE as t9_SCORE
from
  ez_anz
left join
  ez_tag_anz t0
on
  EZ_ANZ.EZ_ID=t0.ez_id
  and t0.kulturtag=ez_anz.kultur_t0
left join
  ez_tag_anz t1
on
  EZ_ANZ.EZ_ID=t1.ez_id
  and t1.kulturtag=ez_anz.kultur_t0+1
left join
  ez_tag_anz T2
on
  EZ_ANZ.EZ_ID=T2.ez_id
  and T2.kulturtag=ez_anz.kultur_t0+2
left join
  ez_tag_anz T3
on
  EZ_ANZ.EZ_ID=T3.ez_id
  and T3.kulturtag=ez_anz.kultur_t0+3
left join
  ez_tag_anz T4
on
  EZ_ANZ.EZ_ID=T4.ez_id
  and T4.kulturtag=ez_anz.kultur_t0+4
left join
  ez_tag_anz T5
on
  EZ_ANZ.EZ_ID=T5.ez_id
  and T5.kulturtag=ez_anz.kultur_t0+5
left join
  ez_tag_anz T6
on
  EZ_ANZ.EZ_ID=T6.ez_id
  and T6.kulturtag=ez_anz.kultur_t0+6
left join
  ez_tag_anz T7
on
  EZ_ANZ.EZ_ID=T7.ez_id
  and T7.kulturtag=ez_anz.kultur_t0+7
left join
  ez_tag_anz T8
on
  EZ_ANZ.EZ_ID=T8.ez_id
  and T8.kulturtag=ez_anz.kultur_t0+8
left join
  ez_tag_anz T9
on
  EZ_ANZ.EZ_ID=T9.ez_id
  and T9.kulturtag=ez_anz.kultur_t0+9
;


Indexe habe hinzugefügt.

Gibt es Möglichkeiten zur Beschleunigung?
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Mi 23.01.08 11:04 
Der Index auf dem Feld 'ez_anz.kultur_t0' wird nicht greifen, das Du dies mit '+x' verhinderst, anders kann man das aber imho nicht lösen. Deine Kreuztabelle könnte auch im Client erstellt werden. Das dürfte schneller gehen.

Versuche doch alternativ, eine stored procedure in FB zu schreiben, die dir die Kreuztabelle bastelt. Auch das dürfte schneller gehen.

Bei extremen Views hat aber auch MSSQL irgendwann Probleme. Ich habe ein solches Ungetüm aus ca. 12 Tabellen und 250 Spalten. Die Haupttabelle umfasst ca. 1 Mio Datensätze und MSSQL beißt sich an der View die Zähne aus. Laut DB-Gurus hilft hier nur mehr RAM, da MSSQL die Indexe komplett in den Speicher lädt, aber der ist auch irgendwann voll.

Abhilfe (bei MSSQL): Eine UDF erstellen.

_________________
Na denn, dann. Bis dann, denn.
theo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

Win 2000, XP, Vista; Win 7
Delphi 6, 7, 2010, MSSQL, Firebird, DevExpress
BeitragVerfasst: Mi 23.01.08 11:55 
Danke alzaimar,

Meine Beispiel war nur der Extremfall.

Ich programmiere schon lange mit MSSQL und hatte normalerweise keine Geschwindigkeitsprobleme.

Was Firebird betrifft bin ich Neuling und erlebe jeden Tag eine neue Überraschung.

Ist der Firebird prinzipell langsamer, als MSSQL oder muss ich bei der Erstellung von Triggern, Prozeduren usw. anders vorgehen?

Wie bereits gesagt, die DB ist mit 50 MByte nicht groß und die Tabellen haben nicht viele Zeilen (große Tabellen zwischen 5000 und 10000)

Leider ist der Aufwand das ganze Projekt auf MSSQL um zu stellen, z.Zt. nicht realisierbar (viele Trigger und Prozeduren). der SQL-Syntax ist auch nicht kompatipell. Darum suche ich nach einer Lösung zur Beschleunigung von Firebird.

Kennt jemand ein spezielles Firebird-Forum?
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Mi 23.01.08 12:07 
Och, da bist du hier oder in der Delphi-Praxis eigentlich schon richtig... Vielleicht ein Cross Post?

Ich arbeite derzeit nur mit MSSQL, FB kenn ich nicht, kann mir aber vorstellen, das solche Crosstab-Monster fast jede DB ärgern. Die eine früher, die andere später...

_________________
Na denn, dann. Bis dann, denn.
alex517
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 60


D7Ent, FB, FIBPlus
BeitragVerfasst: Mi 23.01.08 13:55 
Hallo theo,

du könntest es über eine Stored Proc mit einer 2-stufigen Abfrage machen.
Die erste For select.. liest die ez_anz und die zweite For select.. alle
dazugehörigen ez_tag_anz.

Vorteil: ez_tag_anz wird nur 1 Mal gelesen und nicht wie wie in deiner View 10 Mal.

Mit der Where-Clausel
ausblenden SQL-Anweisung
1:
  (B.EZ_ID = :A_EZ_ID) and (B.kulturtag between :KULTUR_T0 + 0 and :KULTUR_T0 + 0)					

dürfte die Verwendung eines Indizes auch kein Problem sein.


ausblenden volle Höhe SQL-Anweisung
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
CREATE Procedure SP_EZ_ENTWICKLUNG ( AParam..  )
RETURNS (
  EZ_ID INTEGER,
  HERKUNFT_ID..
  ..
  T0_EZ_TAG_ID..
  T0_STADIUM_ID..
  T0_EZ_BEHANDLUNG..
  ..  )
as

declare variable temp_EZ_ID..
declare variable temp_kulturtag..
declare variable temp_EZ_TAG_ID..
declare variable temp_STADIUM_ID..
declare variable temp_EZ_BEHANDLUNG..
...
begin
  for
    select
      A.EZ_ID,
      A.KULTUR_T0,
      A.HERKUNFT_ID,
      ...
    from ez_anz A
    where
      A.Param = :AParam
    into
      :EZ_ID,
      :KULTUR_T0,
      :HERKUNFT_ID
      ....
  do begin
    for
      select
        B.EZ_TAG_ID,
        B.kulturtag,
        B.T0_EZ_TAG_ID,
        B.T0_STADIUM_ID,
        B.T0_EZ_BEHANDLUNG,
        ...
      from ez_tag_anz B
      where
        (B.EZ_ID = :A_EZ_ID) and (B.kulturtag between :KULTUR_T0 + 0 and :KULTUR_T0 + 0)
      into
        :temp_EZ_ID,
        :temp_kulturtag,
        :temp_EZ_TAG_ID,
        :temp_STADIUM_ID,
        :temp_EZ_BEHANDLUNG,
        ...
    do begin
      if (temp_kulturtag = KULTUR_T0 + 0then
      begin
        T0_EZ_TAG_ID = temp_EZ_TAG_ID;
        T0_STADIUM_ID = temp_STADIUM_ID;
        T0_EZ_BEHANDLUNG = temp_EZ_BEHANDLUNG;
        ...
      end
      if (temp_kulturtag = KULTUR_T0 + 1then
      begin
        T1_EZ_TAG_ID = temp_EZ_TAG_ID;
        T1_STADIUM_ID = temp_STADIUM_ID;
        T1_EZ_BEHANDLUNG = temp_EZ_BEHANDLUNG;
        ...
      end

      if (temp_kulturtag = KULTUR_T0 + 2then
      begin
        T2_EZ_TAG_ID = temp_EZ_TAG_ID;
        T2_STADIUM_ID = temp_STADIUM_ID;
        T2_EZ_BEHANDLUNG = temp_EZ_BEHANDLUNG;
        ...
      end

    end

    suspend;
  end

end


alex