Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for pushing down predicate in SQL (Structured Query Language) connection operation, terminal and medium

An operation and predicate technology, applied in the database field, can solve the problems of lack of high concurrent query and insufficient memory, and achieve the effect of improving data filtering ability and computing efficiency

Active Publication Date: 2018-07-20
贵州易鲸捷信息技术有限公司
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The predicate pushdown scheme of the Hash table. If the Hash table is large but the memory is insufficient, it will result in insufficient resources to handle high concurrent queries.

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 for pushing down predicate in SQL (Structured Query Language) connection operation, terminal and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] This embodiment provides a method for pushing down predicates in SQL connection operations, such as figure 1 shown, including the following steps:

[0035] S1. Hash join the fact table and the dimension table, generate a Hash table according to the dimension table, and generate a fact table histogram according to the fact table; the Hash table includes several key values.

[0036] S2, N predicate histogram areas obtained according to the Hash table and the histogram of the fact table, where N is a positive integer;

[0037] Specifically, S21, performing Hash sorting on the key values ​​in the Hash table to generate a sorted list;

[0038] For example, the sorted list is (90,91,92,93,94,95,96,97,98,99,100)

[0039] S22. Obtain M histogram areas of the sorted list according to the sorted list;

[0040] For example, according to the sorted list, 9 histogram areas are obtained, namely the histogram area of ​​90 to 91, the histogram area of ​​91 to 92, the histogram area ...

Embodiment 2

[0051] This embodiment provides a terminal, including a processor and a memory connected to the processor, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call The program instructions execute the predicate push-down method in the SQL connection operation described in Embodiment 1, such as figure 1 shown, including the following steps:

[0052] S1. Hash join the fact table and the dimension table, generate a Hash table according to the dimension table, and generate a fact table histogram according to the fact table; the Hash table includes several key values.

[0053] S2, N predicate histogram areas obtained according to the Hash table and the histogram of the fact table, where N is a positive integer;

[0054] Specifically, S21, performing Hash sorting on the key values ​​in the Hash table to generate a sorted list;

[0055] For example, the sorted list is (90,91,92,93,94,95,96,97...

Embodiment 3

[0070] This embodiment provides a computer-readable storage medium, the computer storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the first embodiment. The predicate pushdown method in the SQL connection operation, such as figure 1 shown, including the following steps:

[0071] S1. Hash join the fact table and the dimension table, generate a Hash table according to the dimension table, and generate a fact table histogram according to the fact table; the Hash table includes several key values.

[0072] S2, N predicate histogram areas obtained according to the Hash table and the histogram of the fact table, where N is a positive integer;

[0073] Specifically, S21, performing Hash sorting on the key values ​​in the Hash table to generate a sorted list;

[0074] For example, the sorted list is (90,91,92,93,94,95,96,97,98,99,100)

[0075] S22. Obtai...

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 belongs to the technical field of databases, and particularly relates to a method for pushing down predicate in SQL (Structured Query Language) connection operation, a terminal and a medium. The method comprises the following steps: carrying out Hash join on a fact table and a dimension table, generating a Hash table according to the dimension table, and generating a fact table histogram according to the fact table; according to the Hash table and the fact table histogram, obtaining N pieces of predicate histogram areas, wherein N is a positive integer; transforming the N piecesof predicate histogram areas into predicates, and pushing down the predicates to a data storage layer. Compared with minimum value / maximum value and integral Hash push-down, the method can improve data filtering ability according to the fact table histogram so as to improve the calculation efficiency of the storage layer.

Description

technical field [0001] The invention belongs to the technical field of databases, and in particular relates to a predicate push-down method, a terminal and a medium in an SQL connection operation. Background technique [0002] Databases, more precisely RDBMSs (Relational Database Management Systems) are widely used in various applications, and SQL is the most commonly used language for performing queries in databases. The database includes multiple tables, and specific columns containing similar values ​​can be stored in multiple tables, and the tables can be related to each other through this specific column. [0003] For example, the CustomerTable table stores the CustomerId column, and also stores all customers and their related information (such as name, age, gender, and birthday, etc.). At the same time, the StoreSalesTable table can also store the CustomerId column, and also stores the sales information of a certain business. Through the Join query, you can obtain all...

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
IPC IPC(8): G06F17/30
CPCG06F16/2255G06F16/24532G06F16/24549G06F16/2456
Inventor 埃里克·欧哈迪刘明
Owner 贵州易鲸捷信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products