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:38:56
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:
01139502
Views:
21
>>>I switched from the first to the second, but it doesn't look like I gain a speed increase. I did multiple other changes, so it's hard to compare original code with the new code. But anyway, what do you think?
>>>
>>>Thanks in advance.
>>
>>I read the thread and you say it takes an hour for 4K+ records!!! Recreating a table from scratch, even writing byte by byte, with more than 4K+ would take much less than an hour. I don't think your problem would be solved by finding the nanosecond differences between these 2 approaches.
>>With even 255 fields and considering you would lıke to stay in old array limits you could cut down this to roughly 15-16 inserts for 4K+ records, if insert is really the bottleneck.
>>My .02 cents
>>Cetin
>
>Cetin,
>
>The program makes about 16 different inserts into 16 different tables in a scan loop. It also has some logic to check if it's the same patient, if the age it correct, is SSN is correct, does he/she has insurance, etc.
>
>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
Ç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