摘要 |
Embodiments of the present invention provide a data partitioning method and apparatus. The method includes: determining tuple relationship information according to received mixed loads and structure information of a database; determining tuple split cost information according to a feature about whether the mixed loads are executable in parallel and the tuple relationship information; obtaining multiple partitioning schemes according to the tuple split cost information, and determining, from the partitioning schemes, a partitioning scheme with a minimum total cost value as an optimum partitioning scheme to perform partitioning processing on data stored in the database. In the data partitioning method and apparatus, according to a feature about whether mixed loads are executable in parallel, optimum partitioning is performed on data associated with the mixed loads in a database, after partitioning, data has features of a transaction load and an analytical load in the mixed loads, so that when different loads access data in a database system, the loads can obtain higher access efficiency, thereby improving working performance of the database system oriented to the mixed loads. |