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

A data table query method, device, terminal equipment and storage medium

A query method and data table technology, which is applied in the field of database statistics, can solve the problems of a large amount of memory space and scan index occupation, and achieve the effects of reducing memory resource usage, optimizing overall performance, and improving query efficiency

Active Publication Date: 2020-05-19
SHANGHAI DAMENG DATABASE
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The database cache space is limited. During index scanning, the index data pages need to be loaded from the disk to the database cache to cause disk read IO. At this time, if the cache space is full, the previously loaded data pages in the cache will be eliminated. The data pages in the cache are modified by the processor, and the data pages in the disk need to be updated according to the modified data pages in the cache, causing disk write IO, which causes the scan index to occupy a large amount of memory space, and because the data pages may Being partially eliminated affects the overall performance of the database

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
  • A data table query method, device, terminal equipment and storage medium
  • A data table query method, device, terminal equipment and storage medium
  • A data table query method, device, terminal equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] Figure 1A It is a flow chart of the data table query method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case where the data table query device queries the total number of records in a certain data table. The method can be executed by the data table query device, and the data table query device can be realized by software and / or hardware. refer to Figure 1A , the method specifically includes the following steps:

[0031] S110. Receive a query operation on the target data table in the current transaction, and record the query start time when the query operation is received.

[0032] In a specific embodiment of the present invention, a transaction refers to a series of operations in a database, which are either completely executed or not executed at all. Transactions ensure that data-oriented resources are not permanently updated unless all operations within the transactional unit complete successfully. By grouping a set of r...

Embodiment 2

[0086] figure 2 The structural diagram of the data table query device provided by Embodiment 2 of the present invention, this embodiment can be applied to the situation of querying the total number of records of a certain data table in the data table query device, and the device can realize the data table described in any embodiment of the present invention Query method. Specifically, the device includes:

[0087] The query request receiving module 21 is used to receive the query operation for the target data table in the current transaction, and record the query start time when the query operation is received;

[0088] The judging module 22 is used to judge whether there is a modification operation for the target data table within the influence time period from the transaction start time to the query start time of the current transaction; wherein the modification operation includes: adding operation, updating operation and deleting operation;

[0089] Affecting the total n...

Embodiment 3

[0102] image 3 It is a schematic structural diagram of a terminal device provided in Embodiment 3 of the present invention. image 3 A block diagram of an exemplary terminal device suitable for implementing embodiments of the present invention is shown. image 3 The displayed terminal device is only an example, and should not impose any limitation on the functions and application scope of the embodiments of the present invention.

[0103] Such as image 3 As shown, the terminal device may take the form of a general-purpose computing device. The components of the terminal device may include, but are not limited to: one or more processors 31, a storage device 32, and a bus (not shown) connecting different system components (including the storage device 32 and the processor 31).

[0104] Bus refers to one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using an...

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 embodiment of the invention discloses a data table query method and device, terminal equipment and a storage medium. The method comprises the steps that a query operation, aiming at a target datatable, in a current affair is received, the query start time of receiving the query operation is recorded, whether or not a modification operation aiming at the target data table exists in the influence time period from the affair start time of the current affair to the query start time is judged, the total number of records affecting the target data table is determined, and the total number of target records of the target data table is determined according to the total number of initial records of the target data table predetermined at the query start time and the total number of the affectedrecords. Accordingly, the total number of the target records of the target data table is determined through the total number of the initial records of the predetermined target data table and the total number of the affected records, the problem that full table scanning is conducted when data table query is conducted, and the query efficiency is low is solved, the data table query efficiency is improved, occupied memory resources are reduced, and the overall performance of a database is optimized.

Description

technical field [0001] The embodiment of the present invention relates to the field of database statistics, and in particular to a data table query method, device, terminal equipment and storage medium. Background technique [0002] The application of relational databases is very common. In database statistics, the aggregate function COUNT(*) can realize the function of obtaining the total number of records in the table. For example, it is widely used in counting the total inventory of goods and the number of employees in a company. [0003] A relational database is a data organization composed of two-dimensional tables and the connections between them. Tables in a relational database often use indexes to store data. The COUNT(*) aggregate function query is executed by the processor. When counting the total number of rows in the table, the data page and index page corresponding to the data table need to be loaded from the disk into the cache, and the processor reads the ind...

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 Patents(China)
IPC IPC(8): G06F16/2453G06F16/28G06F16/22
CPCG06F16/2282G06F16/2453G06F16/284
Inventor 王海龙韩朱忠薛慧
Owner SHANGHAI DAMENG DATABASE
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