| Oracle9i Warehouse Builder User's Guide Release 9.2 Part Number B10996-01 |
|
Earlier in the design phase, you defined a logical model for your target system using Warehouse Builder design objects. This chapter discusses how you assign physical properties to those design objects.
This chapter first describes how you create indexes and partitions for design objects such as tables, materialized views, dimensions, and cubes defined in Warehouse Builder. Next, this chapter discusses how you assign physical properties to Warehouse Builder object definitions.
This chapter includes:
In Warehouse Builder, indexes and partitions can be created for Tables, Materialized Views, Dimensions, and Cubes. Indexes and partitions are created to enhance query performance of your data warehouse.
This section includes:
Indexes are important for speeding queries by quickly accessing data processed in a warehouse. They can be created on one or more columns of a table to speed SQL statement execution on that table. Indexes have the following characteristics:
B*-Tree and Bitmap indexes are particularly useful in data warehousing. To learn more about indexes and indexing strategies, see the Oracle9i Data Warehousing Guide.
In Warehouse Builder, after you define the data objects, such as tables, materialized views, dimensions, and cubes, you can create indexes on them according to the requirements of your target system. After creating the indexes, you need to configure them with physical properties to enable deployment. The following sections show you how to create and configure indexes in Warehouse Builder.
You can create and configure indexes on cubes, dimensions, tables, and materialized views.
To create indexes:The Configuration Properties dialog displays.
The Indexes dialog displays as shown in Figure 5-1.
Repeat this step for each index you want to create.
You are now ready to configure your index for deployment.
Warehouse Builder utilizes the bitmap indexing feature available in the Oracle database to provide pointers to the rows in a table that contain a given key value. In data warehousing, bitmaps are created to enable star query transformations. The star transformation is a cost-based query transformation aimed at efficiently executing star queries. A prerequisite of the star transformation is that a bitmap index must be built on each of the foreign key columns of the cube or cubes. For more information, see the Oracle9i Data Warehousing Guide.
To create bitmap indexes:The Configuration Properties dialog displays.
The Indexes dialog displays as shown in Figure 5-2.
Repeat this step for each index you want to create.
Bitmap indexes are created on all foreign key columns. Before bitmap indexes are generated, Warehouse Builder checks the table for foreign keys. Warehouse Builder does not generate bitmap indexes if:
No foreign keys: There are no foreign keys on the table. In this case, Warehouse Builder indicates that no index can be created because there are no foreign keys on the table.
No columns: There are foreign keys on the table but there are no columns defined for them.
Indexes exist: There are foreign keys on the table and some of them already have indexes. If there is already a bitmap index created on one of the columns, then the column name and the name of the existing index displays in the Impact Report dialog along with a message that no new bitmap index can be created for these columns.
The Impact Report for Bitmap Index Creation dialog displays.
Follow the steps listed in the section below to configure your index for deployment.
After you create indexes, you must define their parameters using the Configuration Properties dialog.
To configure indexes:
Log to Redo Log File: Indicates whether the index creation logs in the redo log file.
Parallel: If set to PARALLEL, this parameter enables parallel processing when a table is created.
Tablespace: Specify the tablespace where the index is created.
Set the Index Type parameter to BITMAP,UNIQUE, or leave it blank for a non-unique B*-tree index. If you are configuring a Bitmap index, the bitmap option is automatically selected.
Local Index: A local index reflects the structure of its underlying table. When configured TRUE, this parameter specifies that the index is partitioned on the same columns, with the same number of partitions, and the same partition bounds as its underlying table.
Deployable: Set to TRUE to indicate that you want to deploy this index.
Index Columns: Click the ... button to display the Index Columns dialog. From the Choices field, select the columns to be included in the index. Click the right arrows to move them to the Included list. Click OK.
The Indexes dialog displays.
Partitions enable you to efficiently manage very large tables and indexes by dividing them into smaller, more manageable parts. Partitions can be created to improve query and load performance and to simplify the management of physical storage. Because partitions can be managed individually and can operate independently of other partitions, they provide a structure that can be better tuned for performance. DML statements can access and manipulate individual partitions rather than entire tables or indexes.
In Warehouse Builder, you can create two types of partitions:
You can create and then configure partitions for Tables, Materialized Views, Cubes, and Dimensions. After creating the partitions, you need to configure them with physical properties to enable deployment. The following sections show you how to create and configure partitions in Warehouse Builder.
To create partitions in Warehouse Builder, you need to follow these steps:
The following sections outline these steps in detail.
The Configuration Properties dialog displays.
Warehouse Builder displays the Partition Keys dialog.
Range partition information always overwrites Hash partition information.
If you choose to create a Hash partition, follow the steps following this section. If you choose to create a Range partition, see "Creating Range Partitions".
The Range Partitions dialog displays.
To delete a partition name from the list, select a partition name and click Delete.
The range partitions are displayed under the Range Partitions node in the Configuration Properties dialog.
Date Less Than: Type the non-inclusive upper limit for the current partition. This entry is an ordered list of literal values corresponding to column_list in the partition_by_range_clause. You can substitute the keyword MAXVALUE for any literal in value_list. MAXVALUE specifies a maximum value that sorts higher than any other value, including NULL.
Warehouse Builder uses the partition name and the Value Less Than property to generate the DDL script for partitioning the table. The Value Less Than property defines the contents of the partition.
Tablespace: Type the name of the physical attribute of the tablespace associated with the partition. If the value is not specified, then the tablespace for this partition will take the default value of the tablespace specified by the table.
Deployable: Select TRUE to indicate that you want to deploy this partition. Warehouse Builder only generates scripts for partitions marked deployable.
The Partitions dialog displays.
A local index is created to reflect the structure of the underlying table. It is partitioned on the same columns as the underlying table, creating the same number of partitions or subpartitions, and partition bounds as the corresponding partitions of the underlying table.
To create a local index:
In this phase, you assign physical deployment properties to the object definitions you created in Warehouse Builder by configuring properties such as tablespaces, partitions, and other identification parameters. You also configure runtime parameters such as job names, runtime directories, etc.
These physical properties are set using the Configuration Properties window. Properties can be set for each individual design object such as tables, dimensions, views, mappings, etc. or for target modules. The following sections show you how to assign physical properties to your logical design model.
Each target module provides top level configuration options for all the objects contained in that module.
To configure a Target Module:
Warehouse Builder displays the Configuration Properties dialog as shown in Figure 5-3.
For each parameter, you can either select an option from a list, type a value, or click ... to display another properties dialog.
Default Index Tablespace: Defines the name of each tablespace where indexes are created. The default is null. If you configure an index tablespace at the target module level and not at the object level, Warehouse Builder uses the tablespace value configured at the target module level, during code generation. If you configure a tablespace for each index at the object level, Warehouse Builder overwrites the tablespace value configured at the target module level.
Default Object Tablespace: Defines the name of each tablespace where objects are created, for example, tables, views, or materialized views. The default is null. If you configure object tablespace at the target module level and not at the individual object level, Warehouse Builder uses the value configured at the target module level, during code generation. If you configure a tablespace for each individual object, Warehouse Builder overwrites the tablespace value configured at the target module level.
End of Line: Defines the end of line markers for flat files. This is dependent on the platform to which you are deploying your warehouse. For UNIX, use \n, and for NT, use \r\n.
PL/SQL Generation Mode: Defines the target database type. Code generation is based on the your choice in this field. For example, selecting Oracle9i ensures the use of Oracle9i code constructs, selecting Oracle8i would generate row-based code.
Oracle9i Warehouse Builder introduces new functionality available for Oracle9i databases and higher only. If you select Oracle8i for the PL/SQL Generation Mode, some Oracle9i Warehouse Builder functionalities such as Table Functions and External Tables are not available. For a list of Oracle9i Warehouse Builder not compatible with releases prior to Oracle9i, see the Oracle9i Warehouse Builder Release Notes.
Receive Directory: Not currently used. The default is receive\.
Input Directory: Not currently used. The default is input\.
Invalid Directory: Directory for Loader error and rejected records. The default is invalid\.
Work Directory: Not currently used. The default is work\.
Sort Directory: Not currently used. The default is sort\.
Log Directory: Log directory for the SQL*Loader. The default is log\.
Archive Directory: Not currently used. The default is archive\.
DDL Directory: Type a location for the scripts that create database objects in the target schema. The default is ddl\.
DDL Extension: Type a file name extension for DDL scripts. The default is .ddl.
DDL Spool Directory: Type a buffer location for DDL scripts during the script generation processing. The default is ddl\log.
LIB Directory: Type a location for the scripts that generate Oracle functions and procedures. The default is lib\.
LIB Extension: Type a suffix to be appended to a mapping name. The default is .lib.
LIB Spool Directory: Type a location for the scripts that generate user-defined functions and procedures. The default is lib\log\.
PL/SQL Directory: Type a location for the PL/SQL scripts. The default is pls\.
PL/SQL Extension: Type a file name extension for PL/SQL scripts. The default is .pls.
PL/SQL Run Parameter File: Type a suffix for the parameter script in a PL/SQL job. The default is _run.ini.
PL/SQL Spool Directory: Type a buffer location for PL/SQL scripts during the script generation processing. The default is pls\log\.
ABAP Directory: For all ABAP configuration related to SAP tables, see Appendix 21, "Using SAP R/3 Data in Warehouse Builder".
ABAP Extension: File name extension for ABAP scripts. The default is .abap.
ABAP Run Parameter File: Suffix for the parameter script in an ABAP job. The default is _run.ini.
ABAP Spool Directory: The location where ABAP scripts are buffered during script generation processing.
Loader Directory: Type a location for the control files. The default is ctl\.
Loader Extension: Type a suffix for the loader scripts. The default is .ctl.
Loader Run Parameter File: Type a suffix for the parameter initialization file. The default is _run.ini.
Main Application Short Name
Application Short Name
Schema Owner
Connect String
Remote Host Name
Port
Service Name
Top Directory
Deployable
Warehouse Builder generates DDL scripts for each table defined in a target module. Follow these steps to configure a table.
To configure the physical properties for a table:Warehouse Builderdisplays the Configuration Properties dialog as shown in Figure 5-4.
NOLOGGING. The default is LOGGING.
Create and configure indexes as described in "Configuring External Tables"and "Configuring Indexes"
Configure the following properties for an external table:
To configure the physical properties for an external table:
The Configuration Property window displays as shown in Figure 5-5.
If you imported the external table into the repository or created the external table without specifying a source file, do not configure these properties. Access specification properties are overruled by settings on the Access Parameters tab in the External Table Properties window.
Under Access Specification, you can indicate the following file names and locations Warehouse Builder uses to load the external table via SQL*Loader.
For each of these files, you can either specify a file name and location, select Do not use, or select Use default location.
Under Reject, you can indicate how many rejected rows to allow. By default, the number of rejected rows allowed is unlimited. If you set Rejects are unlimited to false, enter a number in Number of rejects allowed.
Parallel: Enables parallel processing. If you are using a single system, set the value to NONPARALLEL to improve performance. If you are using multiple systems, accept the default PARALLEL.The access driver attempts to divide data files into chunks that can be processed separately. The following file, record, and data characteristics make it impossible for a file to be processed in parallel:
If you imported the external table into the repository or created the external table without specifying a source file, do not configure these properties. Data characteristics properties are overruled by settings on the Access Parameters tab in the External Table Properties window.
Under Data Characteristics you can set the following properties:
If you imported the external table into the repository or created the external table without specifying a source file, do not configure these properties. Field editing properties are overruled by settings on the Access Parameters tab in the External Table Properties window.
Under Field Editing, you can indicate the type of whitespace trimming to be performed on character fields in the datafile. The default setting in Warehouse Builder is to perform no trim. All other trim options can reduce performance. You can also set the trim option to trim blanks to the left, right, or both sides of a character field.
Another option is set the trim to perform according to the SQL*Loader trim function. If you select SQL*Loader trim, fixed-length files are right trimmed and delimited files specified to have enclosures are left trimmed only when a field is missing an enclosure.
You can indicate how to handle missing fields in a record. If you set the option Trim Missing Values Null to true, fields with missing values are set to NULL. If you set the property to false, fields with missing values are rejected and sent to specified bad file.
See "Identification" for details.
You must add at least one data file to an external table to associate the external table with more than one flat file.
To add a data file:The Data Files dialog displays.
Warehouse Builder displays the flat file under the Data Files property.
Data File Location: Location for the flat file.
Data File Name: Name of the flat file.
Follow these steps to configure an AQ in Warehouse Builder.
To configure an Advanced Queue:
The Configuration Properties dialog displays, as shown in Figure 5-6.
Tablespace: Name of the tablespace where the AQ and its corresponding table will be created.
Deployable: Select TRUE if you want to generate scripts and deploy this AQ. Warehouse Builder only generates for AQs marked deployable.
Queue Table Name: Provide the name of the AQ table that is used to persist the messages in the AQ.
Generate Object Type: Indicate whether you want to deploy the object type associated with the AQ.
Generate Queue Table: Indicate whether you want to deploy the queue table associated with the AQ.
When you are deploying the second AQ that shares the same object type or queue table with other AQs, you must set the generation options for these properties as FALSE. If not, the deployment of the AQ will fail.
Generate Advanced Queue: Indicate whether you want to deploy the AQ.
Generate Temporary Table: Indicate whether you want to deploy the temporary table associated with the AQ. Even if the AQ already exists in your target system, the temporary table must be deployed by setting this option as True.
The deployment of the queue table, the AQ, and the temporary table can be viewed under Advanced Queue in the Runtime Audit Browser.
When you configure a dimension, you configure both the dimension and the underlying table.
To configure the physical properties for a dimension:The Configuration Property window displays.
Generate Table: This can be set to true or false using the drop-down menu. Set to true to generate the underlying table. Set to false if you do not want to generate the underlying table.
Generate Dimension: This can be set to true or false using the drop-down menu. Set to true to generate the dimension object. Set to false if you do not want to generate the dimension object.
For more information on dimensions, see the following section:
When you configure a cube, you configure both the cube and the underlying table.
To configure the physical properties for a cube:The Configuration Property window displays.
Although there are no additional sets of configuration parameters for cubes, the following are some guidelines for configuring a cube.
When you configure a cube, verify the following requirements:
For more information on cubes, see the following sections:
The Configuration Property window displays as shown in Figure 5-7.
To configure Base Tables, you must type the names of the tables referenced by the materialized view. Separate each table name with a comma. If a table name is not in upper case, enclose the name in double quotes. By default, this field is empty.
For related information, see "Using Materialized Views"
You can configure a materialized view in Warehouse Builder to refresh incrementally. When you update the base tables for a materialized view, the database stores updated record pointers in the materialized view log. Changes in the log tables are used to refresh the associated materialized views.
To ensure incremental refresh of materialized views in Warehouse Builder, verify the following conditions:
Warehouse Builder generates a script for each view defined in a target module. You can configure whether to deploy specific views or not by setting the Deployable parameter to TRUE or FALSE.
For more information on views, see the following sections:
Warehouse Builder generates a script for each sequence object. A sequence object has a Start With and Increment By parameter. Both parameters are numeric.
To configure the physical properties for a sequence:The Configuration Properties dialog displays, as shown in Figure 5-8.
Increment By: The number you want to increment your sequence by.
Start With: The number you want the sequence to start with.
Deployable: Select TRUE to indicate that you want to deploy this sequence. Warehouse Builder only generates scripts for sequences marked deployable.
For related information, see the following sections:
|
|
![]() Copyright © 2001, 2003 Oracle Corporation. All Rights Reserved. |
|