Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Inactive Publication Date: 2015-11-11
FUJIAN TQ DIGITAL
View PDF4 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, since the visitors are changing at any time, the artificially created static index may only be able to cope with some scenarios of a specific period of time, or some scenarios in the past
In other periods outside the specific period, or in future changes, the static index created before is often not applicable

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for automatically creating database index according to log analysis
  • Method and system for automatically creating database index according to log analysis

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for automatically creating a database index according to log analysis. The method comprises: creating a database log and recording a database operation performed on a data table, wherein the database operation comprises query, insertion and modification; making statistics on the total frequency of the database operation and the query, insertion or modification frequency of each column in the data table within a preset time period; according to the total frequency of the database operation and the query, insertion or modification frequency of each column in the data table, calculating a ratio of the query, insertion or modification frequency; according to the ratio of the query, insertion or modification frequency, generating an index column name; and creating the database index according to the index column name within the preset time period. The invention further provides a system for automatically creating the database index according to the log analysis. The system is capable of automatically creating an optimal database index and dynamically updating the database index.

Description

Technical field [0001] The invention relates to the field of databases, in particular to a method and system for automatically creating a database index based on log analysis. Background technique [0002] At present, the indexes of the database are created manually according to the actual use of the system, or according to daily experience, and optimized. However, since the people who visit are changing at any time, the artificially created static index may only be able to cope with a certain period of time, or some scenes in the past. In other periods outside of a certain period, or in future changes, the static index created before is often not applicable. Summary of the invention [0003] The technical problem to be solved by the present invention is to provide a method and system for automatically creating a database index based on log analysis, which can automatically create the best index for the database and perform dynamic updates. [0004] In order to solve the above tec...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/901
Inventor 陈丛亮刘德建毛新生
Owner FUJIAN TQ DIGITAL