Re: IBM DB2 on Linux with PHP is very slow

From: Date: Tue, 10 Jul 2001 21:30:42 +0000
Subject: Re: IBM DB2 on Linux with PHP is very slow
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-10232@lists.php.net to get a copy of this message
Hi Andrew, thanks a lot for your help. Today we discovered what our real problem was: After "playing" a little bit with the php-scripts that try to connect to the IBM DB2, we set the optional parameter Cursortype when calling odbc_pconnect(....). And the exciting thing: When we set the cursor type to SQL_CUR_USE_ODBC Cursor Type, then the whole query speed up from 1 till 10 seconds to 0.2 till 0.3 seconds for 100 records. Amazing!!! Therfore, PHP is just almost fast as calling the DB2 from Servlets using JDBC (don't take too much care about the speed at whole: the database was on a completely other location, so the whole connection was made over a slow network connection). I hope this helps when other encounter the same problem when trying to connect to DB2 from PHP. Kind regards, Christian Szardenings "Andrew Hill" <ahill@openlinksw.com> schrieb im Newsbeitrag news:NDBBKFNCBCHANEGAKONKGEBDJBAA.ahill@openlinksw.com... > Christian, > > Are you using an ODBC driver or just the unified-ODBC functions? > If a driver, then I suggest changing vendors - that performance is in no way > representative of ODBC in general. > In addition, to improve performance even more when using similar queries, > first use odbc_prepare to prepare a parameter-bound query and then use > odbc_execute to create the result set for specific parameter values. > > You may wish to try our Multi-Tier drivers at > http://www.openlinksw.com. > Multi-Tier UDA is exceptionally fast and secure, and downloads with a free, > non-expiring 2 user license. > In addition, free support is available at > http://www.openlinksw.com/support/suppindx.htm > > Please let me know if you require assistance. > > Best regards, > Andrew Hill > Director of Technology Evangelism > OpenLink Software http://www.openlinksw.com > Universal Data Access & Data Integration Technology Providers

« previous php.db (#10232) next »