Method and system for automatically creating database index according to log analysis
A technology for automatically creating and creating indexes, applied in the database field, can solve problems such as the inapplicability of static indexes, and achieve the effect of improving query speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0057] Please refer to figure 1 , The first embodiment of the present invention is:
[0058] A method for automatically creating database indexes based on log analysis, including:
[0059] S1. Create a database log to record database operations performed on the data table. The database operations include query, insert and modify;
[0060] S2. Count the total number of database operations in one day and the number of queries, inserts, and modifications to each column in the data table;
[0061] S3. Calculate the proportion of the number of queries, inserts, and modifications based on the total number of database operations and the number of queries, inserts, and modifications to each column in the data table;
[0062] S4. Generate index column names according to the proportion of the number of queries, inserts, and modifications; specifically: create index column names for columns that account for more than 50% of the number of queries or save existing index column names; account for the...
Embodiment 2
[0066] Please refer to figure 2 , The second embodiment of the present invention is:
[0067] A system for automatically creating database indexes based on log analysis, including:
[0068] The setting module 6 is used to set a preset time period and a preset time period; the setting module 6 includes: a first statistics module 61, used to count the number of database visits within the preset time period; a first setting module 62, used to Set the time period during which the database has the lowest access volume as the preset time period.
[0069] The creation module 1 is used to create a database log and record database operations performed on the data table, the database operations including query, insert and modify;
[0070] Statistics module 2, used to count the total number of database operations in a preset time period and the number of queries, insertions, and modifications to each column in the data table;
[0071] The calculation module 3 is used to calculate the proportion...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 