Having just got my hands on a Pi2, I was interested in running a database performance test on it to see how the Pi2 compares in speed with a Pi B+. I prepared a new microSD card with the latest Raspian image, used apt-get update and upgrade to make sure I was really up to date (as of this morning), and then ran my performance test on a B+. I then shut down the machine, put the card in a Pi2, and ran the performance test again - so the database software was exactly the same in both runs. No over-clocking on either board!
Looking at the single-threaded case, the Pi B+ gave me an insert rate of 1282 records per second (each insert being done as a single transaction, and waiting for one to complete before setting off the next; the client application was running in a separate address space to the database server, with communication via TCP/IP to ensure the database was protected in case the client application misbehaved.) On the Pi2, I got a figure of 5263, 4.1 times faster! The various other tests with a single-threaded client gave similar performance improvements: the deletion rate went up from 1299 to 5556 records per second, for example, a performance improvement of 4.3; the lowest figure I got was from the single-threaded tests was 3.2 (when doing a series of queries each returning 50 records at a time).
The test suite I was using can also do the tests using multiple connections in separate threads, to really hammer the database server. On the B+, this does not lead to better performance; indeed on some of the tests performance can be fractionally worse, probably due to the extra overheads of managing multiple threads. On the Pi2, though, the extra cores come into play; even though the database server I was using does not use multiple threads to handle an individual transaction, it does use them for handling client server communications, for example. The insert rate increased to 8696 records per second, an improvement of 6.8 times that achieved on the B+, and the update and deletion tests saw similar improvement, with figures of 6.8 and 7.3 respectively. For queries, the improvement was even better, hitting 8.1; this is because the server knows that queries for separate clients can be done in parallel as there is no danger of getting inconsistent results. So, in summary,
when using just a single-threaded client application (and driving the database server in a way where it would also be running just one thread at a time) the software was running about 4 times faster
on the Pi2 than it had been on the B+. when driving the database harder via a multi-threaded client application, the performance improvement was up to 8 times
better. The Pi2 is a winner!(for the record, the software I was using was Polyhedra, an in-memory relational DBMS that uses the client-server model. I was using its primary API: ODBC. Polyhedra Lite is available for free on the Raspberry Pi - see http://developer.polyhedra.com for details of the software and for download instructions.)