More Speed in SQL?

Ruslan Zasukhin sunshine at public.kherson.ua
Sat May 15 18:02:45 CDT 2004


On 5/15/04 5:37 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.

So I see, that you do select as join on few tables.
Then you do INSERT of all that selected records into tmp table?

How many records are selected? I.e. later copied?

What cache size you have? Try 8-15-20MB


>>>  #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)

-- 
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