8880511

Database Query Optimization and Cost Estimation

PublishedNovember 4, 2014
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
20 claims

Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.

Claim 1

Original Legal Text

1. A system for optimizing database queries and estimating query costs, the system comprising: a computer-readable medium having a tree indexed data structure comprising nodes, the computer-readable medium operable to store a computer-readable query optimizer; and a processor operable to execute the query optimizer for computing a cost estimate ratio associated with performing a query based at least in part on a key value, the cost estimate ratio comprising a first number of nodes in the tree indexed data structure having values less than the key value versus a second number of nodes in the tree indexed data structure having values more than the key value, and further operable to compute a cost estimation by normalizing the cost estimate ratio relative to a total size of the tree indexed data structure, wherein the tree indexed data structure comprises a hierarchical structure with a root node and a plurality of child nodes, and further wherein the tree indexed data structure is traversed with the key value to compute the cost estimate ratio associated with performing the query based at least in part on the key value.

Plain English Translation

A system optimizes database queries and estimates costs using a tree-indexed data structure (like a B-tree) stored in computer memory. A query optimizer, executed by a processor, calculates a "cost estimate ratio" for a query based on a key value. This ratio compares the number of nodes with values *less than* the key to the number of nodes with values *greater than* the key. This ratio is then normalized against the total size of the tree to estimate the query cost. The system traverses the tree structure, comparing node values to the key value to calculate the cost estimate ratio.

Claim 2

Original Legal Text

2. A system of claim 1 , wherein the nodes comprise stored values that are compared to the key value when the tree indexed data structure is traversed.

Plain English Translation

In the database query optimization system, the tree's nodes contain stored values that are compared to the query's key value during tree traversal. So, as the system searches the tree to find data matching the query, it looks at the value inside each node and sees if it is similar to the key or not.

Claim 3

Original Legal Text

3. A system of claim 2 , wherein the processor traverses the tree indexed data structure by comparing the key value to the stored values, starting at the root node and traversing the hierarchical structure until a compared node's stored value matches the key value.

Plain English Translation

In the database query optimization system, the processor starts at the tree's root node and moves down the hierarchical structure, comparing the query's key value to the stored value in each node. The traversal continues until a node's stored value is found to match the query's key value.

Claim 4

Original Legal Text

4. A system of claim 3 , wherein the processor traverses to a left node at a lower level in the hierarchical structure if the stored value of a compared node is less than the key value and traverses to a right node at the lower level if the stored value of the compared node is greater than the key value.

Plain English Translation

In the database query optimization system, when traversing the tree, if the current node's stored value is *less than* the query's key value, the system moves to a left child node at the next lower level. Conversely, if the node's value is *greater than* the key value, the system moves to a right child node at the lower level.

Claim 5

Original Legal Text

5. A system of claim 4 , wherein the processor is further operable to compute a first running total of nodes with values less than the key value and a second running total of nodes with values greater than the key value, and estimates a number of matches present in a left sub-tree and in a right sub-tree for a particular query based on the first and second running totals.

Plain English Translation

In the database query optimization system, the processor calculates two running totals during tree traversal: one for nodes with values *less than* the key value, and another for nodes with values *greater than* the key value. Based on these totals, the system estimates the number of matches present in the left and right sub-trees for a given query. This enables the estimation of the size and composition of any subtree for a certain query.

Claim 6

Original Legal Text

6. A system of claim 5 , wherein the cost estimate ratio is based on the first and second running totals.

Plain English Translation

In the database query optimization system, the "cost estimate ratio", which is used to predict the query execution cost, is based on the running totals of nodes with values less than the key and nodes with values greater than the key. These running totals are factored into the formula.

Claim 7

Original Legal Text

7. A system of claim 6 , wherein the processor computes the cost estimation using the following formulas: estimate ⁢ ⁢ of ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes ⁢ ⁢ with ⁢ ⁢ values ⁢ ⁢ less ⁢ ⁢ than ⁢ ⁢ the ⁢ ⁢ key = the ⁢ ⁢ first ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes × the ⁢ ⁢ total ⁢ ⁢ size ⁢ ⁢ of ⁢ ⁢ the ⁢ ⁢ tree ⁢ ⁢ index first ⁢ ⁢ running ⁢ ⁢ total + second ⁢ ⁢ running ⁢ ⁢ total ; and estimate ⁢ ⁢ of ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes ⁢ ⁢ with ⁢ ⁢ values ⁢ ⁢ greater ⁢ ⁢ than ⁢ ⁢ the ⁢ ⁢ key = the ⁢ ⁢ second ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes × total ⁢ ⁢ size ⁢ ⁢ of ⁢ ⁢ the ⁢ ⁢ tree ⁢ ⁢ index first ⁢ ⁢ running ⁢ ⁢ total + second ⁢ ⁢ running ⁢ ⁢ total .

Plain English Translation

In the database query optimization system, the cost estimation is calculated using the following formulas: *Estimate of nodes with values less than key* = (Number of nodes less than key) * (Total tree size) / (Running total of nodes less than key + Running total of nodes greater than key) *Estimate of nodes with values greater than key* = (Number of nodes greater than key) * (Total tree size) / (Running total of nodes less than key + Running total of nodes greater than key)

Claim 8

Original Legal Text

8. A system of claim 1 , wherein the values of each node are unique.

Plain English Translation

In the database query optimization system, the value stored within each node of the tree index is unique from the other values in the tree index.

Claim 9

Original Legal Text

9. A system of claim 8 , wherein the processor is further operable to append a unique value to an end of a value in a node to allow for the values of each node to be unique.

Plain English Translation

In the database query optimization system, a unique value is added to the end of the value in each node, to ensure that the value of each node is unique.

Claim 10

Original Legal Text

10. The system of claim 9 , wherein appending the unique value results in a substantially flattened tree.

Plain English Translation

In the database query optimization system, adding a unique value to each node, to ensure each node value is unique, results in a substantially flattened tree. A flattened tree improves data locality.

Claim 11

Original Legal Text

11. A system of claim 1 , where the tree indexed data structure is a balanced tree indexed data structure.

Plain English Translation

In the database query optimization system, the tree-indexed data structure used for query optimization is a balanced tree.

Claim 12

Original Legal Text

12. A system of claim 1 , where in the tree indexed data structure is a semi-balanced tree indexed data structure.

Plain English Translation

In the database query optimization system, the tree-indexed data structure used for query optimization is a semi-balanced tree.

Claim 13

Original Legal Text

13. A system of claim 1 , wherein the tree indexed data structure is an in-memory database structure.

Plain English Translation

In the database query optimization system, the tree-indexed data structure is stored as an in-memory database structure.

Claim 14

Original Legal Text

14. A method for optimizing database queries and estimating query costs, the method comprising: executing, using a computer processor, a computer-executable query optimizer stored in a computer-readable medium, the query optimizer operable for: computing a cost estimate ratio associated with performing a query based at least in part on a key value, the cost estimate ratio comprising a first number of nodes in a tree indexed data structure having values less than the key value versus a second number of nodes in the tree indexed data structure having values more than the key value, and computing a cost estimation by normalizing the cost estimate ratio relative to a total size of the tree indexed data structure, wherein the tree indexed data structure comprises a hierarchical structure with a root node and a plurality of child nodes, and further wherein the tree indexed data structure is traversed with the key value to compute the cost estimate ratio associated with performing the query based at least in part on the key value.

Plain English Translation

A method optimizes database queries and estimates costs. A query optimizer, executed by a processor, calculates a "cost estimate ratio" for a query based on a key value. This ratio compares the number of nodes in a tree-indexed data structure with values *less than* the key to the number of nodes with values *greater than* the key. The ratio is normalized against the total size of the tree to estimate query cost. The method traverses the tree structure, comparing node values to the key value to calculate the cost estimate ratio.

Claim 15

Original Legal Text

15. The method of claim 14 , wherein the nodes comprise stored values, and further comprising traversing the tree indexed data structure by comparing the stored values to the key value.

Plain English Translation

In the database query optimization method, the tree's nodes contain stored values, and the method involves traversing the tree by comparing these stored values to the query's key value.

Claim 16

Original Legal Text

16. A method of claim 15 , further comprising: traversing, using the processor, the tree indexed data structure by comparing the key value to the stored values, starting at the root node and traversing the hierarchical structure until a compared node's stored value matches the key value.

Plain English Translation

In the database query optimization method, the tree is traversed by starting at the root node and moving down the hierarchical structure, comparing the query's key value to the stored value in each node until a node's stored value is found to match the key value.

Claim 17

Original Legal Text

17. A method of claim 16 , further comprising: traversing to a left node at a lower level in the hierarchical structure if the stored value of a compared node is less than the key value; and traversing to a right node at the lower level if the stored value of the compared node is greater than the key value.

Plain English Translation

In the database query optimization method, when traversing the tree, if the current node's stored value is *less than* the query's key value, the method moves to a left child node at the next lower level. Conversely, if the node's value is *greater than* the key value, the method moves to a right child node at the lower level.

Claim 18

Original Legal Text

18. A method of claim 17 , further comprising: computing a first running total of nodes with values less than the key value and a second running total of nodes with values greater than the key value; and estimating a number of matches present in a left sub-tree and in a right sub-tree for a particular query based on the first and second running totals.

Plain English Translation

In the database query optimization method, two running totals are calculated during tree traversal: one for nodes with values *less than* the key value, and another for nodes with values *greater than* the key value. Based on these totals, the method estimates the number of matches present in the left and right sub-trees for a given query.

Claim 19

Original Legal Text

19. A method of claim 18 , wherein the cost estimate ratio is based on the first and second running totals.

Plain English Translation

In the database query optimization method, the "cost estimate ratio," which is used to predict query execution cost, is based on the running totals of nodes with values less than the key and nodes with values greater than the key.

Claim 20

Original Legal Text

20. A method of claim 19 , wherein computing the cost estimate uses the following formulas: estimate ⁢ ⁢ of ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes ⁢ ⁢ with ⁢ ⁢ values ⁢ ⁢ less ⁢ ⁢ than ⁢ ⁢ the ⁢ ⁢ key = the ⁢ ⁢ first ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes × the ⁢ ⁢ total ⁢ ⁢ size ⁢ ⁢ of ⁢ ⁢ the ⁢ ⁢ tree ⁢ ⁢ index first ⁢ ⁢ running ⁢ ⁢ total + second ⁢ ⁢ running ⁢ ⁢ total ; and estimate ⁢ ⁢ of ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes ⁢ ⁢ with ⁢ ⁢ values ⁢ ⁢ greater ⁢ ⁢ than ⁢ ⁢ the ⁢ ⁢ key = the ⁢ ⁢ second ⁢ ⁢ number ⁢ ⁢ of ⁢ ⁢ nodes × total ⁢ ⁢ size ⁢ ⁢ of ⁢ ⁢ the ⁢ ⁢ tree ⁢ ⁢ index first ⁢ ⁢ running ⁢ ⁢ total + second ⁢ ⁢ running ⁢ ⁢ total .

Plain English Translation

In the database query optimization method, the cost estimation is calculated using the following formulas: *Estimate of nodes with values less than key* = (Number of nodes less than key) * (Total tree size) / (Running total of nodes less than key + Running total of nodes greater than key) *Estimate of nodes with values greater than key* = (Number of nodes greater than key) * (Total tree size) / (Running total of nodes less than key + Running total of nodes greater than key)

Patent Metadata

Filing Date

Unknown

Publication Date

November 4, 2014

Inventors

Tom Kim
Firat Kart
Suresh Subramani

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, FAQs, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “DATABASE QUERY OPTIMIZATION AND COST ESTIMATION” (8880511). https://patentable.app/patents/8880511

© 2026 Nomic Interactive Technology LLC. Machine-readable context available at /api/llm-context/8880511. See llms.txt for full attribution policy.

DATABASE QUERY OPTIMIZATION AND COST ESTIMATION