Click to See Complete Forum and Search --> : MySQL vs DB2


Meni
11-20-2007, 01:00 AM
Hi.

I have just finished developing an application for a client in PHP and MySQL. pretty standard operation in terms of the use of PHP and MySQL, only there is LOTS of data.

Queries sometimes run on tables as large as 15-20GB.

I got a heads up from the client that I MAY need to migrate from MySQL to DB2, his reasons - are not technical, but rather come from the business side.

Haven't had any experience with DB2.

I would love to hear your thoughts on DB2, since IBM is doing a pretty good job in bombarding the web with biased articles like "how good db2 really is" etc., and finding a real, objective opinion is hard.

felgall
11-20-2007, 03:15 PM
DB2 has been around longer than most of the other relational databases that are popular at the moment. Most of the others that were around when DB2 was first created either no longer exist or have a very small market so that hardly anyone has ever heard of them.

Unless you are using proprietary code in your SQL migrating between different relational databases should be a fairly painless process as the same code should work for all the database calls with only the code to establish the link to the database possibly needing to be changed.

The only real difference I have ever noticed between DB2 and mySQL is which platforms that they run on as there are some operating systems that support one but not the other.

With relatively small tables such as you need I wouldn't expect that there would be any enormous difference in processing times if the database is properly optimised.

johnbrown362003
11-30-2007, 05:13 PM
Hi.
Queries sometimes run on tables as large as 15-20GB.

Haven't had any experience with DB2.

I would love to hear your thoughts on DB2, since IBM is doing a pretty good job in bombarding the web with biased articles like "how good db2 really is" etc., and finding a real, objective opinion is hard.

UDB / DB2 is a very good reliable and solid database server with tons of functionality. It may be overpriced, compared to MYSQL, if you are not using a lot of their functionality. I believe functionality may be the primary differentiator, all things being equal.

The administration GUI is okay though not as user friendly or functional like MS SQL Server and there is hardly any third party user guides such as available for MYSQL, SQL Server or Oracle. (Browse Amazon to see the limited outdated selection for DB2 books).

The DB2 database server has a lot of functionality though in a web based application you may face issues for high volume read requests since it does not support MVCC. Version 9.5 has Optimistic locking, a new feature, which needs time to stabilize. If you need to rearrange table layouts (rename, move or change column types) it is a PIA. The only clean way is to export, recreate table, import, recreated dependent objects (views, indexes etc). They have made several changes in 9.1/9.5 though they still need work.

I came across your thread as I was looking for comparison with MYSQL and DB2. We are using DB2 and looking to support MYSQL due to the recent issues with IBM changes to DB2 licensing and fast talking on CPU restrictions and memory restrictions, what is a CPU versus what is a CPU core and such kinds of stuff. Check out the DB2 Express forums to form your own opinion.

Here is the IBM forum on DB2 Express:
http://www.ibm.com/developerworks/forums/forum.jspa?forumID=805&start=15


If you have the dollars for DB2 then go for it. Though avoid using any of the DB2 proprietary functionality (e.g. pureXML ) as you will not be able to migrate away from DB2 if you need to.

If you anticipate your needs growing where you need more horsepower, CPU and memory, and may require to upgrade your DB2 license, and depending on the functionality you are using in DB2, then it gets expensive quick. Spend some time learning about the DB2 family and editions to understand the cost for your growth path.