Automatic creation method of materialized view and fast query method based on materialized view
A materialized view and automatic creation technology, applied in the database field, can solve problems such as slow data insertion speed, low efficiency, and affecting query response speed, and achieve the effect of query efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0042] This embodiment provides a method for automatically creating a materialized view. In this embodiment, the method is as follows figure 1 As shown, including steps S1-S5:
[0043] Step S1: Acquiring historical query records, wherein the historical query records include at least one historical query statement, and any of the historical query statements involves at least one field of at least one basic data table;
[0044] Step S2: mining at least one frequent item set from all the historical query statements, wherein the frequent item set is a set of fields or field combinations that are strongly associated with at least one of the basic data tables;
[0045]Step S3: sort all frequent itemsets related to the same basic data table according to the correlation from strong to weak to obtain the sequenced set of frequent itemsets;
[0046] Step S4: For the first time, create corresponding materialized views sequentially according to the sequence set of frequent itemsets, calc...
Embodiment 2
[0070] According to the method for automatically creating a materialized view in Embodiment 1, this embodiment proposes a quick query method based on a materialized view. The method is as follows figure 2 shown, including the following steps:
[0071] Obtain at least one historical materialized view according to the method for automatically creating a materialized view described in any one of Embodiment 1;
[0072] Get the query statement;
[0073] Extracting at least one data table involved and at least one field or at least one field combination from the query statement as a matching condition;
[0074] matching the optimal materialized view from all the historical materialized views according to the matching condition;
[0075] A query result is acquired from the optimal materialized view according to the query statement.
[0076] The above method is to use the automatic creation method of the materialized view in the first embodiment to obtain the historical materializ...
Embodiment 3
[0080] Based on the same idea, this embodiment also provides an automatic creation device for a materialized view, which is used to realize the automatic creation method for a materialized view described in Embodiment 1. The device includes:
[0081] A first acquisition module, configured to acquire historical query records, wherein the historical query records include at least one historical query statement, and any of the historical query statements involves at least one field of at least one basic data table;
[0082] A first parsing module, configured to mine at least one frequent item set from all the historical query statements, wherein the frequent item set is a set of fields or field combinations that are strongly associated with at least one of the basic data tables;
[0083] A sorting module, which is used to sort all frequent itemsets involving the same basic data table according to the association from strong to weak to obtain a frequent itemset ordered set;
[008...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


