Tuesday, October 18, 2016

TokuDB vs InnoDB

TokuDB vs InnoDB

Introduction

I was privileged to have a change to study TokuDB and test it extensively as we explored different Table engines for Percona to help with heavy writes. As part of my research, i spend a lot of time discovering and exploring different database technologies that can be of benefit to our team.


When you compare TokuDB clustering vs using regular indexing in InnoDB, we can see that TokuDB clustering does improve query performance as shown in the graph below.


But when we create a covered index on the InnoDb? table, where all fields in the select are included in the index, then we can see that the covered index is almost the same as TokuDB clustering performance wise. In fact, the graph below shows "slight" improvement in query performance.


Even though the TokuDB clustering can enhance query performance, it is at a great expense of disk, and also at the expense of inserts and update sql statements. Large indexes (too many on a table) are always an issue when it comes to inserts and updates.

CONCLUSION

The highly praised clustering in TokuDB might not necessary be a great advantage. I think the side effect i.e, disk space and bad write and update performance is something to really ponder upon. Maybe this might not be so much of a deal in an environment with so many reads compared to writes. But even with reads, if the data set becomes too large and cannot fit in memory, this comes a performance issue. However, TokuDB claims that the engine stays consistent even if the data set over grows total

No comments:

Post a Comment