Database query method and server

A technology for querying servers and databases, which is applied in the field of databases and can solve problems such as increased delays and large delays

CN103970870AInactive Publication Date: 2014-08-06HUAWEI TECH CO LTD
0 Cites 22 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2014-08-06
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The embodiment of the invention provides a method for querying a column type internal memory database. The method comprises the steps of receiving a query request, analyzing the query request, acquiring a query condition, determining a target column related to the query condition from the column type internal memory database, executing the following steps in a cycled mode until query of all rows is achieved, storing data queried in the continuous m rows in all the target columns or the data less than m rows at last into a Cache from the column type internal memory database starting from the [m*(i-1)+1]th row of each target column, querying the data stored in the Cache according to the query condition, sending sectionalized query results, and releasing the storage space of the Cache, wherein the m is a natural constant, and the i is a variable and represents the cycled executing frequency. The method is used, so that data flooding in the query process is lowered, and time delay of data query is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The embodiment of the present invention relates to database technology, in particular to a database query method and server. Background technique

[0002] Cache is a temporary storage located between the CPU and the memory RAM. Its capacity is smaller than that of the memory but the exchange speed is faster. When the CPU calls a large amount of data, it can be called directly from the Cache, thus speeding up the reading speed. Usually, the Cache is divided into L1, L2, and L3 levels. L1 is the space exclusively used by a single core of a single CPU, L2 is the space shared by multiple cores of a single CPU, and L3 is the space shared by multiple CPUs and multiple cores, for example : The cache sizes of L1, L2, and L3 are 32K, 512K, and 15360K, respectively. Taking each read of 256Byte as an example, the delays of the three caches are: 1.2ns, 4ns and 30ns. And it takes 100ns to read data in memory RAM. In the case of the same instruction, the data is...

Examples

Embodiment Construction

[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments.

[0035] figure 1 It is a flow chart of an embodiment of the database query method of the present invention. The method is applied to a columnar in-memory database. The columnar data of the columnar in-memory database is stored in the memory. The method includes:

[0036] Step 101: Receive a query request.

[0037] The external device can directly send a query request to the database query server. At this time, the requester is an external device. In the query server, or outside the database query server, the query request includes query conditions....