ODBC - Optimising performance - Command choice and reports¶
Optimising performance with ODBC - Command choice and reports
If the driving file is open in update mode, a run report command will read and lock records even if the report logic does not update them, because Sculptor cannot determine in advance that an update command will not be used. The report will run faster if the file is open read-only and much faster if the batch_read flag is also ON. The existing state of the batch_read flag can be saved before running the report.
The openfile command can be used to change the mode of an already open file without the need to supply a filename. Sculptor closes and re-opens the file only if it is not already open in the required mode.
tmp.save_batch_read = File1->batch_read openfile File1 read run report Report1 openfile File1 update File1->batch_read = tmp.save_batch_read