摘要:
Techniques are provided that determine that a query includes at least one subquery that may be correlated or decorrelated. An internal representation of the query that represents the subquery in both correlated and decorrelated form is generated, wherein the internal representation includes at least one virtual table.
摘要:
A method generates hierarchical path index keys for single and multiple indexes with one scan of a document. Each data node of the document is scanned and matches to query nodes are identified. A data node matches a query node if the three conditions hold: if it is not the root step, there is a match for the query node in the previous step of the query; the data node matches the query node of the current step; and the edges of the data and query nodes match. A sub-tree of a data node can be skipped if the data node is not matched and its level is less than the fixed levels of the query. The matched data node is then placed in the match stacks corresponding to the match query nodes. The method uses transitivity properties among matching units to reduce the number of states that need to be tracked and to improve the evaluation of path expressions significantly.
摘要:
A heuristic approach is used to order materialized view (MW) candidates in a list based on descending order of their reduction power. A query (e.g., SQL query) is then matched with the MVs in the list order, wherein searching is stopped as soon as good enough matching has been found. The query is matched with materialized views in the ordered list by identifying a materialized view candidate as follows: identifying an MV that is not locked by a REFRESH process; identifying a matching MV that does not require a regroup; identifying a matching MV that does not require a rejoin; identifying a matching MV that does not require a residual join; or identifying an MV with largest reduction power from the list of candidates.