Thought Experiment: Splitting A Single Data Table Up Into High-Writes And High-Reads For Better Performance In MySQL
DRANK

CAUTION: This post is just me thinking out-loud about an interesting MySQL database performance problem that I have faced at work.At InVision, we store a date/time stamp that represents the last request that each user makes to the application. We used to use this data-point to indicate "presence" within the application; and now, we use it to better understand the heartbeat of the system. For the sake of this thought experiment, imagine that we have a user table that has the following columns:id (pkey)nameemaillastRequestAt (date/time)As you might imagine, in a thick-client, AJAX (Asynchronous JavaScript and JSON) driven application, the user makes a lot of requests to the server. As such, this lastRequestAt column gets written-to the database a lot. The problem is, this lastRequestAt column is part of the user table; which, as you might also guess, gets read-from a lot. In fact, every request during a logged-in Session would cause both a read-from and a write-to the user table.For the…

bennadel.com
Related Topics: MySQL