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

Data query method and device

A data query and data technology, applied in the database field, can solve problems such as poor performance and low query efficiency, and achieve the effect of avoiding SQL statement error reporting and improving performance

Inactive Publication Date: 2017-11-14
ULTRAPOWER SOFTWARE
View PDF3 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The invention provides a data query method and device, which are used to solve the problems of low query efficiency and poor performance existing in the existing data query methods

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
  • Data query method and device
  • Data query method and device
  • Data query method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] figure 1 It is a flowchart of a data query method in an embodiment of the present invention, see figure 1 , the data query method of this embodiment is applied to the execution of the same transaction, including:

[0037] Step S11, receiving a data query request;

[0038] Step S12, obtaining the key data of the data to be queried in the query request from the corresponding common table of the database, the key data is at least data that can uniquely identify the data to be queried;

[0039] Step S13, creating a new transaction temporary table in the temporary table space of the database, and inserting key data of the data to be queried into the transaction temporary table;

[0040] Step S14, establishing a table connection between the temporary transaction table and the common table, and using the table connection to realize the query of the data to be queried. The table join here includes: equivalence join, left join or right join.

[0041] pass figure 1 In the me...

Embodiment 2

[0051] A specific example is that it is necessary to search for relevant invoice information in the sales order table of the database. For example, a sales order table stores 500 sales order records. Some of these sales orders have been invoiced, and some have not been invoiced. And if you want to query the relevant information of some invoices from these 500 sales records, when you use the in keyword of the existing SQL statement to perform enumeration query, the query efficiency is obviously very low.

[0052] The realization principle of the data query method of the present invention is: the invoice ID will be captured as temporary data from the invoice table recording the sales order records that have issued invoices in the sales order, and then create a temporary transaction table in the system memory, and execute Query the transaction, insert the temporary data invoice ID into the transaction temporary table, and then establish the table connection between the invoice tab...

Embodiment 3

[0113] image 3 It is a block diagram of a data query device according to an embodiment of the present invention, see image 3 , the data query device 30 includes:

[0114] A transaction execution unit 301, configured to receive a data query request;

[0115] The data obtaining unit 302 is used to obtain the key data of the data to be queried in the query request from the corresponding common table of the database, the key data is at least data that can uniquely identify the data to be queried; the key data obtained is sent to the data insertion unit 303 ;

[0116] The data insertion unit 303 is used to create a new transaction temporary table in the temporary table space of the database, and insert key data of the data to be queried into the transaction temporary table;

[0117] The query implementation unit 304 is configured to establish a table connection between the temporary transaction table and the common table, and use the table connection to realize the...

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 discloses a data query method and device. The data query method comprises the following steps of receiving a data query request; acquiring key data of to-be-queried data in the data query request from a corresponding normal table of a database, wherein the key data at least comprises data capable of uniquely identifying the to-be-queried data; creating a transaction temporary table in the temporary table space of the database, and inserting the key data of the to-be-queried data into the transaction temporary table; establishing a table connection of the transaction temporary table and the normal table, and achieving query of the to-be-queried data by using the table connection. The data query method provided by the invention realizes the query of the to-be-queried data by the table connection, since the transaction temporary table is established in memory, the efficiency is significantly improved compared with directly searching the data in a hard disk. Besides, the problem that errors and high data pressure caused by directly querying by using an SQL (Structured Query Language) statement is solved by using the table connection to query.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a data query method and device. Background technique [0002] At present, when querying data in the database, it is mainly directly queried by writing the SQL language. SQL (Structured Query Language, Structured Query Language) is an operation command set specially established for the database, and is a fully functional database language. SQL is powerful and easy to use, and has become the basis of database operations, and now almost all databases support SQL. [0003] However, the way of querying the database through SQL statements in the prior art usually leads to problems of low query efficiency and poor query performance. For example, when using the SQL keyword or / in to query, if there are too many enumeration values ​​in in, an SQL statement error will occur, or when the enumeration value of the query is greater than the predetermined value, data pressure will also occur,...

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/2282G06F16/2453
Inventor 刘伟王庆磊
Owner ULTRAPOWER SOFTWARE
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