More Speed in SQL?

Ruslan Zasukhin sunshine at public.kherson.ua
Sat May 15 17:13:36 CDT 2004


On 5/15/04 5:04 PM, "RyHoRuK" <RyHoRuK at gmx.de> wrote:

Try measure each from 4 commands

How many records in tables?
Cursors?

> Hi,
> 
> I am looking for more speed ;-))
> 
> I have to use the following Code after that I can fill a ListBox with
> the datas in the Table TAnzeige. Filling the ListBox with 2400rwos
> takes me now 0,8sec BUT the SQL code you can see here (attached) also
> takes 0,8-1,0sec. Is it in any way possible to speed this up?
> 
> Thanks for help
> 
> 
>  #if DebugBuild then
>  StartTick=ticks
>  #Endif
> 
>    meineDatenbank.TAnzeige.DeleteAllRecords
> 
>    //ParserArbeiten
>    //Ausgaben
>    SQLString="SELECT B.RecID, B.BDatum, KZ.Konto_Name,
> K.Kategorie_Name, B.Betrag, B.Kommentar, B.Blocked"
>    SQLString=SQLString+" FROM Buchungen B, Kategorien K, Konten KZ"
>    SQLString=SQLString+" WHERE B.Kategorie_ID=K.RecID"
>    SQLString=SQLString+ " AND B.Ziel_Konto=KZ.RecID"
>    SQLString=SQLString+ " AND B.Deleted='0'"
>    SQLString=SQLString+ " AND B.Herk_Konto='"+cstr(AktuellesKonto)+"'"
> 
>    cmd= "INSERT INTO Anzeige (Buchungs_ID, BDatum, Gegenkonto,
> Kategorie, Ausgabe, Kommentar, Blocked) "
>    cmd=cmd + SQLString
>    count=meineDatenbank.SQLExecute(cmd)
> 
>    //Einnahmen
>    SQLString="SELECT B.RecID, B.BDatum, KO.Konto_Name,
> K.Kategorie_Name, B.Betrag, B.Kommentar, B.Blocked"
>    SQLString=SQLString+" FROM Buchungen B, Kategorien K, Konten KO"
>    SQLString=SQLString+" WHERE B.Kategorie_ID=K.RecID"
>    SQLString=SQLString+ " AND B.Herk_Konto=KO.RecID"
>    SQLString=SQLString+ " AND B.Deleted='0'"
>    SQLString=SQLString+ " AND B.Ziel_Konto='"+cstr(AktuellesKonto)+"'"
> 
>    cmd= "INSERT INTO Anzeige (Buchungs_ID, BDatum, Gegenkonto,
> Kategorie, Einnahme, Kommentar, Blocked) "
>    cmd=cmd + SQLString
>    count=meineDatenbank.SQLExecute(cmd)
> 
>    meineDatenbank.Tanzeige.flush
>    #if DebugBuild then
>    FehlerMeldung("Information", "Datenbank umfüllen Benötigte
> Sekunden: " + CStr((ticks - StartTick)/60))
>    #Endif
> 
> 
> Claudius

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list