IBM DB2 on Linux with PHP is very slow

From: Date: Mon, 09 Jul 2001 21:59:23 +0000
Subject: IBM DB2 on Linux with PHP is very slow
Groups: php.db 
Request: Send a blank email to php-db+get-10188@lists.php.net to get a copy of this message
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

« previous php.db (#10188) next »