First off, don't do that. REPLACE (or better, UPDATE) once. Especially in high network traffic situations, the amount of time it takes to assemble a field and value list to issue one:
UPDATE TableName SET &lcSetFieldsToValues WHERE FilterCriteria
saves an enormous amount of I/O and CPU cycles: one lock, one transaction, one row re-write, one set of reindexes.
Second, in VFP, all indexes have to be evaluated, as there's no backlink to which fields are used in which expressions. Indexes are defined at the table level, not the row, so can have multiple field names, functions (UPPER() or DELETED(), for example), concatentations or just random stuff.
<OldWarStory> I once worked on an app where the original developer thought it would be a "clever" idea to define index expressions as UDFs. Yes, it's possible. In his UDFs, he would switch work areas, open tables if not already opened, look up values, and then return the value, cleaning up work areas and tables as he went. For every index definition for every record. A reindex with more than a couple hundred records brought the entire system to its knees. </OldWarStory>
On Wed, Jan 24, 2018 at 1:29 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
I understand that ADDing and DELETEing records updated all indexes; I would think the UPDATEs--regardless of what fields updated--would cause index updates for every indexed field on every update as well.
I don't know if it actually caused *UPDATES* but I think VFP would have to go through each index expression and test to see if the value had changed. Perhaps they'd skip the write if it was unchanged.
Other database engines do this differently