On 4/25/2012 2:49 PM, Rick Schummer wrote:
>>> REPLACE post_date WITH date() FOR post_date<>  date() ALL in YourTableName<<
>
> Two comments:
>
> 1) REPLACE ALL places a header lock, where SCAN...ENDSCAN and REPLACE uses 
> record locking
>
> 2) Depending on the time of the process (around midnight), it is entirely 
> possible your use of DATE() could produce
> different dates using this one command. If all the dates being the same are 
> important you should get the date to a
> memvar and use that in the replace.


Excellent tips on both points!!!  Question on the first one:  do you 
think that the REPLACE ALL operation--because it is only locking the 
entire file once versus each record lock inside the SCAN loop--would run 
faster and be more desirable?  Or would you prefer the SCAN loop with 
the individual record lock to avoid the increased chance of contention?


-- 
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16

_______________________________________________
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
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** 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