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

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

Active Publication Date: 2022-05-13
浙江一山智慧医疗研究有限公司
View PDF10 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, most of the materialized views are created by manual selection, and the update and maintenance of the materialized views in the later period are even more indispensable.
For databases with a huge amount of data in the era of big data, it is extremely inefficient to use manual selection to create, update and maintain materialized views
In addition, the materialized view needs to occupy a certain amount of storage space. If too many materialized views are created, the storage will be too large and the data insertion speed will be slow, which will affect the response speed of the query.

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
  • Automatic creation method of materialized view and fast query method based on materialized view
  • Automatic creation method of materialized view and fast query method based on materialized view
  • Automatic creation method of materialized view and fast query method based on materialized view

Examples

Experimental program
Comparison scheme
Effect test

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

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 present application proposes an automatic creation method of a materialized view, including: obtaining historical query records; extracting at least one frequent itemset from all historical query statements; Get the frequent itemset sequence set by weak sorting; for the first time, create the corresponding materialized view according to the frequent itemset sequence set in turn, calculate the corresponding rate of return after each materialized view is created, delete the materialized view, and obtain the filter according to all rates of return. Removal condition; for the second time, the corresponding materialized views are created sequentially according to the sequence set of frequent itemsets, until the rate of return calculated after creating any materialized view is less than or equal to the filtering condition. The method extracts multiple data elements for frequent itemset mining by analyzing historical query records, automatically creates corresponding materialized views according to frequent itemsets, and controls the number of materialized views through the rate of return of materialized views, so as to reasonably plan and utilize storage space .

Description

technical field [0001] The present application relates to the technical field of databases, in particular to an automatic creation method of a materialized view and a fast query method based on the materialized view. Background technique [0002] A database is an organized and shareable collection of data stored in a computer for a long time. The data in the database is organized, described and stored according to a certain data model, which has less redundancy, higher data independence and easy scalability. [0003] But with the advent of the big data era, the amount of data in the database is getting larger and larger, so the response time of the query is getting longer and longer. Materialized view is an effective query method. It is a physical structure that improves data access time by pre-computing and saving intermediate results, and can greatly shorten query response time. That is to say, implementing some large and time-consuming calculations and query results wit...

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 Patents(China)
IPC IPC(8): G06F16/2453G06F16/242G06F16/2458
CPCG06F16/2453G06F16/2433G06F16/2428G06F16/2465
Inventor 高春蓉李俊许振影俞青应晶傅亦婷
Owner 浙江一山智慧医疗研究有限公司