ID: 22971 Comment by: maxi at paoloastori dot com Reported By: anton at esrr dot ru Status: No Feedback Bug Type: ODBC related Operating System: Linux RedHat 8 PHP Version: 4.3.1 New Comment:
accessing DB2 via odbc (tried both unixODBC --with-unixODBC and DB2 CLI --with-ibm-db2) was extremely slow from PHP. Once disabled EXTENDED_PREFETCH in ext/odbc/odbc.h queries started flying and randomly error messages all disappeared. I really suggest to disable EXTENDED_PREFETCH if accessing DB2 using ODBC. Simply changing from SQL_CURSOR_DYNAMIC to SQL_CURSOR_STATIC in function SQLSetStmtOption inside php_odbc.c is not enough. Previous Comments: ------------------------------------------------------------------------ [2003-04-09 06:37:24] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-04-03 06:31:53] [EMAIL PROTECTED] Sniper, the real fix would be not to use the native interface to IBM DB2 and to use unixODBC as per the DB2 recommendations. Unfortunately I haven't a DB2 machine to test with and cannot comment much more on that. What I do know is that DB2 doesn't like the SQL_CURSOR_DYNAMIC that is used by PHP, and in fact claims it's leaking memeory. Removing the EXTENDED_FETCH will discontinue the cursor use, but this is also why I suggested changing the cursor. ------------------------------------------------------------------------ [2003-04-03 04:57:35] [EMAIL PROTECTED] Dan: Would the real fix be to disable that HAVE_SQL_EXTENDED_FETCH for DB2 altogether? ------------------------------------------------------------------------ [2003-04-02 20:07:47] anton at esrr dot ru >You had the correct category before, IBMs DB2 uses ODBC. > >Try calling odbc_set_option and changing your CURSOR to >SQL_CURSOR_FORWARD_ONLY, this should fix a few things for >your DB2 >install. Ok. I'll try. Thank you. But on this moment the positive result has achieved by commenting out strings containing #define HAVE_SQL_EXTENDED_FETCH 1 in php_odbc_includes.h, as described in Bug #9869 (http://bugs.php.net/bug.php?id=9869). I commented out all lines with this string, but I think that DB2 CLI part enough. ------------------------------------------------------------------------ [2003-04-02 18:41:43] [EMAIL PROTECTED] You had the correct category before, IBMs DB2 uses ODBC. Try calling odbc_set_option and changing your CURSOR to SQL_CURSOR_FORWARD_ONLY, this should fix a few things for your DB2 install. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22971 -- Edit this bug report at http://bugs.php.net/?id=22971&edit=1