|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22558 DB2 seems to be 10x slower than MYSQL running a simple select statement
Submitted: 2003-03-05 14:13 UTC Modified: 2003-03-05 16:42 UTC
From: danl at icarz dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 4.2.3 OS: AIX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: danl at icarz dot com
New email:
PHP Version: OS:


 [2003-03-05 14:13 UTC] danl at icarz dot com
Table structures on DB2 and MYSQL are the same, yet DB2 always seems to take about 200ms as compared to 20ms on MYSQL. Any information would be greatly appreciated.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-05 14:42 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

MySQL is designed for speed DB2 is designed for scalability & large applications where stability & data integerity is more important then speed. Hence the difference you are seeing, as is this is NOT a php bug or even a PHP related issue.
 [2003-03-05 16:42 UTC]
Just to answer this a bit further.  DB2 uses ODBC as it's native system, MySQL uses a private/custom interface.  When one can optimize for speed to a single protocol, DB2 worries about all protocols.  It's going to be slower no matter what you do.
 [2003-07-13 06:40 UTC] port at iname dot com
This may be useful - From UnixODBC 2.2.0 Doco

Another useful hint. Somewho has been using PHP+DB2 on AIX via unixODBC to a BIG IBM server (4 processors, bags of core etc), and finding it was slow. It turns out there is a bug
in IBM's TCP/IP stack. after looking at this and setting this 

$ su - db2inst1

To quote "... the difference was UNBELIEVABLE !!!". Thanks Eric. 

"This" is the following link

Remember - DB2 is a lot more complex than MySQL, and diagnosing issues is not as simple as saying "it's slow". That's why there are highly paid DBA's!

Additionally there's no information in this bug report about whether the DB2 DB is on the same box, load, versions, what's been attepmpted or any other information that could be remotely useful.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 21:01:29 2024 UTC