Michael, My strategy would depend upon the following observations: 1. How many seeks do you need to do in succession?
2. Is there a fully optimized index on the table? a) Optimized index not available "Individual seek" on large numbers of data records would probably be slower in total elapsed time as opposed to the "local select" which would create a runtime one off SQL select temporary index b) Optimized index available I GUESS that individual seeks would be quicker as VFP could cache the index for subsequent seek calls 3. What is the total size of the record(s) holding the "lookup fields" you are seeking? Pulling large records back from the main table into a local cursor could take a long time and this would make the process appear to be slow as the initial "select..." would be slower than with small records 4. Can these date records be dynamically changed/modified.deleted by other users whilst you are processing the SQL cursor? If yes then the SQL methodology is not workable without a revalidation back to the main table when the "Local Seek" has been actioned 5. Do you need rollback capability on individual records after finding a valid date or after finding ALL valid dates? a) Local Select Method If you can process the "local cursor" records using a nested SQL command then using this method would lock the base tables for longer and may be inconvenient for other users of the system b)Individual seek Easy to roll back and minimal locks for other users. 6. If you want to show a progress indicator then the "individual seek" method make this easier. Personally, I use a combination of both techniques but using single seeks on the main table is the preferred technique (95% I guess) as (4) above normally makes the "local cursor" method impracticable. Hope these observations help. Dave Crozier -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions Sent: 09 January 2007 21:02 To: Profox Subject: repetitive SEEKs I've got a table called HOLIDAYS that lists the days the company isn't working. I've got calls inside an iterative loop to see if a date exists. I'm wondering if I would be better off selecting the table into a local cursor, indexing that cursor, and then SEEKING on that instead of the network table. I could run exhaustive tests to come up with an answer, but wondered if others here had already experienced this kind of scenario and could advise from their past travels? Other information: - app built in VFP8 (eventually going to VFP9) - Win XP Pro operating system on client, probably W2K or NT mostly for servers - favorite food: chocolate peanut butter ice cream tia! --Michael -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

