This is a question I get asked quite often (twice this week) so I figured I may as well put the answer in to digital ink. If you ever worked with IBMers you probably know that our ready made answer is “it depends”. As much as I hate it I will not stray from this tradition. So, when asked if using 64-bit DB2 Express-C makes sense I have to answer with “it depends” but I will explain how to quickly and easily make the right decision.
By now you probably guessed that DB2 Express-C is available as both 32-bit and 64-bit code. The price for both is the same i.e. both are free. So, how do you decide which one to use? First, to even consider this question, you have to figure out if your hardware and operating system are or can be 64-bit. If you are planning to run DB2 Express-C on Linux on POWER (System p and System i servers) your choice is clear as you can only use the 64-bit version of DB2 Express-C. If you will be deploying on SUN Solaris x86 than your choice is equally easy … 64-bit is the only DB2 Express-C choice you have.
Where you have to make a decision is when deploying DB2 Express-C on Windows or Linux on Intel/AMD machines. Most people hold a popular but mistaken belief that you have to have more than 4GB of memory to benefit from 64-bit. This belief rooted in the fact that 32-bit systems provide 232addressing i.e. can support 4GB of memory. And since even the paid version of DB2 Express-C can only utilize a maximum of 4GB of memory 64-bit DB2 would not be any better than the 32-bit version. 64-bit architectures bring more benefits than just larger addressable memory. They also provide wider registers and wider I/O path to the CPU. Another important point is that both 32-bit version of Windows and 32-bit versions of Linux reserve memory below the 4GB line for their own use. So, if you are running 32-bit OS on a system with 4GB of memory, DB2 effectively will be limited to about 2.4 – 3.8GB depending on the OS and the way it is configured. On a 64-bit system you are guaranteed have the entire 4GB of memory available for DB2 Express-C. So, 64-bit really is better.
Choosing 32 or 64-bit version of DB2 Express-C will depend more on where and how you plan to use it than performance benefits you would get from 64-bit. My recommendation is that if you are inclined to run 64-bit OS than you should definitely use 64-bit version of DB2 Express-C. if you are thinking Linux and you are considering production use than do consider 64-bit Linux and 64-bit DB2 Express-C. The same is true if you are going to go for production use on Windows 2003/2008 servers. However, if you are using DB2 Express-C to learn or to build software than you are most likely better off staying with 32-bit OS and DB2 Express-C. The current state of 64-bit Windows XP and Vista is not all that great as there is still a lack of 64-bit drivers for many peripherals.
Bottom line: try to use 64-bit OS and 64-bit DB2 Express-C in production. On your development machine 32-bit will be just fine.