Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE OF SQL STATEMENTS
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00004029
Message ID:
00004189
Views:
42
>>preocedure is really slow, it takes up to 15 minutes to retrieve 90 records from a database that has 54000.
>
>Unless U are using a 386 This procedure should not take that long! I hope you have all fields indexed. A genreal rule of thumb is to build and index on any field to the left of the "=" sign in your SQL Where clause. Even concatonated strings. Readup on optimatiztion of RUSHMORE technology for additional details or check this thread. I remember seeing something along time ago about this stuff... Cheers...

The part that is slow is the part to disgard the records that doesn't satisfy the whole expression, and I don't know why because all this work is done in memory, let me explain you :
1.- First I retrieve all the records that satisfy at least one condition of the whole sentence into an array.
2.- Go one by one in that array and see if that client_id satisfy the whole expression.

the second part is the on e that is slow, because if my sentence has, lets say 5 conditions and each clien_id has 80
records I need to make 80x5x(amount of records found) loops.
I'm almost giving up.
If I find a much better solution I'll let you know.
Thank you for your help.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Reply
Map
View

Click here to load this message in the networking platform