Oracle® Data Cartridge Developer's Guide 10g Release 1 (10.1) Part Number B10800-01 |
|
|
View PDF |
This section describes the features of data cartridges that are new for the 10g Release 1 (10.1), and provides pointers to additional information. Information on new features for the previous releases is retained to help users upgrading to the current release.The following sections describe new features:
New data cartridge features include:
Extensible indexing includes support for:
Array inserts: In prior releases, inserting an array of values was not supported for domain indexes, thereby adversely affecting INSERT performance. An array of values can now be inserted in a batch using the ODCIIndexInsert interface.
Parallel creation of local domain indexes: Local domain indexes deal with large amounts of data. Hence, the index creation time for local domain indexes was a bottleneck. Now, local indexes can be created in parallel (with inter-partition parallelism).
ALTER OPERATOR: As the indexing scheme evolves, users might want to support additional operator bindings or remove redundant bindings. Support for ALTER OPERATOR add or drop binding allows for operator evolution.
WITH COLUMN CONTEXT for operators: Frequently, the functional implementation for operators needs to look up the data structures that are associated with the column. However, for the functional implementation, there was no way to only pass the column information if there was no index defined on the column. Now, additional syntax is provided at the CREATE OPERATOR level to indicate that the functional implementation needs the column information to be passed in.Passing debugging information to the index implementation methods: Based on system level settings, the index type code sometimes needs to dump debugging information. A new system level event is introduced, which if set is passed in to the index type methods and the methods can then selectively dump the debugging information.
INSERT AS APPEND: INSERT (with append hint) and maintenance of global and local domain indexes during partitioned table maintenance operations is now supported. Global and local domain indexes were previously marked UNUSABLE, whenever a partition maintenance operation was defined on the base table, thereby requiring users to rebuild the indexes or the affected index partitions. This restriction is now removed and both global and local domain indexes are now maintained along with the base table partition maintenance operations.
See Also: Extensible indexing enables you to implement your modes of indexing in addition to those that are built into Oracle. |
Enhancements to the pipelined table functions framework include:
Projection information passed to the table function help it compute only the required attributes
Integration with the extensible optimizer produces better query plans
Support of anonymous return types for AnyDataSet table functions
See Also: The following chapters have been updated to reflect the modifications made for extensibility enhancements and the anonymous types and anonymous collection types. |
Oracle9i adds partitioned, local domain indexes and a number of other new features of interest to developers of data cartridges. To support local domain indexes in particular, both the Extensible Indexing interface (the ODCIIndex*
routines) and the Extensible Optimizer interface (the ODCIStats*
routines) have undergone some changes: new routines have been added, and most of the existing routines have acquired an additional parameter of the new system-defined type ODCIEnv
.
Existing code that uses the Oracle8i version of the ODCIIndex*
and ODCIStats*
interfaces does not need to be changed to run under Oracle9i unless you want to use new features that require the new interfaces. Some new features—for example, user-defined aggregate functions and table functions—do not require the new interfaces, but local domain indexes do.
To implement local domain indexes, you must adopt the new ODCIIndex*
interface. This means that, if you have existing code based on the Oracle8i version of the interface, you must migrate that code in its entirety to the Oracle9i version of the interfaces: you cannot simply supplement it with calls to a few new functions and leave the rest of the code unchanged. And, if you do adopt the Oracle9i ODCIIndex*
interface, you can use only the Oracle9i ODCIStats*
interface with it: you cannot use the Oracle8i version.
Oracle supports both the Oracle8i and Oracle9i versions of the ODCIIndex*
and ODCIStats*
interfaces. The string you return in the ODCIObjectList
parameter of ODCIGetInterfaces
tells the system which version your code implements. (Details on using this routine are explained in the reference chapters on the Extensible Indexing and Extensible Optimizer interfaces later in this book.)
To sum up: If you have Oracle8i code, that code will still work. To continue to use the Oracle8i interface, do not implement Oracle9i versions of any of the ODCIIndex*
or ODCIStats*
routines.
Restriction removed
It is now possible to create and rebuild domain indexes and local domain index partitions in parallel.
Table function enhancement
A table function can now return the generic collection type SYS.AnyDataSet.
Local domain indexes
Discrete domain indexes, called local domain indexes, can be built on the partitions of a range-partitioned table. Local domain indexes are equipartitioned with the underlying table: all keys refer only to rows stored in the local domain index's corresponding table partition.
Note: The partitioning scheme provided with Oracle9i makes it possible to create local domain indexes. This scheme may be changed in future releases of Oracle to be more transparent. Domain-index creators who adopt the present scheme should be aware that later on they may need to change to a new syntax and semantics for partitioning of indexes. |
Collection of user-defined statistics for partitioned tables
The extensible optimizer supports collection of user-defined statistics—partition level and aggregate—for partitioned tables.
New package DBMS_ODCI
New package DBMS_ODCI
contains a utility to help better estimate the cost of user-defined functions.
Support for a NULL association of a statistics type
Instances of an index type or object inherit an association of a statistics type. Now you can replace this with a NULL
association for occasions when the benefit of using a better plan may not outweigh the added cost of compiling the cost or selectivity functions implemented by the statistics type.
User-defined aggregate functions
Custom aggregate functions can be defined for working with complex data.
Table functions
Table functions can be used in the FROM
clause of a query to return a collection (either a nested table or a varray) of rows as output. A table function can use parallel execution, and result rows from can be pipelined—that is, iteratively returned.
Generic and transient datatypes
External procedures can be given fields or parameters of a generic type that can contain values of any scalar or user-defined type, making it unnecessary to implement multiple versions of the same external procedure just to handle multiple datatypes.