# MySQL Sharding Gets Things Worse: Database Operation Nightmare

![`smart`](./student-guide/diagram/ArchBeforeTiDBSharding_en_001_20220721.png)

------------------------------------------------------------------------------
One way of handling the increase in writes is to split the data over multiple databases using what's called sharding.

To begin with you might store all information for users with userid starting with the letters A through Z in a single database (with replication).

To increase the write capacity you split the database into two - where some users are handled in the first database and some in the second. This tends to also need logic in the application to make sure queries are done against the correct database. Now I'm using the first letter of the user ID as an example, but more common is using something like a consistent hash to determine the shard used for a specific piece of data.

When you need to increase capacity further, you do the same thing and split the data set again. And your ops nightmare begins.

