Excellent questions/points (as usual), Dave!  My answers are inline below.

Dave Crozier wrote:
> Michael,
> My strategy would depend upon the following observations:
>
> 1. How many seeks do you need to do in succession?
>   
Several.  The process is to determine that it takes 'x' days to do a 
task, and then go from today forward to see when the expected date is, 
counting "work days" and not holidays or weekends.

> 2. Is there a fully optimized index on the table?
> b) Optimized index available
> I GUESS that individual seeks would be quicker as VFP could cache the index
> for subsequent seek calls
>   
Yes, there's a candidate index on the dDate field.

> 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
>   
I'd really only need to pull back the dDate field...the rest of the 
record is meaningless for this process.

> 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
>   
Great point, speaking to the "freshness" of the data...but for the most 
part, it should be static and not often updated.

> 5. Do you need rollback capability on individual records after finding a
> valid date or after finding ALL valid dates?
>
>   
Not applicable to this scenario.

> 6. If you want to show a progress indicator then the "individual seek"
> method make this easier.
>   
Ok.

> 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.
>
>   
Thanks for your comments!
--Michael


-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
Post Messages to: ProFox@leafe.com
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.

Reply via email to