开发者

MySQL: Large table splitting

I have a huge table in a database and I want to split that into several parts physically, maintaining the database scheme.

For example, the table name is TableName and has 2 000 000 rows.

I would like to split that table into four parts, but I want to work in the same way with the table, so

select [Colum开发者_如何学Cn List] from TableName where [Filter]

insert into TableName ([Column List]) values([Values])

update TableName [Updates] where [Filter]

delete from TableName where [filter]

would work in the same way after splitting the table as before. Basically I want my database to handle in different threads my queries. How can I achieve this?

Thanks in advance.


Perhaps you should look at partitioning.


If you are looking into copying data to a separate slave / duplicate; consider implementing that by binary logging, so the replica will read the binary logs to do the replication, rather than doing it manually or programmatically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜