Re: [PHP-DB] IBM DB2 on Linux with PHP is very slow
I'm experiencing slowness in the fetching of result sets. I set the cursortype parameter as suggested by Christian Szardenings to SQL_CUR_USE_ODBC, and I get the following: Warning: SQL error: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00, SQL state S1C00 in SQLSetConnectOption in /home/butcher/public_html/php/service_portal/content.php(68) : eval()'d code online 56 msg: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00 The SQLSTATE pretty well says it all - I've been through the CLI docs and all the words indicate that this cursortype isn't supported. Side note: according to the IBM docs, SQLSetConnectOption is deprecated in favor of SQLSetSQLAttr or some such... Anyone have any clues? I'm using DB2 V7.1. Regards, Glenn Butcher PS - I sent a similar query last week; my identity wasn't properly configured and my reply-to address went out as an IP address - my apologies. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] IBM DB2 on Linux with PHP is very slow
I just tried the Cursortype parameter (apache-1.3.20+php-4.0.6, DB2-7.1), but I get this message: Warning: SQL error: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00, SQL state S1C00 in SQLSetConnectOption in /home/butcher/public_html/php/service_portal/content.php(68) : eval()'d code online 56 msg: [IBM][CLI Driver] CLI0150E Driver not capable. SQLSTATE=S1C00 Is there something I must enable? I've been through the DB2 docs and can't find anything related... g Christian Szardenings wrote: > > 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" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] IBM DB2 on Linux with PHP is very slow
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" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] IBM DB2 on Linux with PHP is very slow
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 > -Original Message- > From: news.php.net [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 09, 2001 5:59 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] IBM DB2 on Linux with PHP is very slow > > > > Hi, > > does someone has a DB2 UDB from IBM working with > PHP in a production envirement ? How is the performance? > > For a relaunch of our existing production system running > on IBM DB2 on serveral IBM RS/6000 servers we tested > the performance of connecting PHP to this database. > > And what can I say: It's very slow. For example: > A simple SELECT Query giving 100 records as result > takes about 6 until 10 seconds(!!!) when using PHP. > > In detail: Connecting to Database lasts about 0.01 - 0.05 seconds (so, 10 > ms - 50 ms), > sending the query (odbc_exec... ) lasts about the same time. > > Then the bottleck: reading each record with odbc_fetch_into lasts > between 0.02 till sometimes 2 (two seconds!!!). > > Now maybe you guess it's a problem of the DB2? We tested > the same query on the same server with a simple java-servlet with > jdbc, and the whole thing (connecting, query, and getting all records) > lasts about 0.09 till 0.2 seonds > > So PHP is almost 300% till 500% slower!! I searched all > newsgroups and I found some people that has/had the same > problems. > > We couldn't solve that problem by removing the TCP/IP > Problem of DB2 (setting some value ...mgnr = 1, i don't > remember it's name :-))). > > No our CEO says, we should code the application in JAVA, > but that seems a very poor solution for us. So my question: > Does anybody had similar problems and solved it? Or is > anybody willing to help us? Maybe we can find some other > companies/people that also want to connect to DB2 with > a good performance, and we could improve the DB2 functions > of PHP or writing our own?? > > Or whats with other databases: are there similar problems > with Oracle??? Oralce would be a great idea, but we > spent some huge amount on the db2 so maybe it's > no good idea to put the db2 into the trashcan and buy > oracle for thousands of dollars. What's with Postgres? Our > problem is that we must store 10 million records a month, > and the database shouldn't have a problem with this. > > Thank you for reading this, and maybe someone > can help, > > Kind regards, > Christian Szardenings > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] IBM DB2 on Linux with PHP is very slow
Hi, does someone has a DB2 UDB from IBM working with PHP in a production envirement ? How is the performance? For a relaunch of our existing production system running on IBM DB2 on serveral IBM RS/6000 servers we tested the performance of connecting PHP to this database. And what can I say: It's very slow. For example: A simple SELECT Query giving 100 records as result takes about 6 until 10 seconds(!!!) when using PHP. In detail: Connecting to Database lasts about 0.01 - 0.05 seconds (so, 10 ms - 50 ms), sending the query (odbc_exec... ) lasts about the same time. Then the bottleck: reading each record with odbc_fetch_into lasts between 0.02 till sometimes 2 (two seconds!!!). Now maybe you guess it's a problem of the DB2? We tested the same query on the same server with a simple java-servlet with jdbc, and the whole thing (connecting, query, and getting all records) lasts about 0.09 till 0.2 seonds So PHP is almost 300% till 500% slower!! I searched all newsgroups and I found some people that has/had the same problems. We couldn't solve that problem by removing the TCP/IP Problem of DB2 (setting some value ...mgnr = 1, i don't remember it's name :-))). No our CEO says, we should code the application in JAVA, but that seems a very poor solution for us. So my question: Does anybody had similar problems and solved it? Or is anybody willing to help us? Maybe we can find some other companies/people that also want to connect to DB2 with a good performance, and we could improve the DB2 functions of PHP or writing our own?? Or whats with other databases: are there similar problems with Oracle??? Oralce would be a great idea, but we spent some huge amount on the db2 so maybe it's no good idea to put the db2 into the trashcan and buy oracle for thousands of dollars. What's with Postgres? Our problem is that we must store 10 million records a month, and the database shouldn't have a problem with this. Thank you for reading this, and maybe someone can help, Kind regards, Christian Szardenings -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]