摘要:
A database server provides a partitioned table with a corresponding locally partitioned index. When a request is made to load data into the table by an application, a table partition, along with a corresponding index partition, is created for the application. The corresponding index partition in marked as asynchronously maintained, allowing other index partitions to be used by the query optimizer in formulating query plans for other table partitions. Once the loading of data is complete, a synchronization operation is called with the result of conforming the data in the asynchronously maintained index partition with its corresponding table in which the data was loaded. Once the data in the corresponding table partition and the data in the asynchronously maintained index partition are synchronized, the asynchronously maintained index partition is marked as synchronously maintained.
摘要:
A database server provides a partitioned table with a corresponding locally partitioned index. When a request is made to load data into the table by an application, a table partition, along with a corresponding index partition, is created for the application. The corresponding index partition in marked as asynchronously maintained, allowing other index partitions to be used by the query optimizer in formulating query plans for other table partitions. Once the loading of data is complete, a synchronization operation is called with the result of conforming the data in the asynchronously maintained index partition with its corresponding table in which the data was loaded. Once the data in the corresponding table partition and the data in the asynchronously maintained index partition are synchronized, the asynchronously maintained index partition is marked as synchronously maintained.
摘要:
A method and apparatus are provided for using sibling-counts in XML indices to optimize single-path queries. Using a b-tree XML index with a SQL query logarithmically reduces the number of disk accesses by passing over index entries where it is determined that a match will not be found. However, because certain index entries are passed over, it is impossible to ascertain if a path expression occurs more than once in the XML index, as certain queries sometimes require. This hurdle can be overcome by maintaining a sibling count with each node entry in the XML index. Because the sibling count is stored with the index entry, the index will reveal whether the matching node is single or has other siblings. In additional to re-writing the original query for optimization by use of an XML index, it will be re-written to check for a single-path condition in the index.
摘要:
A query is rewritten to combine streaming evaluation and XML index evaluation. The query is rewritten to include a streaming operator (e.g. function) that, when executed, uses streaming evaluation. Further, the query is rewritten so that XML index evaluation of a path expression also produces location information that identifies the location of a node within an XML document. The streaming operator is able to exploit the location information to begin and end scanning rather than scanning the entire XML document.
摘要:
A method and apparatus are provided for using sibling-counts in XML indices to optimize single-path queries. Using a b-tree XML index with a SQL query logarithmically reduces the number of disk accesses by passing over index entries where it is determined that a match will not be found. However, because certain index entries are passed over, it is impossible to ascertain if a path expression occurs more than once in the XML index, as certain queries sometimes require. This hurdle can be overcome by maintaining a sibling count with each node entry in the XML index. Because the sibling count is stored with the index entry, the index will reveal whether the matching node is single or has other siblings. In additional to re-writing the original query for optimization by use of an XML index, it will be re-written to check for a single-path condition in the index.
摘要:
A method and apparatus for accelerating value-based lookups of XML documents in XQuery is provided. XML indices can help to optimize SQL queries of XML documents stored in object-relational databases. Certain SQL/XML functions such as XMLTABLE( ) use XQuery expressions to query XML documents. Previously, such queries could not use the XML index because the PATH table of the XML index was not defined for XQuery semantics. Techniques described herein extend the XML index for use with queries that require evaluation of XQuery expressions. Consequently, techniques described herein accelerate value-based lookups of XML documents in XQuery by introducing the possibility of an index-assisted evaluation of XQuery expressions.
摘要:
A method and apparatus for computing queries in a way that is consistent with an index and the underlying base table is provided. A query is computed such that it is consistent with the state of an index and base table as of the last point at which the index and table were synchronized. For example, if an index is maintained asynchronously then it is not necessarily consistent with its base table when a query is to be run against the table and the index. Therefore, the query is computed such that it will be consistent with the last point at which the index and the table were synchronized. In one embodiment, a System Change Number (SCN) of the last successful synchronization operation is used to perform a flashback query on the table.
摘要:
Approaches are provided for improving the performance of certain database queries that operate on binary-encoded XML. In particular, the approach uses occurrence and type constraint information about XML data stored in the database for optimizing the relational rewrite of a query. Constraint information can be obtained in several different ways including through a formal language specification such as an XML Schema or DTD, through discovery of a user-provided secondary index on a an XML path table, or through a structural summary that is derived from statistical analysis on a set of XML documents stored in the database.