[ACCEPTED]-DB2 vs PostgreSQL vs SQL Server-db2

Accepted answer
Score: 18

I work in a very large organization that 37 uses DB2 primarily on Linux (Red Hat). We 36 have a number of large databases and have 35 investigated moving to other RDBMS solutions, such 34 as Oracle and SQL Server. I did a lot of 33 work on the SQL server end of that.

We found 32 that SQL server performs much better and 31 requires less tuning than DB2, especially 30 when tables frow larger than 1M records. HADR 29 is also difficult and bulky, to say the 28 least.

We found many differences between 27 DB2 and SQL Server, and too many to list 26 here. I was responsible for doing a lot 25 of the engineering behind code conversion 24 from one platform to another, and can't 23 say I found anything in DB2 to be superior 22 to SQL server, but did find many things 21 I liked better about SQL server. Here are 20 some off the top of my head:

  • Better selection data types in SQL Server, such as MONEY and SMALL MONEY.
  • Mixed character encoding in SQL Server. Some columns can be ANSI and others UNICODE (char and nchar, respectively). Setting this up in DB2 is neither straightforward nor easy.
  • Better tools in SQL server, mainly SSIS for ETL (As opposed to the insanely priced IBM Data Stage).
  • SQL server has more forgiving syntax. For example, you don't need semi-colons everywhere. Maybe just a personal preference but I found it much easier to code in T-SQL.
  • Many advanced features seem to work better in SQL server. For example, SQL server lets you do page-level compression, where DB2 is limited to row-level compression.
  • It was easier to tune SQL Server queries with the SQL Server IDE

There are more, but 19 honestly I suggest that anyone who is considering 18 one over the other should set both up and 17 spend some time working with both systems. Right 16 now it seems like SQL server is a better 15 overall solution, but DB2 may one day take 14 the crown.

Lastly, when dealing with data 13 warehousing, SQL, SSIS, and SSAS made a 12 much better solution than InfoSphere, DataStage, and 11 DB2. I could write a whitepaper on it, but 10 my suggestion here is to set it up on your 9 own and spend a week or to playing with 8 each solution. Microsoft's solution here 7 was faster and cheaper than IBM's. I don't 6 know of any other basis upon which to make 5 a decision.

Platform shouldn't be an issue 4 since databases generally run on their own 3 machines, but there are always those "no 2 microsoft!" and "no linux!" shops around. It's 1 a shame, really. I'd recommend SQL server.

Score: 11

As a DB2 person, I can offer a few details 5 about what you could expect from running 4 DB2 for Windows and developing .NET applications 3 for it. The following details were current 2 as of version 9.7, which was released in 1 June 2009.

  • Drivers and API support for just about any Windows programming language and IDE, including .NET and Visual Studio extensions
  • A no-cost, production-ready database engine (Express-C) that has no database size limit and is the least restricted when compared to Oracle Express and SQL Server Express
  • A self-tuning database engine for Windows that automatically handles the sizing of several memory buffers that are critical to good performance
  • Rock-solid support for XML as a native datatype, handled by its own dedicated query engine that is optimized for XML's hierarchical nature. Queries can access any combination of XML and tabular data with any combination of SQL and XQuery expressions
Score: 7

Avoid microsoft like the plague. Always 25 push to use PostgreSql even on windows, way 24 better support for developing applications 23 for e.g. Java/Python and still has good 22 support in .NET. Also of course is completely 21 free which given the current license fees 20 for SQL Server is nothing to be sniffed 19 at even if you're a multi-million dollar 18 company.

For the cost of 1 SQL Server license 17 you are going to save £30,000 (say $40,000) or 16 more - buy better hardware to run Postgres 15 on and still have a net benefit.

As far as 14 performance, really if this is such a massive 13 issue we should not be using either DB2, SQL 12 Server or Postgres anyway. The difference 11 between the three is negligible for their 10 design purposes.

Edit: On the .NET integration, actually 9 this is really poor in SQL Server anyway, it 8 does have more features than Postgres/DB2 7 admittedly but it's not really hugely advantageous 6 over SSIS or stored procedures. I could 5 see the main use case in my work as accessing 4 classes and functions from a CLR .dll but 3 then you're implementing logic in the database 2 which may or may not be a good idea for 1 you.

Score: 6

If you're a .NET shop, and are either using 13 a small database (i.e. Sql Server Express), or 12 have the money for the full SQL Server, use 11 it. SQL Server will perform better than 10 PostgreSQL for most actions, and about the 9 same as DB2.

PostgreSQL is fantastic if 8 you need multi-platform support, are Linux-based, or 7 need a free product that's not Microsoft.

I 6 haven't used DB2 in over 10 years, other 5 than running an in-house performance test 4 vs. other databases (where it was about 3 the same for a transactional database as 2 Oracle/SQL Server, where were better than 1 MySQL, PostgreSQL, etc).

Score: 2

If you are a .net shop stay with SQL Server.

Using 5 any other database platform would require 4 non-Windows to get the best out of it. On 3 Windows, SQL Server is king simply because 2 MS own both OS and SQL Server (Like Oracle/Red 1 Hat).

More Related questions