Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is faster: insert from memvar or insert fields?
Message
De
24/07/2006 19:53:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01139366
Message ID:
01139505
Vues:
30
>>>I wish to send this program to someone for a quick review... I had the original code (procedural) which I converted to a class. I made couple of other speed improvements. However, it doesn't seem enough. I'm not sure what else can I optimize.
>>
>>Maybe you can optimize "logic to check this and that" part. I noticed you're releasıing 2 fields. That makes me think you've default values, procedure running to get those defaults and maybe also some triggers and RI checks which would further slow down all these. Otherwise 16 tables scan...endscan doesn't explain to be as slow as one hour.
>>Cetin
>
>Yes, exactly. cEntered_User has GetUserID() as default (database SP to get user id based on machine name) and tEntered_Time is datetime(). If we do scatter, we need to release these two variables, so they would be re-calculated. I switched from scatter to insert fields in almost all the code (left just 3 scatter where we have too many fields to list).
>

Age class looks quite familiar. However I don't know what type age validation it serves in your case. SSN validation OTOH is (I don't know how to say - every effort made to create a slow routine as I see it).
PS: GetUserID() might be the source of bottleneck. Say if it's doing something like "lock,increment,unlock" in a table. You might instead lock and increment by preestimated insertions once.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform