SQL query method and system for Presto

A query method and query system technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve the problems of high pressure, long execution time, and small query results in Presto calculations, so as to reduce consumption and relieve pressure , the effect of speeding up the query speed

Active Publication Date: 2016-03-23
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF6 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] 1. SQL will be executed frequently;
[0006] 2. The execution time is long but the query result is small;
[0007] 3. The real-time performance of query results is not high
However, due to the lon

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
  • SQL query method and system for Presto
  • SQL query method and system for Presto

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0026] According to an embodiment of the present invention, the SQL query method for Presto includes:

[0027] S1, configure the table where the query results to be cached in the database are located; among them, the table is the carrier of data stored in the database. For frequently queried data, you can set a label or add a row of data to the table to indicate The table needs to be cached.

[0028] S2, receiving the SQL query command, and generating an execution plan according to the SQL query command, judging whether the table to be queried by the execution plan is a table configured in the database, and if so, generating a unique identifier for the execution plan; wherein, the execution plan requires The queried table may be one table or multiple tables. As long as one table is configured in the database, a unique identifier will be generated for the execution plan, and the unique identifier may be the name of the configured table.

[0029] S3, according to the unique ide...

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 an SQL query method and system for Presto. The method comprises: firstly, configuring a table in which a to-be-cached query result is located in a database; secondly, according to an SQL query command, generating an executive plan and generating a unique identifier for the executive plan; and finally, according to the unique identifier of the executive plan, querying a cache table cached in a distributed file system and obtaining a query result in the cache table. According to the SQL query method and system, when the same SQL query is executed in a period of time, Presto calculation is no longer executed and a previously cached query result is directly returned, so that the query speed is increased, the Presto pressure is reduced, and the consumption of a memory and a CPU is reduced.

Description

technical field [0001] The invention belongs to the field of interactive SQL query, in particular to an SQL query method and system for Presto. Background technique [0002] Presto is a pure memory interactive SQL query engine. The query efficiency is nearly 10 times higher than that of Hive (a data warehouse tool based on Hadoop, which provides simple SQL query functions). Multiple data sources are used to query, and it has been successfully applied to well-known Internet companies such as Facebook, Netflix, Dropbox, and JD.com. [0003] For the SQL submitted to Presto for execution, Presto first parses the SQL and generates an execution plan, and then assigns and executes computing tasks according to the execution plan, such as figure 1 shown. [0004] During the use of Presto, sometimes the following problems are encountered: [0005] 1. SQL will be executed frequently; [0006] 2. The execution time is long but the query result is small; [0007] 3. The real-time pe...

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/182G06F16/24542G06F16/24552
Inventor 袁安峰郭李明
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products