DatabaseBridge
The follwing tips are applicable when working on databases with isCOBOL DatabaseBridge.
• Handling locks through the Application Server or through the File Server by setting
iscobol.file.lock_manager * to "com.iscobol.as.locking.InternalLockManager" is faster than having locks handled by the database engine. As side effect, the concurrency is managed only between clients connected to the same isCOBOL Server, so this tip is not applicable if you’re working on the database with other tools in addition to the COBOL application. In addition, using a lock manager is not suggested when there are a lot of clients connected simultaneously (e.g. more than 100 clients) as it decreases performance in this case.
• EDBI routines check for table existence with a SQL query on database catalogues every time a OPEN is performed. If your application includes several OPEN statements and you’re sure that tables exist on the database, you can avoid this check by generating EDBI routines with the
-nocheck option.
• When you generate subroutines for Oracle using edbiis, use the
-oho option in order to obtain better performance for START on alternate keys on huge tables.
• When you generate subroutines for MySQL using edbiis, , use either
-dmld or
-dmlu in order to optimize the use of SQL cursors for read operations. Use the
-mh option in order to obtain better performance for START on alternate keys on huge tables.
• When you generate subroutines for PostgreSQL using edbiis, use either
-dpld or
-dplu in order to optimize the use of SQL cursors for read operations.
• If the key you use for the START has a lot of segments, but you need to use only the first few of them, you can rely on the SIZE clause to limit the size of the key to the size of the useful segments only. This will reduce the number of SELECT queries generated by isCOBOL DatabaseBridge to simulate the START.
Note - when using EDBIIS to generate EDBI routines, the
-sl option must be used in order to activate the support for START WITH SIZE.
• For multi-record files, where you have a table for each record definition, you can tell the START statement to use one specific table depending on the record type instead of using all the tables related to the multi-record file. To achieve it, set
iscobol.easydb.start_on_specific_table (boolean) to true in the configuration and ensure that the record type field is properly set before the START statement.
• ESQL (SQL logic) is preferable to the COBOL code generated by isCOBOL DatabaseBridge (COBOL logic) when you need to perform
o huge update operations (one single complex query is usually faster than multiple small queries generated by multiple REWRITE statements)
o complex searches (filters in the WHERE condition of SELECT are preferable to reading all records and performing checks with COBOL statements).
o testing of few fields (specifying the fields you wish to test in SELECT is preferable to reading the whole record including the fields you’re not interested in)
• DatabaseBridge performance is affected also by the JDBC configuration. See
Driver configuration for more advice.