Situation: A script that used to run with Easycom's Toolkit is changed to run with db2* sql AND the Compatibility Wrapper.
After changing the code (db2 data access a few i5 functions like i5_data_area_read remained) the performance was not acceptable.
Db2 and the CW share a connection ([url]forums.zend.com/viewtopic.php?f=113&t=46688&p=115128&hilit=share+connection#p115128[/url])
The result of the sql instruction are a few hundred rows, which should take about 4 seconds to display in the browser.
Within the loop a data area is read (i5_data_area_read). So that is also executed a few hundred times. This was no problem with easycom toolkit, but has a huge performance impact when combining db2 with the CW. In this case I was able to change the code (data area access outside the loop), which brought the roundtrip of the script back from 40(!!!!) Seconds to an acceptable 4 seconds.
Conclusion: avoid calling CW functions in a db2 sql selection loop......