|
Summary: The three databases, MiniSQL, MySQL and DB2 are benchmarked for comparison using a variety of typical tasks and loads. Performance measurements were conducted on a comparatively slow system, i.e. 133 mhz Pentium processor with 128 megabytes of memory and a single slow (5,000rpm) SCSI drive. DB2 and other heavy weight relational databases perform significantly better when they have access to multiple drives and multiple CPU's to take advantage of parallel operations, so these measurements distinctly favor mSQL and MySQL. However, the test system is more typical of what a light weight relational database would run on. All operations were performed via SQL from the 'console' which comes with each database. This measures the performance of the console as well as the underlying database engine. This should not be important for the more intensive requests (which take much longer than a second). For very fast requests the console can be the primary bottleneck. However, for these fast requests, the actual path you take to get to the database engine will also likely be the primary performance bottleneck and you will have to take that into consideration. For most web based applications, the external delays of just getting the request to and from your server dominates over any but the most serious database operations. As a general rule, the light weight relational databases were much faster on simple requests but the performance degraded as the requests became more complex and the tables being accessed got larger. The following operations were performed in the performance measurements:
The raw numbers are as follows:
On updates, mSQL could only do the simple updates, but it was blindingly fast. MySQL was a comparative laggard, but this is almost certainly due to forcing a disk write on each update. DB2 did better by caching all writes and then forcing the updates to disk in blocks on completion of the request. Also, the version of mSQL that I tested had a bug (reported and identified but not fixed by the time of this review) that cached too well in that I was unable to see recent additions to a table after an insert completed. All tests were performed until the results stabilized and then measured three times with the reported results the average of these three. This was important as DB2 learns from previous requests the nature of the requests that are normally submitted and performance improves over time in a consistent environment. Each test was run as a script and all tests were run sequentially with a stop and start of the database engine in between. mSQL supports table joins in selects, but does not seem to recognize that the specified join did not require building a new (and huge) logical table, but simply required an index scan. As such, the performance of the Complex Count (join) degraded as the square of the table size and was not tested for the 100,000 record table. This test was only run once for the 10,000 record test table due to the long time to complete. mSQL also aborted on the 'order by' clause of the 'Group Count' test with 100,000 records. DB2 showed the worst performance on the Index Select, which was 50 very easy selects indicating that the normal path through the DB2 console to the database engine and back is about a third of a second. It seems to less than a hundredth of second for mSQL and about a fiftieth of a second for MySQL. However, console performance is seldom an overall throughput issue and the improved error messages by DB2 may warrant the increased delays by the console. |
Copyright © 1999 - Falcon Networking | ISSN 1203-5696 | February 1, 1999 |