Table separation method based on sorting fields and time routing
A separation method and time technology, applied in the fields of structured data retrieval, instruments, finance, etc., can solve the problems of non-configuration, lack of flexibility, waste of resources, etc., and achieve convenient access, simplified manual operation, and labor cost saving. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0052] Hot table separation scenario: There is a js_access_log database table in the device fingerprint (a web application system developed in Java language), which enters hundreds of thousands of data every day, and tens of millions of data a month. A large amount of data will affect the read and write performance of the table. Therefore, it is necessary to separate the data in the js_access_log table for more than 60 days into the cold table on a quarterly basis, and trigger it every night at 1 am. After the js_access_log database table is separated by the above-mentioned table separation method of the present invention, the formed cold table format is: js_access_log_his_2020_1_3 (2020 is the year, corresponding to the dateFieldName parameter, 1_3 means that the data in the jss_access_log table exceeding 60 days from January to March exists js_access_log_his_2020_1_3 table), js_access_log_his_2020_4_5 and other cold tables.
Embodiment 2
[0054] Cold table separation scenario: Also for the js_access_log database table in the device fingerprint, there used to be a hard-coded scheduled task to write the data in the js_access_log database table for more than 60 days into the js_access_log_his cold table. Two years later, the data in the js_access_log_his cold table exceeded There are hundreds of millions of rows, reaching more than 300 G, and the query data is so slow that it is basically unusable. At this time, the cold table needs to be split into multiple small cold tables to prevent the single table from being too large to be used and maintained. After the timing task is configured, through the above-mentioned table separation method of the present invention, this large cold table can be split into several small cold tables, which can be used for query.
Embodiment 3
[0056] Data cleaning scenario: There is a temporary data table oper_ilog_con in the database, which enters hundreds of thousands of data every day, and the database performance is not good. Therefore, in order to achieve the required performance, only seven days of data need to be kept in the oper_ilog_con table. After configuring the scheduled task, perform step:
[0057] S1. From the database table corresponding to the tableName parameter (ie, the oper_ilog_con table), query the id list of the corresponding data according to the keepDays parameter (ie, seven days) configured in the data cleaning scene, and save the id list through the SQL statement in the xml file to a List of TableInfo objects in the idList parameter.
[0058] S2. Through the sql statement in the xml file, delete the corresponding data from the oper_ilog_con table according to the id stored in the idList parameter.
[0059] If there is any abnormality in the above steps, a prompt will be given.
[0...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com