Efficiency considerations
The mmodbc module fixes the maximum size of strings that are accepted to exchange data between Mosel and a database via the control SQLcolsize. This parameter is set by default to a relatively small value in order to avoid unnecessary overhead by reserving unused space—any portion of the strings exceeding the specified size is cut off. If a data set works with larger fields you need to increase the value of this setting, also aligning the setting of SQLbufsize that should always be larger then SQLcolsize (it is expected to be sufficiently large to store at least one entire row of data). To obtain the corresponding mmoci parameter names, replace the prefix SQL by OCI.
- SQLcolsize
- Maximum length of strings accepted to exchange data.
- SQLbufsize
- Size in kilobytes of the buffer used for exchanging data between Mosel and the ODBC driver.
The bufsize setting is also available as an option for the spreadsheet I/O drivers, increasing its default value might help to speed up the handling of very large data sets.
If a Mosel model employs a large number of write accesses to a database it is usually preferrably to enable transaction mode, provided that transactions are supported by the database (please refer to the documentation of your database; SQLite that comes with the mmodbc module supports this functionality, but it is not activated by default and needs to be explicitly enabled). This setting needs to be made before the database connection is opened. In transaction mode, database commands are collected up until a call to SQLcommit (commit changes) or SQLrollback (discard changes) is issued—with mmoci replace the prefix to subroutine and parameter names by OCI.
- SQLautocommit
- If set to false enable transactions, otherwise any changes are sent immeditately to the database.
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.