Query processing system and method thereof

By introducing a query predictor and buffer into the query processing system, the system can predict and read potentially requested data units in advance. Combined with query parsing and analyzer to optimize the processing flow, the system solves the problems of slow response speed and insufficient computing performance of the existing system, and achieves fast query response and efficient data processing.

CN122173510APending Publication Date: 2026-06-09SK HYNIX INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SK HYNIX INC
Filing Date
2025-06-04
Publication Date
2026-06-09

Smart Images

  • Figure CN122173510A_ABST
    Figure CN122173510A_ABST
Patent Text Reader

Abstract

A query processing system and a method thereof are disclosed. The query processing system can include a storage storing one or more data tables each including one or more data units, a query predictor generating a predicted query based on analysis information for a historical query received from a host and reading one or more data units corresponding to the predicted query, a buffer storing the data units, a query parser parsing a target query to generate target analysis information, the target query being a query received from the host, and a query analyzer determining whether a target data unit corresponding to the target analysis information is stored in the buffer, reading the target data unit from the buffer when the target data unit is stored in the buffer, and reading the target data unit from the storage when the target data unit is not stored in the buffer.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications

[0002] This application claims priority to Korean Patent Application No. 10-2024-0181601, filed with the Korean Intellectual Property Office on December 9, 2024, which is incorporated herein by reference in its entirety. Technical Field

[0003] Embodiments of this disclosure relate to a query processing system and method thereof. Background Technology

[0004] Advances in technologies such as artificial intelligence (AI), machine learning (ML), and large language models (LLM) are driving the demand for systems that require the computational performance necessary to process and analyze large amounts of data in real time.

[0005] Specifically, LLMs such as recommendation systems or ChatGPT need to support users in using queries (e.g., SQL) to read data stored in large-volume databases. For this, a system capable of processing queries in real time and quickly generating responses to them is required. Summary of the Invention

[0006] Embodiments of this disclosure may provide a query processing system and method that can improve query response speed by pre-reading data in a storage device that the host is likely to request.

[0007] Embodiments of this disclosure may also provide a query processing system and method that can optimize query processing performance by performing optimization operations on received queries.

[0008] The purposes of the embodiments disclosed herein are not limited to those set forth herein, and other purposes of the embodiments not mentioned herein will be apparent to those skilled in the art from the following description.

[0009] Embodiments of this disclosure may provide a query processing system, comprising: a storage device for storing one or more data tables, each of which includes one or more data units; a query predictor for generating a predictive query based on analysis information of historical queries received from a host, and reading one or more data units corresponding to the predictive query from the storage device; a buffer for storing the data units read from the storage device; a query parser for parsing a target query to generate target parsing information, the target query being a query received from the host; and a query analyzer for determining whether a target data unit is stored in the buffer, the target data unit being a data unit corresponding to the target parsing information, reading the target data unit from the buffer when the target data unit is stored in the buffer, and reading the target data unit from the storage device when the target data unit is not stored in the buffer.

[0010] Embodiments of this disclosure may provide a query processing method, comprising: generating a predictive query based on analytical information about historical queries received from a host; reading one or more data units corresponding to the predictive query from a data table included in a storage device; storing the data units read from the storage device in a buffer; parsing a target query to generate target parsing information, the target query being a query received from the host; reading a target data unit from the buffer when the target data unit is stored in the buffer, the target data unit being a data unit included in a data table corresponding to the target parsing information; and reading a target data unit from the storage device when the target data unit is not stored in the buffer.

[0011] Embodiments of this disclosure may provide a system comprising: a storage device for storing one or more data tables, each of the data tables including one or more data units; a buffer for storing data units read from the storage device; and a query predictor for generating a predictive query based on analytical information about historical queries received from a host, selecting a data table corresponding to the predictive query from the storage device, and reading one or more data units included in the selected data table from the storage device and storing the read data units in the buffer.

[0012] According to embodiments of this disclosure, query response speed can be improved by pre-reading data in the storage device that the host is likely to request, and query processing performance can be optimized by performing optimization calculations on the received queries.

[0013] The effects of this disclosure are not limited to the foregoing objectives, and other effects will become apparent to those skilled in the art from the following detailed description. Attached Figure Description

[0014] This disclosure will be more fully understood through the following detailed description and accompanying drawings; however, these detailed descriptions and accompanying drawings are provided for illustrative purposes only and are not intended to limit the scope of this disclosure.

[0015] Figure 1 This is a view illustrating the operations of a query processing system that generates and executes predictive queries according to embodiments of the present disclosure;

[0016] Figure 2 This is a view illustrating the operation of a query processing system according to an embodiment of the present disclosure executing a target query received from a host;

[0017] Figure 3 This is a flowchart illustrating the operation of a query analyzer reading a target data unit according to an embodiment of the present disclosure;

[0018] Figure 4 An example of a target data unit according to an embodiment of the present disclosure is shown;

[0019] Figure 5 Examples of historical query and analysis information according to embodiments of this disclosure are shown;

[0020] Figure 6 Examples of first and second change information according to embodiments of the present disclosure are shown;

[0021] Figure 7 An example is shown of the operation of a query predictor, according to an embodiment of the present disclosure, determining whether to generate a predictive query;

[0022] Figure 8 The operation of a query predictor according to an embodiment of the present disclosure, which generates a predictive query based on historical queries, is illustrated.

[0023] Figure 9 This is a view illustrating the operations of a query processing system according to embodiments of the present disclosure in generating response data for a target query;

[0024] Figure 10 The query analyzer according to an embodiment of the present disclosure illustrates a strategy for determining preprocessing operations based on a first threshold number and a second threshold number;

[0025] Figure 11 An example is shown of the operation of a query processor according to an embodiment of the present disclosure to generate response data based on a preprocessing operation;

[0026] Figure 12 This illustrates another example of the operation of a query processor according to an embodiment of the present disclosure to generate response data based on a preprocessing operation;

[0027] Figure 13This is a view illustrating another example of the operation of a query processor generating response data based on a preprocessing operation according to embodiments of the present disclosure; and

[0028] Figure 14 This is a diagram illustrating a query processing method according to an embodiment of the present disclosure. Detailed Implementation

[0029] In the following, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. When assigning reference numerals to components in each drawing, the same reference numerals may be assigned even if the same component appears in different drawings. Details determining known techniques or functions may be omitted if they obscure the subject matter of the present disclosure. As used herein, when a component “comprises,” “has,” or “is composed of” another component, that component may include other components unless that component “only” includes, “only has,” or “is composed of” another component. As used herein, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” are intended to also include the plural forms.

[0030] Labels such as “first”, “second”, “A”, “B”, “(a)”, and “(b)” may be used to describe the components of this disclosure. These labels are provided merely for the purpose of distinguishing components, and the nature, order, or number of components is not limited by the labels.

[0031] When describing the positional relationship between components, when two or more components are described as “connected,” “linked,” or “linked,” these two or more components can be directly “connected,” “linked,” or “linked,” or another component can be inserted between them. Here, the other component can be included in one or more of the two or more components that are “connected,” “linked,” or “linked” to each other.

[0032] When using terms such as “previous,” “next,” “after,” and “before” to describe time flow relationships related to components, operating methods, and manufacturing methods, it may include discontinuous relationships unless the terms “immediate” or “direct” are used.

[0033] When a component is specified to have a value or its corresponding information (e.g., level), that value or corresponding information can be interpreted to include tolerances that may arise due to various factors (e.g., process factors, internal or external influences, or noise).

[0034] In the following, various embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0035] Figure 1This is a view illustrating the operations of a query processing system that generates and executes predictive queries according to embodiments of the present disclosure.

[0036] Reference Figure 1 The query processing system 100 may include a storage device 110, a query predictor 120, and a buffer 130.

[0037] Storage device 110 can store one or more data tables DATA_TBL. Each data table DATA_TBL may include one or more data units DU. Each data table DATA_TBL can be compressed and stored in storage device 110, and storage device 110 can decompress the data table DATA_TBL during the process of reading the data units DU stored in the data table DATA_TBL.

[0038] For example, the data table DATA_TBL can be a table in a database. A database table can store data in the form of a table consisting of rows and columns. A data unit DU included in the data table DATA_TBL can correspond to a row in the database table and include the value of an identifier corresponding to each column of the database table.

[0039] Storage device 110 can be implemented as any device capable of storing data. For example, storage device 110 can be implemented as a device that stores data on a disk, such as a hard disk drive, or a device that stores data in semiconductor memory (non-volatile memory or volatile memory), such as a solid-state drive or a memory card.

[0040] Semiconductor memories can be implemented as static random access memory, dynamic random access memory, NAND flash memory, 3D NAND flash memory, NOR flash memory, resistive random access memory (RRAM), phase change memory (PRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), or spin-transfer torque random access memory (STT-RAM).

[0041] The query predictor 120 can generate a predictive query Q_P (S110) based on the analysis information AN_INFO.

[0042] The analysis information AN_INFO is information about historical queries received by the query processing system 100 from the host.

[0043] Historical queries can be queries received from the host prior to the reference time set for query predictor 120. For example, the reference time can be the current time (when query predictor 120 generated the predictive query Q_P), or any time in the past.

[0044] The query predictor 120 can identify access trends based on information about a first query previously received by the query processing system 100, and predict a second query that is likely to be received from the host later.

[0045] The analysis information AN_INFO can be stored in the query processing system 100. For example, the analysis information AN_INFO can be included in volatile or non-volatile memory included in the query processing system 100. In other examples, the analysis information AN_INFO can be stored in storage device 110.

[0046] In addition, the query predictor 120 can read one or more data units DU corresponding to the predictive query Q_P from the data table DATA_TBL included in the storage device 110 (S120).

[0047] For example, query predictor 120 may request read requester (not shown) to send a read command to storage device 110 for reading from storage device 110. In response, read requester may send a read command to storage device 110, receive a response to the read command from storage device 110, and send the response to query predictor 120.

[0048] The query predictor 120 can perform the operations in step S120 during idle time or in parallel with a read operation for another query.

[0049] The query predictor 120 can be implemented in various ways. For example, the query predictor 120 can be implemented as an integrated circuit including logic gates for performing the operations described above. The query predictor 120 can be implemented as an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), etc.

[0050] In other examples, query processor 120 may be implemented as a processing unit (e.g., CPU, GPU, or microprocessor) that runs data for which code is defined to perform the operations described above.

[0051] The buffer 130 may store the data unit DU read in step S120 (S130). For example, the buffer 130 may be implemented as a semiconductor memory included in the query processing system 100.

[0052] Figure 2 This is a view illustrating the operation of a query processing system according to an embodiment of the present disclosure executing a target query received from a host.

[0053] Reference Figure 2 In addition to the above references Figure 1In addition to the described storage device 110, query predictor 120, and buffer 130, the query processing system 100 may also include a query parser 140 and a query analyzer 150.

[0054] Query parser 140 can parse the target query Q_TGT to generate target parsing information TGT_PARSE_INFO (S210), which is the query received from the host. The target query Q_TGT can be as described above. Figure 1 The query processing system 100 receives historical queries and then receives queries from the host.

[0055] The target parsing information TGT_PARSE_INFO can include information about the keywords, operators, and identifiers stored in the target query Q_TGT. For example, if the target query Q_TGT is "select * from WineTable whereType=Red and Taste=Dry and Price<30", then the target parsing information TGT_PARSE_INFO can include the keywords {select, from, where}, the operators {and, and, =, =, <}, and the identifiers {WineTable, Type, Taste, Price}.

[0056] The target parsing information TGT_PARSE_INFO generated by query parser 140 can be stored in query processing system 100. For example, the target parsing information TGT_PARSE_INFO can be stored in storage device 110 or buffer 130. As another example, the target parsing information TGT_PARSE_INFO can be stored in a separate volatile memory allocated within query processing system 100 for storing the target parsing information TGT_PARSE_INFO.

[0057] The query parser 140 can send the target parsing information TGT_PARSE_INFO to the query analyzer 150 (S220).

[0058] The query analyzer 150 can receive the target parsing information TGT_PARSE_INFO and read the target data unit TGT_DU from the storage device 110 or the buffer 130 (S230). The target data unit TGT_DU is a data unit included in the data table DATA_TBL corresponding to the target parsing information TGT_PARSE_INFO.

[0059] To this end, query analyzer 150 can manage the identifiers required to process the target query Q_TGT and manage request count information based on the value of each identifier. For example, query analyzer 150 can manage the request counts for the identifier "Type" with values ​​{Red, White, Rose, Sparkling, ...} and the request counts for the identifier "Taste" with values ​​{Dry, Mediumdry, Medium, Sweet, Mediumsweet, ...}. Query analyzer 150 can sort the request count information (e.g., the count values ​​of "Type" and "Taste") according to the order of the host request identifier values. Furthermore, query analyzer 150 can add identifiers and information about the request count for each identifier to the aforementioned analysis information AN_INFO.

[0060] Storage device 110 can store target data unit TGT_DU.

[0061] Furthermore, buffer 130 may optionally store target data unit TGT_DU. Therefore, target data unit TGT_DU stored in storage device 110 may be stored together in buffer 130, or may be stored only in storage device 110.

[0062] If the query predictor 120 reads the target data unit TGT_DU based on the previously generated predicted query Q_P, then the buffer 130 may be in a state where the target data unit TGT_DU associated with the predicted query Q_P is stored. On the other hand, if the query predictor 120 has not previously read the target data unit TGT_DU, then the buffer 130 may be in a state where the target data unit TGT_DU associated with the predicted query Q_P is not stored.

[0063] The following will refer to Figure 3 The operation of query analyzer 150 in reading target data unit TGT_DU is described in detail.

[0064] Figure 3 This is a flowchart illustrating the operation of a query analyzer reading a target data unit according to an embodiment of the present disclosure.

[0065] First, the query analyzer 150 determines whether the target data unit TGT_DU is stored in the buffer 130 (S310).

[0066] When the target data unit TGT_DU is stored in the buffer 130 (S310-Yes), the query analyzer 150 can read the target data unit TGT_DU from the buffer 130 (S320).

[0067] When the target data unit TGT_DU is stored in buffer 130, query analyzer 150 can use the target data unit TGT_DU already stored in buffer 130 to generate a response to the target query Q_TGT, without query analyzer 150 or other components (e.g., read requester) sending an additional read command to storage device 110 to read the target data unit TGT_DU. Therefore, the response speed to the target query Q_TGT can be improved.

[0068] Refer again Figure 3 When the target data unit TGT_DU is not stored in buffer 130 (S310 - No), the query analyzer 150 can read the target data unit TGT_DU from storage device 110. In this case, the query analyzer 150 may need additional time because the query analyzer needs to read the target data unit TGT_DU from storage device 110.

[0069] Similar to query predictor 120, query parser 140 and query analyzer 150 can be implemented in various ways. For example, query parser 140 and query analyzer 150 can be implemented as integrated circuits (e.g., application-specific integrated circuits (ASICs) or field-programmable gate arrays (FPGAs)) that include logic gates for performing the operations described above.

[0070] As another example, query parser 140 and query analyzer 150 can be implemented as processing units (e.g., CPU, GPU, and microprocessor) that run code defined for performing the above operations.

[0071] The specific operations of each component of the query processing system 100 have been described above.

[0072] The following uses a specific data table as an example to describe the operation of each component of the query processing system 100.

[0073] Figure 4 An example of a target data unit according to an embodiment of the present disclosure is shown.

[0074] Figure 4 The target data unit TGT_DU is shown in the data table Wine.

[0075] Reference Figure 4 The Wine data table can include 11 target data units (TGT_DU).

[0076] Each target data unit (TGT_DU) can store the value of each of multiple identifiers. Figure 4In this context, the target data unit TGT_DU can store the values ​​of identifiers such as {ID, Type, Taste, Country, Grape Varieties, Price, and Rating}.

[0077] Figure 5 Examples of historical query and analysis information are shown according to embodiments of this disclosure.

[0078] Reference Figure 5 The analysis information AN_INFO may include information about the identifiers included in the first historical query QH_1 and the second historical query QH_2 received from the host. Each identifier is an attribute or combination of attributes that distinguishes the entities included in the data table and can be used to differentiate the information included in the data table from one another.

[0079] In this example, the first historical query QH_1 is the most recently received query among the historical queries. The second historical query QH_2 is the query received from the host immediately before the first historical query QH_1.

[0080] exist Figure 5 In the first historical query QH_1, the query is "Select ID from Wine where Type=Red and Taste=Medium and Price<30". The query processing system 100 can output C to the host, where C is... Figure 4 The ID of the data unit corresponding to the first historical query QH_1 in the publicly available data table Wine.

[0081] The second historical query, QH_2, is "Select * from Wine where Type=Red and Taste=Dry and Price<60". The query processing system 100 can... Figure 4 The data units with ID=B and ID=H corresponding to the second historical query QH_2 in the publicly available data table Wine are output to the host HOST.

[0082] In addition, the analysis information AN_INFO may also include information about the identifiers included in the third historical query QH_3. The third historical query QH_3 is the query received from the host immediately before the second historical query QH_2 was received.

[0083] The third historical query, QH_3, is "Select * from Wine where Type=Red and Taste=Dry and Price<30". The query processing system 100 can... Figure 4The data unit with ID=B corresponding to the third historical query QH_3 in the publicly available data table Wine is output to the host HOST.

[0084] Here, the identifiers included in the first historical query QH_1 and the second historical query QH_2 are {Type, Taste, Price}. Therefore, the analysis information AN_INFO can include information about the identifiers {Type, Taste, Price}.

[0085] The analysis information AN_INFO can be generated by the query analyzer 150. When the query processing system 100 receives the historical query, the query parser 140 can generate the parsing information of the historical query, and the query analyzer 150 can use the parsing information of the historical query to update the analysis information AN_INFO.

[0086] Figure 6 Examples of first and second change information according to embodiments of this disclosure are shown.

[0087] In embodiments of this disclosure, the analysis information AN_INFO may include first change information CHG_INFO1 and second change information CHG_INFO2 for identifiers included in both the first historical query QH_1 and the second historical query QH_2.

[0088] The first change information CHG_INFO1 for each identifier indicates whether at least one of the operators and values ​​corresponding to the identifier has changed between the first historical query QH_1 and the second historical query QH_2.

[0089] If the first change information CHG_INFO1 is a first value (e.g., 1), then at least one of the operators and values ​​changes between the first historical query QH_1 and the second historical query QH_2; if CHG_INFO1 is a second value (e.g., 0), then neither the operators nor the values ​​change.

[0090] The second change information CHG_INFO2 for each identifier indicates whether at least one of the operators and values ​​corresponding to the identifier has changed between the second historical query QH_2 and the third historical query QH_3. If the second change information CHG_INFO2 is a first value (e.g., 1), then at least one of the operators and values ​​has changed between the second historical query QH_2 and the third historical query QH_3; if CHG_INFO2 is a second value (e.g., 0), then neither the operators nor the values ​​have changed.

[0091] exist Figure 6In the comparison of the first historical query QH_1 and the second historical query QH_2, the operator and value of the identifier Type remain unchanged, the value of the identifier Taste changes from Dry to Medium, and the value of the identifier Price changes from 60 to 30. Therefore, the values ​​of the first change information CHG_INFO1 for the identifiers {Type, Taste, Price} are {0, 1, 1}, respectively.

[0092] When comparing the second historical query QH_2 and the third historical query QH_3, the operator and value of the identifier Type remain unchanged, the operator and value of the identifier Taste remain unchanged, and the value of the identifier Price changes from 30 to 60. Therefore, the values ​​of the second change information CHG_INFO2 for the identifiers {Type, Taste, Price} are {0, 0, 1} respectively.

[0093] Figure 7 An example is shown of the operation of a query predictor, according to an embodiment of the present disclosure, determining whether to generate a predictive query.

[0094] In embodiments of this disclosure, the query predictor 120 can search for a target identifier based on first change information CHG_INFO1 and second change information CHG_INFO2. The target identifier is an identifier that has changed in both the first historical query QH_1 and the second historical query QH_2, and the values ​​of both the first change information CHG_INFO1 and the second change information CHG_INFO2 are a first value (e.g., 1).

[0095] When the query predictor 120 successfully finds the target identifier, it can generate a predicted query Q_P. Conversely, if the search for the target identifier fails, the query predictor 120 may not generate a predicted query Q_P.

[0096] After generating the predictive query Q_P, the query predictor 120 can initialize the values ​​of the first change information CHG_INFO1 and the second change information CHG_INFO2.

[0097] exist Figure 7 In the identifier {Type, Taste, Price}, the identifier Price, where both the first change information CHG_INFO1 and the second change information CHG_INFO2 are 1, is the target identifier.

[0098] Figure 8 An example is shown of how a query predictor, according to an embodiment of the present disclosure, generates a predictive query based on historical queries.

[0099] In embodiments of this disclosure, the query predictor 120 can determine an identifier that overlaps between the first historical query QH_1 and the second historical query QH_2, which can be used as an identifier for predicting query Q_P.

[0100] The query predictor 120 can determine the operators and values ​​corresponding to the target identifier in the predicted query Q_P as the operators and values ​​corresponding to the target identifier in the second historical query QH_2.

[0101] In addition, the query predictor 120 can determine the operators and values ​​of the remaining identifiers in the predicted query Q_P, excluding the target identifier, as the operators and values ​​corresponding to the remaining identifiers in the first historical query QH_1.

[0102] exist Figure 8 In the first historical query QH_1 and the second historical query QH_2, the common identifiers are {Type, Taste, Price}. Therefore, the predictive query Q_P can also include one or more of the identifiers {Type, Taste, Price}.

[0103] In the above Figure 7 In the identifier {Type, Taste, Price}, Price is the target identifier. Therefore, the operator and value of the target identifier Price in the predicted query Q_P can be determined to be <60, which is the value corresponding to the target identifier Price in the second historical query QH_2.

[0104] For the residual identifier {Type, Taste}, the values ​​of the residual identifier {Type, Taste} in the predictive query (Q_P) can be determined as =Red and =Medium, respectively, which are the operators and values ​​corresponding to the residual identifier {Type, Taste} in the first historical query QH_1.

[0105] The above describes the operation of the query processing system 100 in generating the predictive query Q_P.

[0106] The following describes the operations performed by query processing system 100 to generate response data for a target query Q_TGT received from host HOST.

[0107] Figure 9 This is a view illustrating the operations of a query processing system according to embodiments of the present disclosure in generating response data for a target query.

[0108] Reference Figure 9 The query parser 140 can parse the target query Q_TGT received from the host to generate target parsing information TGT_PARSE_INFO (S910).

[0109] The query parser 140 can send the target parsing information TGT_PARSE_INFO to the query analyzer 150 (S920).

[0110] Furthermore, the query analyzer 150 can read the target data unit TGT_DU from the buffer 130 or the storage device 110 (S930). As described above, the storage device 110 can store the target data unit TGT_DU, and the buffer 130 can optionally store the target data unit TGT_DU.

[0111] exist Figure 9 In this system, the query processing system 100 may further include a query processor 160. The query processor 160 may generate response data RESP_DATA, which is data to be sent to the host as a response to the target query Q_TGT.

[0112] exist Figure 9 In this process, the query analyzer 150 can determine the preprocessing operation to be performed on the target data unit TGT_DU read in step S930 and notify the query processor 160 (S940).

[0113] Furthermore, the query processor 160 can perform preprocessing operations on the target data unit TGT_DU to generate response data RESP_DATA (S950). Depending on the preprocessing operation, the query processor 160 can perform either a coarse processing operation or a fine processing operation on the target data unit TGT_DU.

[0114] The query processor 160 can send the generated response data RESP_DATA to the host (S960).

[0115] Similar to query predictor 120, query parser 140, and query analyzer 150, query processor 160 can also be implemented in various ways. For example, query processor 160 can be implemented as an integrated circuit (e.g., application-specific integrated circuit (ASIC) or field-programmable gate array (FPGA)) that includes logic gates for performing the operations described above.

[0116] As another example, the query processor 160 can be implemented as a processing unit (e.g., CPU, GPU, or microprocessor) that runs data for which code is defined to perform the operations described above.

[0117] Figure 10The query analyzer according to an embodiment of the present disclosure demonstrates a strategy for determining preprocessing operations based on a first threshold number and a second threshold number.

[0118] Reference Figure 10 The query analyzer 150 can count the number of operations included in the target query Q_TGT. Operations can be determined by combinations of identifiers, operators, and values ​​included in the target query Q_TGT.

[0119] Furthermore, the query analyzer 150 can determine the preprocessing operations based on the result of comparing the number of operations included in the target query Q_TGT with at least one of the first threshold number THR_1 and the second threshold number THR_2.

[0120] exist Figure 10 In the above, the number of the first threshold, THR_1, is greater than the number of the second threshold, THR_2.

[0121] The values ​​of the first threshold quantity THR_1 and the second threshold quantity THR_2 can be values ​​set internally by the query analyzer 150 or values ​​received from the host.

[0122] The preprocessing operations determined by query analyzer 150 are executed by query processor 160. Query analyzer 150 determines the optimal preprocessing operation, and query processor 160 executes the preprocessing operation, thereby reducing the size of the response data RESP_DATA sent to the host, thereby enhancing the processing performance of the target query Q_TGT.

[0123] The method used to determine the preprocessing operation can be one of three methods determined by the query analyzer 150.

[0124] First, when the number of operations included in the target query Q_TGT is greater than the first threshold number THR_1, the query analyzer 150 can determine the operation of extracting all target data units TGT_DU corresponding to the identifiers included in the target query as a preprocessing operation (Case #1).

[0125] When the number of operations included in the target query Q_TGT is less than or equal to the first threshold number THR_1 and greater than the second threshold number THR_2, the query analyzer 150 can determine the operations that execute the second threshold number THR_2 among the operations included in the target query Q_TGT as preprocessing operations (case #2).

[0126] For example, the query analyzer 150 may determine the operation of performing the operation of the target query Q_TGT on the target data unit TGT_DU, which is first specified by the second threshold number THR_2, as a preprocessing operation.

[0127] When the number of operations included in the target query Q_TGT is less than or equal to the second threshold number THR_2, the query processor 160 may determine the operation of performing all operations included in the target query Q_TGT on the target data unit TGT_DU as a preprocessing operation (case #3).

[0128] Figure 11 An example of the operation of a query processor according to an embodiment of the present disclosure to generate response data based on a preprocessing operation is shown.

[0129] exist Figure 11 In this example, the target query Q_TGT is "Select ID from Wine where Type=Red and Taste=Dry and Price<60 and Rating>6". Here, the operations are {"Type=Red", "Taste=Dry", "Price<60", "Rating>6"}, and the number of operations is 4.

[0130] Figure 11 The above reference is shown. Figure 10 Case #1 describes a situation where the number of operations included in the target query Q_TGT is greater than the first threshold number THR_1. For example, if the first threshold number THR_1 is 3 and the number of operations is 4, it is greater than the first threshold number THR_1, which is 3.

[0131] In this case, the query analyzer 150 can identify the operation that extracts the part corresponding to the identifier {Type, Taste, Price, Rating} of the operation included in the target query Q_TGT from the target data unit TGT_DU as a preprocessing operation.

[0132] Therefore, the query processor 160 can determine the result of extracting the part corresponding to the identifier {Type, Taste, Price, Rating} from all target data units TGT_DU as response data RESP_DATA for the target data unit TGT_DU.

[0133] Since there are no operations corresponding to the identifiers {Country, Grape Varieties} in the target query Q_TGT, the portion corresponding to {Country, Grape Varieties} is not included in the response data RESP_DATA. Therefore, the size of the response data RESP_DATA sent to the host is reduced compared to the size of all target data units TGT_DU.

[0134] Figure 12This illustrates another example of how a query processor, according to an embodiment of the present disclosure, generates response data based on a preprocessing operation.

[0135] exist Figure 12 In this example, the target query Q_TGT is "Select ID from Wine where Type=Red and Taste=Dry and Price<60 and Rating>6". Here, the operations are {"Type=Red", "Taste=Dry", "Price<60", "Rating>6"}, and the number of operations is 4.

[0136] Figure 12 The above reference is shown. Figure 10 Case #2 describes the situation where the number of operations included in the target query Q_TGT is less than or equal to the first threshold number THR_1 and greater than the second threshold number. For example, if the first threshold number THR_1 is 5 and the second threshold number THR_2 is 2, the number of operations (i.e., 4) can be equal to or less than the first threshold number THR_1 (5), and the number of operations can be greater than the second threshold number THR_2 (2).

[0137] In this case, the query analyzer 150 can identify two of the operations included in the target query Q_TGT, namely, the second threshold number THR_2, as preprocessing operations.

[0138] For example, query analyzer 150 can identify the operation {"Type=Red", "Taste=Dry"} of the operation {"Type=Red", "Taste=Dry"}, which first specifies the second threshold number THR_2 among the operations {"Type=Red", "Taste=Dry" "Price<60", "Rating>6"}, as a preprocessing operation.

[0139] Therefore, the query processor 160 can search within the target data unit TGT_DU for target data units (ID=B, D, H) with a "Type" value of "Red" and a "Taste" value of "Dry". The query processor 160 can determine the response data RESP_DATA using only the three target data units in the target data unit TGT_DU with IDs = B, D, and H.

[0140] like Figure 11In the example shown, since there is no operation corresponding to the identifier {Country, Grape Varieties} in the target query Q_TGT, the part corresponding to the identifier {Country, Grape Varieties} may not be included in the response data RESP_DATA.

[0141] Figure 13 This is a view illustrating another example of the operation of a query processor generating response data based on a preprocessing operation according to an embodiment of the present disclosure.

[0142] exist Figure 13 In this example, the target query Q_TGT is "Select ID from Wine where Type=Red and Taste=Dry and Price<60 and Rating>6". Here, the operations are {"Type=Red", "Taste=Dry", "Price<60", "Rating>6"}, and the number of operations is 4.

[0143] Figure 13 Case #3 above is illustrated, where the number of operations included in the target query Q_TGT is less than or equal to the second threshold number. For example, the second threshold number THR_2 can be 5, and the number of operations (i.e., 4) can be equal to or less than the second threshold number THR_2, i.e., 5.

[0144] In this case, the query analyzer 150 can determine all operations {"Type=Red", "Taste=Dry", "Price<60", "Rating>6"} included in the target query Q_TGT to perform on the target data unit TGT_DU as preprocessing operations for the target data unit TGT_DU.

[0145] Therefore, query processor 160 can search for target data units (ID=B,H) with a Type value of Red, a Taste value of Dry, a Price less than 60, and a Rating greater than 6.

[0146] The query processor 160 can determine the values ​​of the identifier ID requested by the target query Q_TGT, ID=B and H, as the response data RESP_DATA of the two target data units with ID=B and H in the target data unit TGT_DU.

[0147] Figure 14 This is a diagram illustrating a query processing method according to an embodiment of the present disclosure.

[0148] Reference Figure 14The query processing method 1400 may include step S1410: generating a predictive query Q_P based on the analysis information AN_INFO about historical queries received from the host.

[0149] For example, the analysis information AN_INFO may include information about the same identifier in the first historical query QH_1 and the second historical query QH_2 received from the host. The first historical query QH_1 is the most recently received query in the history, and the second historical query QH_2 is the query received immediately before the first historical query QH_1.

[0150] The analysis information AN_INFO may include first change information CHG_INFO1 and second change information CHG_INFO2 for each of the overlapping identifiers between the first historical query QH_1 and the second historical query QH_2. The first change information CHG_INFO1 indicates whether at least one of the operators and values ​​corresponding to each identifier has changed between the first historical query QH_1 and the second historical query QH_2. The second change information CHG_INFO2 indicates whether at least one of the operators and values ​​corresponding to each identifier has changed between the second historical query QH_2 and the third historical query QH_3. The third historical query QH_3 is the query received immediately preceding the second historical query QH_2.

[0151] In step S1410, based on the first change information CHG_INFO1 and the second change information CHG_INFO2, an identifier (i.e., a target identifier) ​​that has changed in both the first historical query QH_1 and the second historical query QH_2 can be searched, and a predictive query Q_P can be generated when a target identifier that meets the criteria is successfully found.

[0152] Step S1410 can determine the identifiers that overlap between the first historical query QH_1 and the second historical query QH_2, which can be used as the target identifiers for the prediction query Q_P. The operators and values ​​corresponding to the target identifiers in the prediction query Q_P can be determined and correspond to the target identifiers in the second historical query QH_2. The operators and values ​​of the remaining identifiers in the prediction query Q_P can be the operators and values ​​corresponding to the remaining identifiers in the first historical query QH_1.

[0153] The query processing method 1400 may include step S1420: reading one or more data units from the data table corresponding to the predicted query Q_P from the storage device 110.

[0154] The query processing method 1400 may include step S1430: storing the data units read from the storage device 110 in the buffer 130.

[0155] The query processing method 1400 may include step S1440: parsing the target query Q_TGT to generate target parsing information TGT_PARSE_INFO, the target query Q_TGT being a query received from the host.

[0156] The query processing method 1400 may include step S1450: reading a target data unit TGT_DU from a buffer 130 or a storage device 110, the target data unit TGT_DU being a data unit included in a data table corresponding to the target parsing information TGT_PARSE_INFO.

[0157] Step S1450 may include: determining whether the target data unit TGT_DU is stored in the buffer 130; when the target data unit TGT_DU is stored in the buffer 130, reading the target data unit TGT_DU from the buffer 130; when the target data unit TGT_DU is not stored in the buffer 130, reading the target data unit TGT_DU from the storage device 110.

[0158] The query processing method 1400 may further include: generating response data RESP_DATA, which is data to be sent to the host HOST as a response to the target query Q_TGT.

[0159] Generating response data RESP_DATA may include: counting the number of operations included in the target query Q_TGT; determining the preprocessing operations to be performed on the target data unit TGT_DU based on the result of comparing the number of operations included in the target query Q_TGT with at least one of a first threshold number THR_1 and a second threshold number THR_2; and performing the preprocessing operations on the target data unit TGT_DU to generate response data RESP_DATA, wherein the first threshold number THR_1 is greater than the second threshold number THR_2.

[0160] For example, when the number of operations included in the target query Q_TGT is greater than the first threshold number THR_1, generating response data RESP_DATA may include: determining the operation that extracts the part corresponding to the identifier included in the target query Q_TGT from the target data unit TGT_DU as a preprocessing operation.

[0161] As another example, when the number of operations included in the target query Q_TGT is less than or equal to a first threshold number THR_1 and greater than a second threshold number THR_2, generating response data RESP_DATA may include: determining operations of the second threshold number THR_2 among the operations included in the target query Q_TGT as preprocessing operations. In this case, operations of the second threshold number THR_2 may be the operations of the second threshold number THR_2 specified first among the operations included in the target query Q_TGT.

[0162] As another example, when the number of operations included in the target query Q_TGT is less than or equal to the second threshold number THR_2, generating response data RESP_DATA may include: determining the operations that perform all operations included in the target query Q_TGT on the target data unit TGT_DU as preprocessing operations.

[0163] The above query processing method 1400 can be executed by the query processing system 100.

[0164] While exemplary embodiments of this disclosure have been described for illustrative purposes, those skilled in the art will understand that various modifications, additions, and substitutions can be made without departing from the scope and spirit of this disclosure. Therefore, the embodiments disclosed above and in the accompanying drawings should be considered in a descriptive sense only and not as limiting the scope of the technology. The technical scope of this disclosure is not limited by the embodiments and the accompanying drawings. The spirit and scope of this disclosure should be interpreted in conjunction with the appended claims and cover all equivalent forms falling within the scope of the appended claims.

Claims

1. A query processing system, comprising: A storage device for storing one or more data tables, each of which includes one or more data units; A query predictor generates a predictive query based on analytical information about historical queries received from a host, and reads one or more data units corresponding to the predictive query from the storage device; A buffer that stores data units read from the storage device; A query parser parses a target query to generate target parsing information, the target query being a query received from the host; as well as The query analyzer determines whether a target data unit is stored in the buffer, the target data unit being a data unit corresponding to the target parsing information. When the target data unit is stored in the buffer, the target data unit is read from the buffer, and when the target data unit is not stored in the buffer, the target data unit is read from the storage device.

2. The query processing system according to claim 1, wherein, The analysis information includes information about identifiers included in both the first and second historical queries received from the host, and The first historical query is the most recently received query among the historical queries, and the second historical query is the query received immediately before the first historical query.

3. The query processing system according to claim 2, wherein, The analysis information includes first change information and second change information, wherein the first change information and the second change information relate to each of the identifiers included in both the first historical query and the second historical query. The first change information indicates whether at least one of the operators and values ​​corresponding to each of the identifiers has changed between the first historical query and the second historical query, and the second change information indicates whether at least one of the operators and values ​​corresponding to each of the identifiers has changed between the second historical query and the third historical query received immediately before the second historical query.

4. The query processing system according to claim 3, wherein, The query predictor searches for a target identifier based on the first change information and the second change information. The target identifier is an identifier that has changed in both the first historical query and the second historical query. When the target identifier is successfully found, the predictive query is generated.

5. The query processing system according to claim 4, wherein, The query predictor sets the identifiers included in both the first historical query and the second historical query as the identifiers in the predicted query, determines the operators and values ​​corresponding to the target identifier in the predicted query as the operators and values ​​corresponding to the target identifier in the second historical query, and determines the operators and values ​​of the remaining identifiers in the predicted query other than the target identifier as the operators and values ​​corresponding to the remaining identifiers in the first historical query.

6. The query processing system according to claim 1, further comprising a query processor, the query processor generating response data, the response data being data to be sent to the host as a response to the target query. The query analyzer counts the number of operations included in the target query and, based on a comparison of the number of operations included in the target query with at least one of a first threshold number and a second threshold number, determines the preprocessing operations to be performed on the target data unit. The query processor generates the response data by performing the preprocessing operation on the target data unit, and The number of the first threshold is greater than the number of the second threshold.

7. The query processing system according to claim 6, wherein, When the number of operations included in the target query is greater than the first threshold number, the query analyzer determines the operation that extracts the part corresponding to the identifier included in the target query from the target data unit as the preprocessing operation.

8. The query processing system according to claim 6, wherein, When the number of operations included in the target query is less than or equal to the first threshold number and greater than the second threshold number, the query analyzer determines the operation of performing the second threshold number of operations among the operations included in the target query on the target data unit as the preprocessing operation.

9. The query processing system according to claim 8, wherein, The query analyzer determines the preprocessing operation as the operation that performs the first specified number of operations among the operations included in the target query on the target data unit, based on the second threshold number of operations.

10. The query processing system according to claim 6, wherein, When the number of operations included in the target query is less than or equal to the second threshold number, the query processor determines the operation of performing all operations included in the target query on the target data unit as the preprocessing operation.

11. A query processing method, comprising: Predictive queries are generated based on analytical information about historical queries received from the host. Read one or more data units from the data table that correspond to the prediction query from the storage device; The data units read from the storage device are stored in the buffer; Parse the target query to generate target parsing information, wherein the target query is a query received from the host; When a target data unit is stored in the buffer, the target data unit is read from the buffer. The target data unit is a data unit included in the data table corresponding to the target parsing information. as well as When the target data unit is not stored in the buffer, the target data unit is read from the storage device.

12. The query processing method according to claim 11, wherein, The analysis information includes information about identifiers included in both the first and second historical queries received from the host, and The first historical query is the most recently received query among the historical queries, and the second historical query is the query received immediately before the first historical query.

13. The query processing method according to claim 12, wherein, The analysis information includes first change information and second change information, wherein the first change information and the second change information relate to each of the identifiers included in both the first historical query and the second historical query. The first change information indicates whether at least one of the operators and values ​​corresponding to each of the identifiers has changed between the first historical query and the second historical query, and the second change information indicates whether at least one of the operators and values ​​corresponding to each of the identifiers has changed between the second historical query and the third historical query received immediately before the second historical query.

14. The query processing method according to claim 13, wherein, Generating the prediction query includes: Search for a target identifier based on the first change information and the second change information, wherein the target identifier is an identifier that has changed in both the first historical query and the second historical query, and When the target identifier is successfully found, the predictive query is generated.

15. The query processing method according to claim 14, wherein, Generating the prediction query further includes: The identifiers included in both the first and second historical queries are set as the identifiers in the predicted query. The operators and values ​​corresponding to the target identifier in the predicted query are determined as the operators and values ​​corresponding to the target identifier in the second historical query, and The operators and values ​​of the remaining identifiers in the predictive query other than the target identifier are determined as the operators and values ​​in the first historical query corresponding to the remaining identifiers other than the target identifier.

16. The query processing method according to claim 11, further comprising generating response data, wherein the response data is data to be sent to the host as a response to the target query. Generating the response data includes: The number of operations included in the target query is counted. Based on the result of comparing the number of operations included in the target query with at least one of a first threshold number and a second threshold number, the preprocessing operations to be performed on the target data unit are determined, and The response data is generated by performing the preprocessing operation on the target data unit. The number of the first threshold is greater than the number of the second threshold.

17. The query processing method according to claim 16, wherein, Generating the response data further includes: When the number of operations included in the target query is greater than the first threshold number, the operation that extracts the part corresponding to the identifier included in the target query from the target data unit is determined as the preprocessing operation.

18. The query processing method according to claim 16, wherein, Generating the response data further includes: When the number of operations included in the target query is less than or equal to the first threshold number and greater than the second threshold number, the operation of performing the second threshold number of operations included in the target query on the target data unit is determined as the preprocessing operation.

19. The query processing method according to claim 16, wherein, Generating the response data further includes: When the number of operations included in the target query is less than or equal to the second threshold number, the operation of performing all the operations included in the target query on the target data unit is determined as the preprocessing operation.

20. A system comprising: A storage device for storing one or more data tables, each of which includes one or more data units; A buffer that stores data units read from the storage device; as well as The query predictor generates a predictive query based on analytical information about historical queries received from the host, selects a data table corresponding to the predictive query from the storage device, and reads one or more data units included in the selected data table from the storage device and stores the read data units in the buffer.