Database partition method and device
A database and data technology, applied in the field of communication, can solve problems such as increasing query time, and achieve the effects of reducing query scanning time, improving performance, and reducing the time required
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0032] refer to figure 1 , showing Embodiment 1 of a database partitioning method of the present invention, including the following steps:
[0033] Step 101, obtaining various required report types.
[0034] The type of report required can be determined according to the actual situation. Generally speaking, the year, month, and date of the performance report made by the staff change, but the time point (hour, minute, and second) remains unchanged. For example, the daily report of a bureau, The start time is 8:00 in the morning, and the end time is 8:00 in the morning of the next day. Although the date changes every time a report is made, the time point of 8:00 does not change. Even under special circumstances, the time points of some types of reports will change, but the time points of most types of reports will be relatively stable, and it is necessary to obtain reports with relatively stable time points and infrequent changes. For example, a network-wide daily report for ...
Embodiment 2
[0050] refer to figure 2 , showing a second embodiment of a database partitioning method of the present invention, including the following steps:
[0051] Step 201, obtaining various required report types.
[0052] Step 202, determine database partition rules according to time nodes in various required report types.
[0053] Step 203, write the determined database partition rules into the configuration file, and use the scheduled task to automatically create partitions according to the configuration file.
[0054] For example, for an oracle database, you can use iob as a scheduled task to automatically create partitions for the database according to the configuration file.
[0055] By writing the partition rules into the configuration file and using the scheduled task to automatically create partitions according to the configuration file, the system can automatically create partitions according to the partition rules, avoiding errors caused by human operations.
Embodiment 3
[0056] refer to image 3 , showing a third embodiment of a database partitioning method of the present invention, including the following steps:
[0057] Step 301, obtaining various required report types.
[0058] Step 302, determine database partition rules according to time nodes in various required report types.
[0059] Step 303, judge whether the query condition of the required data in the required report contains other conditions except time, if necessary, determine the database sub-partition rules according to the corresponding query condition, and proceed to step 304A; otherwise, proceed to step 304B.
[0060] In step 304A, the database is partitioned according to the determined database partition rules, and the data partitions are sub-partitioned according to the database sub-partition rules.
[0061] Step 304B, partition the database according to the determined database partition rules.
[0062] Other query conditions can be whether it is necessary to query and co...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 