Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter Performance Issue
Message
 
To
20/03/2003 08:41:59
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00765148
Message ID:
00768181
Views:
28
Hi Mike

I am not sure I understand what you are telling me. I have been using Set Key for the past couple of years with no problem. I have a unique ID stored in the ID field of every record. On related child records I have a PID (parent ID). When I want to limit the child records to those matching the current parent I simply use "Set Key to Parent.ID" in the child table work area.

Simon

>Hey Simon
>
>I noticed the use of SET KEY in this thread. SET KEY will make all records after the first argument available unless you add the second argument. SET FILTER and SQL don't do that. I wonder if you'd get even better performance over the LAN by adding the second argument.
>
>>Geoffrey
>>
>>Thanks for the info.
>>
>>Alexsey sent me some information that allows me to use the cursoradapter class and keep the same speed I have now. You can see his technique in this thread. I have implemented the technique and it works well for native data and allows me to easily upsize when necessary.
>>
>>Simon
>>
>>>Simon,
>>>
>>>Doug is spot on with his comment about the use of SET KEY. However, if the data is on a network drive, I found that in several cases I experimented with, that there was much the same performance lift simply by setting optimise off.
>>>
>>>Geoff
>>>
>>>>I will have to weigh the speed versus the upsizing advantages in my particular case. However, I know from experience that a number of my customer have busy networks. Some of them are private schools which where every student and classroom is networked. At certain times of the day network performance is a serious problem.
>>>>
>>>>I may also consider developing a class that has the same interface as a cursoradapter but accesses tables natively, perhaps I can have the speed I now enjoy and later easily replace this special class with a true cursoradapter.
>>>>
>>>>I will just have to work through the issues and find the best solution.
>>>>
>>>>Thanks
>>>>Simon
>>>>
>>>>
>>>>
>>>>>Hi Simon.
>>>>>
>>>>>>For example I have a customer history file with roughly 300K records. I was assuming I would set a where condition in the SelectCMD so that as the user moves through the customer file they could see the account history and only the records for the current customer would be retrieved. This works but it takes much more time to retrieve the records (even with rushmore optimization) than my current method of using "Set Key to " to limited the records to the current customer.
>>>>>
>>>>>I don't think this is a CursorAdapter issue but the difference between doing a SQL SELECT and accessing a table directly using SET KEY TO (which is extremely fast). So, yes, performance isn't a good in this scenario. However, if you were to upsize this app, you couldn't use that technique.
>>>>>
>>>>>Doug
Simon White
dCipher Computing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform