hottub.patents
US 12,373,438 B1#3483920 Most CitedActiveUnited States (USPTO)Utility

Database like peeking

0Forward Citations (#3483920 Global)
0.0/yrCitation Velocity (#3483920 Global)
0.00Citation PageRank (#3483920 Global)
6Prior Art Cited
8Claims (1 Indep. · 7 Dep.)
0Drawings / Sheets

Abstract

Techniques are disclosed relating to query planning and execution. A computer system can receive a database statement that comprises a LIKE predicate that defines a set of pattern parameters. The computer system may generate first and second query paths for a query plan associated with the database statement. The first query path utilizes an index associated with a database table specified by the database statement while the second query path does not utilize the index. The computer system executes the database statement in accordance with the query plan and values that are provided for the set of pattern parameters. As a part of executing the database statement, the computer system may evaluate those values to determine whether they are prefix constants and execute the first query path instead of the second query path if all the values are prefix constants.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 6 · Forward citations: 0.

Claims (8 — 1 Independent, 7 Dependent)

  1. Claim 1Independent Claim

    A method, comprising: receiving, by a computer system, a database statement that comprises a LIKE predicate defining a set of pattern parameters; generating, by the computer system, a query plan to execute the database statement, wherein the query plan includes a first query path that utilizes an index associated with a database table specified by the database statement and a second query path that does not utilize the index; and performing, by the computer system, a first execution of the database statement in accordance with the query plan and values provided for the set of pattern parameters, wherein the first execution includes: evaluating the values to determine whether the values are prefix constants; and executing the first query path of the query plan instead of the second query path of the query plan in response to determining that all the values are prefix constants.

  2. Claim 2Depends on #1

    The method of claim 1, wherein the values are provided to the computer system during an execution phase associated with the database statement that occurs temporally after a query planning phase in which the first and second query paths of the query plan are generated.

  3. Claim 3Depends on #1

    The method of claim 1, further comprising: receiving, by the computer system, another database statement that comprises a LIKE predicate defining other values for another set of pattern parameters; evaluating, by the computer system, the other values to determine whether the other values are prefix constants; and in response to determining that all the other values are prefix constants, the computer system generating a query plan that includes a query path that utilizes an index associated with a database table specified by the other database statement.

  4. Claim 4Depends on #1

    The method of claim 1, further comprising: receiving, by the computer system, another database statement that comprises a LIKE predicate defining at least one pattern parameter and a cast operation associated with the at least one pattern parameter; and generating, by the computer system, a query plan for the other database statement that, when executed, involves performing the cast operation as part of evaluating the LIKE predicate of the other database statement.

  5. Claim 5Depends on #1

    The method of claim 1, wherein the values are extracted during the first execution from an unnest operation of the database statement.

  6. Claim 6Depends on #5

    The method of claim 5, wherein the unnest operation includes a cast operation on a data structure that stores the values, and wherein the method further comprises: determining, by the computer system, whether the cast operation casts the data structure as a text data structure; and extracting, by the computer system, the values in response to determining that the cast operation casts the data structure as a text data structure.

  7. Claim 7Depends on #1

    The method of claim 1, wherein the first and second query paths are subpaths of a LIKE path having a particular estimated execution cost that corresponds to a first estimated execution cost of the first query path and not a second estimated execution cost of the second query path, and wherein an execution cost of the query plan is based on the particular estimated execution cost of the LIKE path.

  8. Claim 8Depends on #7

    The method of claim 7, wherein the first estimated execution cost of the first query path is less than the second estimated execution cost of the second query path.

Technical Overview & Description

BACKGROUND Technical Field This disclosure relates generally to database systems and, more specifically, to various mechanisms relating to query planning and execution. Description of the Related Art Enterprises routinely implement database management systems (or, simply “ database systems ” ) that enable users to store a collection of information in an organized manner that can be efficiently accessed and manipulated. The information is often stored in database tables that comprise rows and columns, in which each column defines a grouping of that information. To access information from a database table, a client can issue a request, in the form of a database query, for that information. A query typically specifies criteria for selecting records of the table to be manipulated and/or returned to the requestor. But the database table may be organized in such a manner that it is difficult to efficiently identify the records that satisfy the criteria of the query. In order to improve the execution time of queries against a table, indexes are often built based on columns/fields of the table, where the indexes organize a portion of the data stored in the table in a different manner. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram illustrating example elements of a system having a database and a database node that executes database statements in relation to the database, according to some embodiments. FIG. 2 is a block diagram illustrating an example database table, an example index, and an example database statement having a LIKE predicate, according to some embodiments. FIGS. 3 A-B are block diagrams illustrating example elements that pertain to processing a LIKE predicate involving multiple parameter values, according to some embodiments. FIG. 4 is a block diagram illustrating example elements that pertain to processing a cast operation of a database statement having a LIKE predicate, according to some embodiments. FIG. 5 is a block diagram illustrating exam

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

References Cited — Backward Prior Art (6)

PatentTitleYearCitations