IP Library Granted Patent US 11,386,155
Granted Patent B2
US 11,386,155 · App. 16/366,704 · Granted Jul 12, 2022

Filter evaluation in a database system

Inventors: Michal Nowakiewicz (Redmond, WA); Connor Gregory Watts (Seattle, WA)
Assignee: SingleStore, Inc.
G06F16/9027G06F16/252G06F16/953
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,386,155
App. No.
16/366,704
Granted
Jul 12, 2022
Kind
B2
Abstract

A computer-implemented method of evaluating a set of filter parameters being represented by a filter tree comprising a plurality of nodes. The method can include identifying whether a node is a root of a sub-tree comprising other nodes of the filter tree; generating a cost for said node by processing a sample input comprising a plurality of data items of a data source using the filter parameter and measuring the time taken for the plurality of data items to be processed; and determining a selectivity of said node based on an output of its filter parameter as a result of processing the sample input using the filter parameter; then ordering at least some of the plurality of nodes of the filter tree having the same parent node based on their relative costs and selectivities, for use in generating an ordered filter tree.

Claims (23)

1. A computer-implemented method of processing a query in a database management system, the query defining a set of filter parameters and at least one Boolean operator, the method comprising:

evaluating the set of filter parameters and the at least one Boolean operator, the set of filter parameters and the at least one Boolean operator being represented by a filter tree comprising a plurality of nodes of at least one parent node having a said Boolean operator and at least one child node having a said filter parameter, the evaluating comprising:

transforming the filter tree by:

replacing any parent node that has a single child node with said single child node; and

replacing any parent node that has at least one child node and that contains the same filter parameter as its own parent node, with the at least one child node of that parent node;

such that each parent node has a plurality of child nodes that do not contain the same filter parameter as said parent node;

traversing the transformed filter tree by, for each node of the plurality of nodes:

identifying whether said node is a root of a sub-tree comprising other nodes of the transformed filter tree;

generating a cost for said node by processing a sample input comprising a plurality of data items of a data source using the filter parameter and measuring the time taken for the plurality of data items to be processed, wherein if said node is identified as a root of a sub-tree, said cost is also based on a determined cost and selectivity of the other nodes of the sub-tree; and

determining a selectivity of said node based on an output of its filter parameter as a result of processing the sample input using the filter parameter;

re-ordering at least some of the plurality of nodes of the transformed filter tree having the same parent node based on their relative costs and selectivities to generate a re-ordered filter tree for the set of filter parameters; and

processing a second input comprising a predetermined number of different data items of the data source against the re-ordered filter tree in order to generate an output representative of at least one data item of the different data items that satisfies each of the filter parameters of the re-ordered filter tree; and

generating a query response that includes the output.

2. The computer-implemented method of claim 1 , wherein the set of filter parameters of the filter tree is defined by a query received by a database management system.

3. The computer-implemented method of claim 1 , wherein the traversing and ordering are part of a runtime profiling analysis performed by the database management system.

4. The computer-implemented method of claim 1 , wherein if said node is identified as a root of a sub-tree of the filter tree, the cost of the node is based on a determined cost and selectivity of an established ordering of the filter parameters of the other nodes of the sub-tree.

5. The computer-implemented method of claim 4 , wherein the ordering of the filter parameters of the other nodes of the sub-tree is established by selecting a lowest cost ordering from a plurality of orderings.

6. The computer-implemented method of claim 1 , wherein the output of the filter parameter of said node defines the sample input for the next node of the filter tree.

7. The computer-implemented method of claim 6 , wherein the output is a bit or byte vector comprising one or more set bits corresponding to one or more data items that form the sample input for the next node of the filter tree.

8. The computer-implemented method of claim 7 , further comprising updating the bit or byte vector as the filter tree is traversed.

9. The computer-implemented method of claim 1 , wherein if the node is identified as a root of a sub-tree of the filter tree, the output is representative of one or more data items of the sample input that satisfy the filter parameter of the respective node and the filter parameters of the other nodes of the sub-tree.

10. The computer-implemented method of claim 1 , wherein the ordered filter tree is a re-ordered said filter tree or a new filter tree.

11. An ordered filter tree generated in accordance with the method of claim 1 .

Assignments (7)
PATENT SECURITY AGREEMENT Recorded Oct 20, 2025
From: SINGLESTORE, INC.
To: MONROE CAPITAL MANAGEMENT ADVISORS, LLC, AS AGENT
Reel/Frame 073122/0161 →
RELEASE OF SECURITY INTEREST Recorded Oct 9, 2025
From: SILICON VALLEY BANK
To: SINGLESTORE, INC.
Reel/Frame 072524/0652 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 22, 2021
From: NOWAKIEWICZ, MICHAL; WATTS, CONNOR GREGORY
To: SINGLESTORE, INC.
Reel/Frame 057879/0561 →
SECURITY INTEREST Recorded Jul 9, 2021
From: SINGLESTORE, INC.
To: SILICON VALLEY BANK
Reel/Frame 056805/0312 →
RELEASE OF SECURITY INTEREST Recorded Jun 30, 2021
From: HERCULES CAPITAL, INC.
To: SINGLESTORE, INC.; MEMSQL USG, INC.
Reel/Frame 056723/0449 →
CHANGE OF NAME Recorded Nov 13, 2020
From: MEMSQL, INC.
To: SINGLESTORE, INC.
Reel/Frame 054414/0655 →
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Apr 29, 2020
From: MEMSQL, INC.
To: HERCULES CAPITAL, INC., AS COLLATERAL AND ADMINISTRATIVE AGENT
Reel/Frame 052523/0977 →
Continuity (1)
Related Publication 20200311141A1 · Oct 1, 2020
Cited By (1)
US 12,380,095