Mike, for a greenie like me, please tell me how to avoid locking entire table, if/when you replace. Is that where Update is better?
On Thu, Apr 26, 2012 at 8:49 AM, Mike Copeland <[email protected]> wrote: > Opinion: It is rarely a good idea to lock the entire table. Not that it > isn't a good idea for some purposes, but in most cases, don't lock the > entire file. > > Mike Copeland > > -------- Original Message -------- > Subject: Re: lockng issues > From: MB Software Solutions, LLC > <[email protected]> > To: [email protected] > Date: 4/25/2012 3:42 PM > > 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? > > > > > > [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 Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAG1nNy_spd8tXGrQyqtZp1RX40DB9=4pudagkdwcjqpgb58...@mail.gmail.com ** 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.

