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

Database query method and apparatus

A query method and technology of a query device, which are applied in the computer field, can solve the problems of a large number of tables, a large amount of data, and low query efficiency, and achieve the effect of improving query efficiency and satisfying business statistics.

Inactive Publication Date: 2016-05-11
ZTE CORP
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] For multi-table query, since a connection query statement can only use one database connection, only a small processing capacity can be used for a powerful database server and storage device; if the number of connected query tables is large, each If the amount of table data is large, the query efficiency is very low

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
  • Database query method and apparatus
  • Database query method and apparatus
  • Database query method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0070] refer to figure 2 , figure 2 It is a schematic flowchart of the second embodiment of the database query method of the present invention. Based on the first embodiment, in the second embodiment, after receiving the request for multi-table connection query of the database, and constructing multiple structured query statements for a single table according to the request, it also includes:

[0071] Step S21, sort the key fields of the structured query statement according to the preset sorting rules.

[0072] The preset sorting rule is that when the key field is Arabic numerals, it can be sorted in the order of 0 to 9, and it can also be sorted in reverse order; when the key field is Chinese or English, the first letter of Chinese pinyin or the first letter of English can be taken The letters are sorted in order from a to z, and can also be sorted in reverse order.

[0073] After sorting the specified key fields in the structured query statement, assign the structured q...

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 database query method. The method comprises the steps of receiving a request for a multi-table joining query on a database, and constructing a plurality of structured query statements for a single table according to the request; according to current database resources, distributing corresponding database connections for the joining query of the database; according to a preset distribution rule, distributing the structured query statements to threads corresponding to the database connections so as to execute the structured query statements; receiving a result set returned after the threads execute the structured query statements; and obtaining data from the result set and splicing the obtained data to obtain a query result. According to the database query method, the multi-table query on the database no longer depends on a single database connection and the plurality of the database connections are flexibly distributed according to the database resources, so that the query efficiency is greatly improved while the business statistics requirement is met.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a database query method and device. Background technique [0002] A database typically includes one or more database tables for storing data values. To retrieve and manipulate data in a database, users, applications, or remote systems typically issue database queries to a database management system. A database query is a collection of statements, commands, or clauses used to retrieve data stored in a database. For example, a query can specify a specific location in a database (for example, a table, row, or column) to retrieve data, or how to join columns from multiple tables. [0003] For multi-table query, since a connection query statement can only use one database connection, only a small processing capacity can be used for a powerful database server and storage device; if the number of connected query tables is large, each If the amount of table data is large, the query ...

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/00
Inventor 陈波
Owner ZTE CORP