2. The method of claim 1 , further comprising: repeating the generating and the modifying, when one or more additional local conditions are inferred from the modifying, until no additional local conditions are inferred or until no additional local conditions are inferred with respect to a computational cost of evaluating the local condition.
1. A method in a database system, comprising: identifying a set of rows that satisfy local conditions to a table prior to an execution of a query; generating a data structure based on an actual effect of the local conditions on the table comprising one or more bits, each bit representing a row in the set of identified rows, a value of each bit indicating whether its respective row satisfies the local conditions to the table; modifying the query based on the generated data structure, wherein the modifying comprises identifying a quantity of rows that satisfy the local conditions by: identifying whether there are no rows that satisfy the local conditions in the data structure; identifying whether there is exactly one row that satisfies the local conditions for contents of cell values in the exactly one row in the data structure; and identifying whether there are a moderate number of rows that satisfy the local conditions for contents of cell values in the moderate number of rows in the data structure, and wherein the modifying further comprises modifying the query based on the identifying the quantity of rows; and processing the modified query to generate an execution plan for the query.