Is it generally faster to SET a field or to INSERT a variable into said field - within a loop that updates >2million records?
The loop replaces the entire contents of each field.
The script inserts data from an unrelated "lookup" table into the current active record based on a code value.
The routine is as follows:
1. identify records to update via find mode.
2. sort data based on the lookup field value in current record.
2. extract data from relevant fields from lookup table using eSQL.
3. distribute the found values across multiple fields in the current record using Set Field.
4. repeat the loop until the last record.
Or is there a better approach?
Does sorting make any difference as far as eSQL performance goes?
The eSQL routine is written as a custom function.
A screen shot of the routine is attached.