Generating filtered data sets for efficient query execution
AssigneeOracle International Corporation
InventorsPradeep Krishnappa Ajanahalli, Sanjay Anant Pusegaonkar, Atanu Majumdar, Kartik Raghavan
Life of this patent
Estimating the term…
Abstract
A system filters a data set for the efficient execution of queries by removing at least some irrelevant records to generate a reduced data set. The records are determined to be irrelevant based on the values of the records for the particular attribute(s) corresponding to the filtering operation. The system filters out records within a data set that do not include any of the values defined for the particular attribute by a set of queries that are to be executed on the filtered set of records.
Claims25
A method, comprising:
- obtaining, by a rules-processing engine comprising one or more processors and memory, a plurality of rules, wherein each rule, of the plurality of rules, defines respective values for one or more attributes of a plurality of attributes;
- ranking, by the rules-processing engine, each particular attribute, of the plurality of attributes, based on a number of rules from the plurality of rules that define values for the particular attribute;
- generating a directed acyclic graph (DAG) tree for the plurality of attributes based on the rankings of the plurality of attributes, wherein each node of the DAG tree is associated with a corresponding attribute from the plurality of attributes;
- generating a first working memory element (WME) for a first node of the DAG tree that corresponds to a first attribute of the plurality of attributes, such that the first WME identifies each record, of a plurality of records in a data set, that comprises a record value for the first attribute that matches at least one of the values defined for the first attribute by at least one of the rules;
- retrieving, by the rules-processing engine, from a database, a first subset of records, of the plurality of records, identified by the first WME for application of a first rule of the plurality of rules.
A method, comprising:
- obtaining, by a rules-processing engine comprising one or more processors and memory, a plurality of rules, wherein each rule, of the plurality of rules, defines respective values for one or more attributes of a plurality of attributes;
- ranking, by the rules-processing engine, each particular attribute, of the plurality of attributes, based on a number of rules from the plurality of rules that define values for the particular attribute;
- generating a first directed acyclic graph (DAG) tree for the plurality of attributes based on the rankings of the plurality of attributes, wherein each node of the first DAG tree is associated with a corresponding attribute from the plurality of attributes;
- generating a first working memory element (WME) for a first node of the first DAG tree that corresponds to a first attribute of the plurality of attributes, such that the first WME identifies each record, of a plurality of records in a data set, that comprises a record value for the first attribute that matches at least one of the values defined for the first attribute by at least one of the rules;
- retrieving, by the rules-processing engine, from a database, a first subset of records, of the plurality of records, identified by the first WME for application of a first rule of the plurality of rules determining that the first node is a terminal node for the first rule of the plurality of rules at least by:
- determining that the first rule is associated with a first subset of attributes of the plurality of attributes based on the first rule defining values for each of the first subset of attributes;
- determining that each of the first subset of attributes, associated with the first rule, correspond to either (a) the first node or (b) a direct or indirect parent of the first node;
- wherein retrieving the first subset of records identified by the first WME for application of the first rule comprises:
- selecting the first WME based on (a) the first WME being associated with the first node and (b) the first node being the terminal node for the first rule;
- determining that each of the first subset of records are identified by the first WME;
- applying the first rule to the first subset of records to identify a second subset of records, from the first subset of records, comprising each attribute value defined by the first rule
- wherein generating the first WME comprises:
- generating a list of each record including the record value for the first attribute that matches at least one of the values defined for the first attribute by at least one of the rules, and including a record value for each additional attribute corresponding to each parent node in the first DAG tree that matches at least one of the values defined for each additional attribute by at least one of the rule;
- generating a list of each attribute corresponding to a node downstream from the first node;
- and
- generating a list of each rule including a terminal node farther down the first DAG tree than the first node;
- generating a second WME for a second node of the first DAG tree that corresponds to a second attribute of the plurality of attributes, the second node being a child node to the first node, such that the second attribute has a ranking lower than the first attribute, and the second WME identifying a second subset of records;
- wherein identifying the second subset of records comprises:
- obtaining a list of the first subset of records identified by the first WME;
- and
- omitting from the second subset of records any record in the first subset of records that does not include a record value for the second attribute that matches at least one of the values defined for the second attribute by at least one of the rules;
- generating a third WME for a third node of the first DAG tree that corresponds to a third attribute of the plurality of attributes, the third node being a child node to the first node, such that the third attribute has a ranking lower than the first attribute, and the third WME identifying a third subset of records;
- wherein the first WME identifies a relationship of the first subset of records to a first subset of rules;
- wherein the method comprises generating a second subset of rules, and the third WME identifies a relationship between the third subset of records and the second subset of rules;
- wherein generating the second subset of rules comprises:
- obtaining a list of the first subset of rules;
- and
- omitting from the second subset of rules any respective rule, in the first subset of rules, for which each attribute defined in the respective rule has an associated node of the first DAG tree that is a parent node to the second node;
- wherein each node of the first DAG tree is associated with only one attribute, among the plurality of attributes;
- generating a second DAG tree associated with a second data set;
- and
- generating a beta node by combining the first node of the DAG tree with a fourth node of the second DAG tree,
- wherein combining the first node and the fourth node comprises identifying each record in the data set and the second data set that comprises a record value for the first attribute that matches at least one of the values defined for the first attribute by at least one of the rules,
- wherein the data set is stored in a database, and
- wherein the DAG tree is generated and stored in the database.
One or more non-transitory machine-readable media storing instructions which, when executed by one or more processors, cause performance of operations comprising:
- obtaining a plurality of rules, wherein each rule, of the plurality of rules, defines respective values for one or more attributes of a plurality of attributes;
- ranking each particular attribute, of the plurality of attributes, based on a number of rules from the plurality of rules that define values for the particular attribute;
- generating a directed acyclic graph (DAG) tree for the plurality of attributes based on the rankings of the plurality of attributes, wherein each node of the DAG tree is associated with a corresponding attribute from the plurality of attributes;
- generating a first working memory element (WME) for a first node of the DAG tree that corresponds to a first attribute of the plurality of attributes, such that the first WME includes each record from a data set that comprises a record value for the first attribute that matches at least one of the values defined for the first attribute by at least one of the rules;
- retrieving a first subset of records, of a plurality of records, identified by the first WME for application of a first rule of the plurality of rules.
A system, comprising:
- one or more processors;
- and
- memory storing instructions that, when executed by the one or more processors, cause the system to:
- obtain a plurality of rules, wherein each rule, of the plurality of rules, defines respective values for one or more attributes of a plurality of attributes;
- rank each particular attribute, of the plurality of attributes, based on a number of rules from the plurality of rules that define values for the particular attribute;
- generate a directed acyclic graph (DAG) tree for the plurality of attributes based on the rankings of the plurality of attributes, wherein each node of the DAG tree is associated with a corresponding attribute from the plurality of attributes;
- generate a first working memory element (WME) for a first node of the DAG tree that corresponds to a first attribute of the plurality of attributes, such that the first WME includes each record from a data set that comprises a record value for the first attribute that matches at least one of the values defined for the first attribute by at least one of the rules;
- retrieve a first subset of records, of a plurality of records, identified by the first WME for application of a first rule of the plurality of rules.
Dependencies are inferred from the claim text.