Question

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 [Column 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.

Was it helpful?

Solution

Perhaps you should look at partitioning.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top