Table scan predicate with integrated semi-join filter
US-2024419650-A1 · Dec 19, 2024 · US
US2021117424A1 · US · A1
| Field | Value |
|---|---|
| Publication number | US-2021117424-A1 |
| Application number | US-202017084840-A |
| Country | US |
| Kind code | A1 |
| Filing date | Oct 30, 2020 |
| Priority date | Aug 31, 2018 |
| Publication date | Apr 22, 2021 |
| Grant date | — |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A database query optimization computer-implemented method, medium, and system are disclosed. In one computer-implemented method, a data query request sent by a client device is received and parsed. An execution plan for executing the data query request is determined based on a parsing result. If the execution plan is a nested loop anti-join, whether there is a possibility that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is determined. If there is a possibility that the to-be-queried field contains a NULL value, a filter condition is generated and the execution plan is optimized based on the filter condition.
Opening claim text (preview).
What is claimed is: 1 . A computer-implemented method for database query optimization, comprising: receiving a data query request sent by a client device; parsing the data query request, and determining an execution plan for executing the data query request based on a parsing result; in response to determining that the execution plan is a nested loop anti-join, determining whether a probability that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is greater than zero; and in response to determining that the probability that the to-be-queried field contains a NULL value is greater than zero, generating a filter condition and optimizing the execution plan based on the filter condition generated. 2 . The computer-implemented method of claim 1 , wherein determining whether a probability that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is greater than zero comprises: determining a NULL attribute of a to-be-queried field in a to-be-queried data table indicated by the data query request. 3 . The computer-implemented method of claim 2 , further comprising: in response to determining that the NULL attribute of the to-be-queried field is in a default state, determining that the probability that the to-be-queried field contains a NULL value is zero, wherein the default state indicates that a value of the to-be-queried field is not allowed to be a NULL value; and in response to determining that the NULL attribute of the to-be-queried field is in a non-default state, determining that the probability that the to-be-queried field contains a NULL value is greater than zero, wherein the non-default state indicates that the value of the to-be-queried field is allowed to be a NULL value. 4 . The computer-implemented method of claim 1 , wherein generating a filter condition comprises: determining a data representation form of a field value of the to-be-queried field in the to-be-queried data table, wherein the data representation form comprises a single-value form or a vector form; and generating a filter condition based on the data representation form, wherein different data representation forms correspond to different filter conditions. 5 . The computer-implemented method of claim 4 , wherein generating a filter condition based on the data representation form comprises: in response to the data representation form being a single-value form, generating a first filter condition. 6 . The computer-implemented method of claim 5 , further comprising: in response to the data representation form being a vector form, generating a second filter condition. 7 . The computer-implemented method of claim 1 , wherein optimizing the execution plan based on the filter condition generated comprises: applying the filter condition generated as a join condition for inner loop scanning in the nested loop anti-join. 8 . A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising: receiving a data query request sent by a client device; parsing the data query request, and determining an execution plan for executing the data query request based on a parsing result; in response to determining that the execution plan is a nested loop anti-join, determining whether a probability that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is greater than zero; and in response to determining that the probability that the to-be-queried field contains a NULL value is greater than zero, generating a filter condition and optimizing the execution plan based on the filter condition generated. 9 . The non-transitory, computer-readable medium of claim 8 , wherein determining whether a probability that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is greater than zero comprises: determining a NULL attribute of a to-be-queried field in a to-be-queried data table indicated by the data query request. 10 . The non-transitory, computer-readable medium of claim 9 , further comprising: in response to determining that the NULL attribute of the to-be-queried field is in a default state, determining that the probability that the to-be-queried field contains a NULL value is zero, wherein the default state indicates that a value of the to-be-queried field is not allowed to be a NULL value; and in response to determining that the NULL attribute of the to-be-queried field is in a non-default state, determining that the probability that the to-be-queried field contains a NULL value is greater than zero, wherein the non-default state indicates that the value of the to-be-queried field is allowed to be a NULL value. 11 . The non-transitory, computer-readable medium of claim 8 , wherein generating a filter condition comprises: determining a data representation form of a field value of the to-be-queried field in the to-be-queried data table, wherein the data representation form comprises a single-value form or a vector form; and generating a filter condition based on the data representation form, wherein different data representation forms correspond to different filter conditions. 12 . The non-transitory, computer-readable medium of claim 11 , wherein generating a filter condition based on the data representation form comprises: in response to the data representation form being a single-value form, generating a first filter condition. 13 . The non-transitory, computer-readable medium of claim 12 , further comprising: in response to the data representation form being a vector form, generating a second filter condition. 14 . The non-transitory, computer-readable medium of claim 8 , wherein optimizing the execution plan based on the filter condition generated comprises: applying the filter condition generated as a join condition for inner loop scanning in the nested loop anti-join. 15 . A computer-implemented system, comprising: one or more computers; and one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising: receiving a data query request sent by a client device; parsing the data query request, and determining an execution plan for executing the data query request based on a parsing result; in response to determining that the execution plan is a nested loop anti-join, determining whether a probability that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is greater than zero; and in response to determining that the probability that the to-be-queried field contains a NULL value is greater than zero, generating a filter condition and optimizing the execution plan based on the filter condition generated. 16 . The computer-implemented system of claim 15 , wherein determining whether a probability that a to-be-queried field in a to-be-queried data table indicated by the data query request contains a NULL value is greater than zero comprises: determining a NULL attribute of a to-be-queried field in a to-be-queried data table indicated by the data query request. 17 . The computer-implemented system of claim 16 , further comprising: in response to determining that the NULL attribute o
of operators · CPC title
Data retrieval commands; View definitions · CPC title
Join order optimisation · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.