Method and apparatus for data preheating
First Claim
1. A method for data preheating, the method comprising:
- reading, separately, hit ratio information and user configuration information when a database is started, wherein the hit ratio information comprises a hot data table, and the user configuration information comprises a preset hot data table, storage proportions of a to-be-loaded hot data block stored into a shared buffer and a flash memory device, a capacity of the shared buffer, a storage capability of the flash memory device, and a deviation value of the total number of the to-be-loaded hot data blocks;
obtaining a union set of the preset hot data table in the user configuration information and the hot data table in the hit ratio information;
determining the total number of the to-be-loaded hot data blocks from the union set according to the storage proportions, the capacity of the shared buffer, a capacity of the flash memory device, a size of the hot data block, and the deviation value;
determining, according to the storage proportions, the to-be-loaded hot data block to be stored into the shared buffer and the flash memory device; and
storing, separately, the to-be-loaded hot data block into the shared buffer and the flash memory device.
2 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the present invention disclose a method and an apparatus for data preheating, which relate to database technologies, so as to increase a responding speed of a database system, reduce frequent IO on a magnetic disk, and improve overall performance of the database system. The method includes: when a database is started, reading hit ratio information from a flash memory device and reading user configuration information from a hard disk; obtaining a union set of a preset hot data table in the user configuration information and a hot data table in the hit ratio information; determining the total number of to-be-loaded hot data blocks from the union set; according to the storage proportions, determining the to-be-loaded hot data block to be stored into a shared buffer and the flash memory device; and separately storing the to-be-loaded hot data block into the shared buffer and the flash memory device.
18 Citations
16 Claims
-
1. A method for data preheating, the method comprising:
-
reading, separately, hit ratio information and user configuration information when a database is started, wherein the hit ratio information comprises a hot data table, and the user configuration information comprises a preset hot data table, storage proportions of a to-be-loaded hot data block stored into a shared buffer and a flash memory device, a capacity of the shared buffer, a storage capability of the flash memory device, and a deviation value of the total number of the to-be-loaded hot data blocks; obtaining a union set of the preset hot data table in the user configuration information and the hot data table in the hit ratio information; determining the total number of the to-be-loaded hot data blocks from the union set according to the storage proportions, the capacity of the shared buffer, a capacity of the flash memory device, a size of the hot data block, and the deviation value; determining, according to the storage proportions, the to-be-loaded hot data block to be stored into the shared buffer and the flash memory device; and storing, separately, the to-be-loaded hot data block into the shared buffer and the flash memory device. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An apparatus for data preheating, the apparatus comprising:
-
a processing device comprising at least one processor, the processing device configured to; read, separately, hit ratio information and user configuration information when a database is started, wherein the hit ratio information comprises a hot data table, and the user configuration information comprises a preset hot data table, storage proportions of a to-be-loaded hot data block stored into a shared buffer and a flash memory device, a capacity of the shared buffer, a storage capability of the flash memory device, and a deviation value of the total number of the to-be-loaded hot data blocks; obtain a union set of the preset hot data table in the user configuration information and the hot data table in the hit ratio information; determine the total number of the to-be-loaded hot data blocks from the union set according to the storage proportions, the capacity of the shared buffer, a capacity of the flash memory device, a size of the hot data block, and the deviation value; determine the to-be-loaded hot data block to be stored into the shared buffer and the flash memory device according to the storage proportions; and store, separately, the to-be-loaded hot data block into the shared buffer and the flash memory device. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
Specification