Registriert seit: 14. Aug 2004
1.439 Beiträge
Delphi 2007 Professional
|
Re: ORDER in Unterselect sehr langsam
15. Okt 2009, 12:43
ja, der PLAN schon :
SQL-Code:
execute block
returns (ID INTEGER, MBID INTEGER)
as
declare variable ID1 INTEGER;
begin
for select ID FROM PERSONAL into :ID
DO begin
MBID = null;
SELECT FIRST 1 TB.AUFTRAGID FROM TERMINAL_BUCHUNGEN TB WHERE TB.PERSONALID = :ID INTO :mbid;
suspend;
end
end
Statement Plan
--------------
PLAN (TB INDEX (TB_PERSONALID))
PLAN (PERSONAL NATURAL)
Gruss Hans
2B or not 2B, that is FF
|