More Speed in SQL?

RyHoRuK RyHoRuK at gmx.de
Sat May 15 16:37:24 CDT 2004


Hi,


Am 15. Mai 2004 um 16:13 Uhr schrieb Ruslan Zasukhin:

> On 5/15/04 5:04 PM, "RyHoRuK" <RyHoRuK at gmx.de> wrote:
>
> Try measure each from 4 commands

meineDatenbank.TAnzeige.DeleteAllRecords
--> 0,05sec

First SQLString-Building with InserINTO
--> 0,5-0,7sec

Second SQLString-Building with InserINTO
--> 0,25-0,35sec


> How many records in tables?
> Cursors?

Table.Buchungen = 7000
Table.Kategorien = 100
Table.Konten = 20

my question is, can I optimize the process. Using other SQL or Better 
InsertINTO. As I am right you told me, that I can't use One 
SQL-Statement to geht the result. Thats the reason why I use a Table 
where I generate a new Cursor after filling this table by this 
InsertINTO-Statements.

bye


Claudius


>> 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
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



More information about the Valentina mailing list