Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is faster: insert from memvar or insert fields?
Message
From
24/07/2006 19:53:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01139366
Message ID:
01139505
Views:
22
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform