List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:June 12 1999 8:17am
Subject:Re: MySQL vs DB2
View as plain text  
>>>>> "Tani" == Tani Hosokawa <unknown@stripped> writes:

Tani> I don't think you can really compare MySQL and DB2 :-)  DB2 is like, the
Tani> big iron of database engines.  If you want a really good comparison, check
Tani> out the latest issue of Unix Review's Performance Computing.  A quotish
Tani> line (I can't remember, I don't see the issue right here) "If you need
Tani> 100% uptime, scalability and subsecond responses on massive datasets you
Tani> need DB2" (as opposed to Oracle and all others).

Tani> It's also feature rich and all that.  Good stuff, if you need it.

Hi!

On can always compare raw speed for features that both support.
(This is exactly what the MySQL benchmarks does)

We haven't been able to test the native interface to DB2 as we don't
have Perl DBD driver for it.  The following table shows the speed
difference between native MySQL, MySQL through ODBC and DB2 through ODBC,
which should give an indication of the speed differences.

(The test is on NT, so things may of course be better on other
platforms):

The result logs which where found and the options:
 1 mysql-NT_4.0-cmp-db2,informix,ms-sql,mys: MySQL 3.22.16 gamma
 2 mysql_odbc-NT_4.0-cmp-db2,informix,ms-sq: MySQL 3.22.16 gamma
 3 db2_odbc-NT_4.0-cmp-db2,informix,ms-sql,: IBM DB2 5

======================================================
Operation                    |      1|      2|      3|
                             |mysql-N|mysql_o|db2_odb|
------------------------------------------------------
Results per test in seconds:                         |
------------------------------------------------------
ATIS                         |     71|    168|    515|
alter-table                  |      5|      4|       |
big-tables                   |     74|    100|    250|
connect                      |    155|    459|       |
create                       |     72|     78|   1106|
insert                       |   5368|   6744| +17508|
select                       |   +899|  +1003|  +1934|
wisconsin                    |     38|     74|    368|
------------------------------------------------------
The results per operation:                           |
------------------------------------------------------
alter_table_add (8)          |      1|      1|       |
connect (10000)              |     56|    189|       |
connect+select (10000)       |     64|    211|       |
count (100)                  |     54|     58|     87|
count_key (50000)            |   +665|   +709|   +753|
count_on_key (100)           |     31|     34|     58|
create+drop (1000)           |     14|     15|    408|
create_index (8)             |      2|      1|       |
create_key+drop (1000)       |     18|     20|    193|
create_table (1031)          |     23|     23|    439|
delete_big (15)              |    678|    681|    451|
delete_key (500)             |      1|      2|     16|
drop_index (8)               |      1|      1|       |
drop_table (1028)            |      3|      4|    107|
insert (350768)              |    381|    619|   3460|
insert_duplicates (300000)   |     68|    144|    353|
insert_key (100000)          |   2906|   2908|   2484|
insert_many_fields (20000)   |     30|     40|    135|
min_max (60)                 |     26|     28|     56|
min_max_on_key (73000)       |    220|    268|  +1631|
order_by (10)                |    100|    382|    361|
order_by_key (10)            |     73|    355|    369|
select (20000)               |     21|     39|       |
select_big (10080)           |     88|    377|   *383|
select_distinct (800)        |     17|     35|     82|
select_group (3191)          |     53|     61|    184|
select_join (200)            |     31|     91|    225|
select_key (200000)          |    367|    464|  +1206|
select_key_prefix (200000)   |    375|    470|  +1199|
select_many_fields (20000)   |     44|     60|    113|
select_range (25400)         |     40|     62|  +2170|
select_range_prefix (25000)  |     34|     51|  +2150|
select_simple_join (500)     |      3|     10|     26|
update_key (500)             |      0|      1|      5|
update_key_big (501)         |     26|     26|    542|
update_of_key (256)          |    157|    164|    175|
wisc_benchmark (114)         |      8|     23|     32|
------------------------------------------------------
TOTALS                       |  +6679|  +8627| +19853|
======================================================

The above shows that MySQL ODBC drives slows down things about 23%, so 
I assume the db2 native interface is also about 23% faster.

Regarding performance compared to MySQL, it looks that we don't have
anything to fear from DB2;  Key lookups and inserts are very slow in
DB2 compared to MySQL!

On the other hand, DB2 does have some nice things compared to many
other SQL servers.  The above table shows that DB2 does at least:

- Count optimization from the index table
- Is quite good when inserting rows with many keys (this means it has
  a big key buffer)
- Can use prefix on keys when searching.

Regards,
Monty

Tani> On Sat, 12 Jun 1999, Richard McLean wrote:

>> Hi All,
>> 
>> 
>> I've just spent a week at an Omnis developers training course and 
>> people have been extolling the virtues of DB2.
>> 
>> Omnis is releasing a version of there RAD software for Linux in 
>> Aug/Sept and I was wondering if people have compared the two backends?
>> 
>> Omnis uses DAM's to translate SQL calls depending on the backend and 
>> the first version will have DAM's for DB2 and ODBC (yet to be 
>> confirmed).
>> 
>> How does the performance of MySQL via ODBC compare to native access to DB2?
>> 
>> Omnis: http://www.omnis-software.com
>> 
>> BTW, If anyone is looking for an RAD package that leaves VB for dead, 
>> and competes with the speed of compiled C on Mac/Win/Linux (without 
>> recompiling!!) then check out Omnis, it is simply AMAZING.
>> 
>> kind regards,
>> Richard McLean
>> 
>> ---------------------------------------------------------------------
>> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>> posting. To request this thread, e-mail mysql-thread5084@stripped
>> 
>> To unsubscribe, send a message to the address shown in the
>> List-Unsubscribe header of this message. If you cannot see it,
>> e-mail mysql-unsubscribe@stripped instead.
>> 

Tani> ---
Tani> tani hosokawa
Tani> river styx internet



Tani> ---------------------------------------------------------------------
Tani> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
Tani> posting. To request this thread, e-mail mysql-thread5085@stripped

Tani> To unsubscribe, send a message to the address shown in the
Tani> List-Unsubscribe header of this message. If you cannot see it,
Tani> e-mail mysql-unsubscribe@stripped instead.
Thread
Joining tablesRoger Smith7 Jun
  • Re: Joining tablesSasha Pachev8 Jun
    • MySQL vs DB2Richard McLean12 Jun
      • Re: MySQL vs DB2Tani Hosokawa12 Jun
        • Re: MySQL vs DB2Richard McLean12 Jun
          • Re: MySQL vs DB2Tani Hosokawa12 Jun
            • Re: MySQL vs DB2Michael Widenius12 Jun
              • Re: MySQL vs DB2Luuk de Boer15 Jun
        • Re: MySQL vs DB2Michael Widenius12 Jun
          • Re: MySQL vs DB2Tani Hosokawa12 Jun
            • Comment on "MySQL == not transaction-based" (was: Re: MySQL vs DB2)Jason Haar16 Jun
              • Re: Comment on "MySQL == not transaction-based" (was: Re: MySQL vs DB2)Sasha Pachev16 Jun
  • Re: Joining tablesChristian Mack8 Jun