LANSA for Windows performance with local PC database
|Product/Release:||LANSA for Windows|
|Abstract:||Improving performance of LANSA for Windows Applications with a local PC database|
|Submitted By:||Rene Houba, LANSA Netherlands|
How to improve performance of LANSA for Windows applications when using a local PC database. The problem arises when some AS/400 LANSA functions need to be executed on a PC with a local PC database.
One of the most dangerous commands in this situation is the SELECT command with the OPTION(*STARTKEY), because the SQL database on the PC does not use the *STARTKEY option the same way as the AS/400 database does. On the PC ALL records in the database are first, before the requested records are selected. A simple "page at a time" AS/400 LANSA function will give very poor perfromance when local SQL PC databases are involved.
To get around this problem remove the *STARTKEY option and use the GENERIC option instead. But with the GENERIC option the SELECT result usually contains 200, 300 or 400 records. This is not a problem, but, for every selected record, a subroutine was executed where, for each record, 3 or 4 I/O requests to files are made. Because of this, the performance is still very bad.
To improve performance the best technique is to "simulate" AS/400 "page at a time" processing. This will make an applications faster.