7-40 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition
If you change the type back to Select, the associated opaque views are dropped from the data source, or an error message appears. See
When to Delete Opaque Views or Deployed Views
for information about deleting deployed views.
■
In the Administration Tool, the view icon changes to the deployed view icon for successfully deployed views.
To deploy an opaque view: 1.
In the Physical layer of the Administration Tool, right-click the opaque view that you want to deploy.
2. In the right-click menu, select Deploy Views.
3.
In the View Deployment - Deploy Views dialog, perform the following steps:
a. In the New Table Name column, you can optionally change the new deployed
view names. If the change does not conform to the naming rules, a new name is assigned
and the dialog appears again so that you can accept or change it. This action repeats until all names pass validation.
b.
If you do not want to deploy one or more of the views, clear the appropriate rows.
4.
If there are multiple connection pools defined for the physical database, in the Select Connection Pool dialog, choose a connection pool and click Select.
The SQL statement CREATE VIEW executes, and the View Deployment Messages dialog appears.
5. In the View Deployment Messages dialog, you can search for views using Find
and Find Again, or copy the contents. 6.
When you are finished, click OK.
Undeploying a Deployed View
Running the Undeploy Views utility against a deployed view deletes the views and converts the table back to an opaque view with its original SELECT statement.
To undeploy a deployed view: 1.
In the Physical layer of the Administration Tool, right-click a physical database, catalog, schema, or table.
If a deployed view exists that is related to the selected object, the right-click menu contains the Undeploy Views option.
2. Select Undeploy Views.
A list of views to be undeployed appears.
3.
If you do not want to undeploy one or more of the views, clear the appropriate rows.
4. In the View Deployment - Undeploy Views dialog, click OK to remove the
views. A message appears if the undeployment was successful.
5.
In the View Deployment Messages dialog, you can search for undeployed views using Find and Find Again, or you can copy the contents.
6. When you are finished, click OK.
Working with Physical Tables, Cubes, and Joins 7-41
When to Delete Opaque Views or Deployed Views
Use the following guidelines to remove opaque or deployed view objects in the repository:
■
Removing an undeployed opaque view in the repository. If the opaque view has
not been deployed, you can delete it from the repository.
■
Removing a deployed view. When you deploy an opaque view, a view table is
created physically in both the data source and the repository. Therefore, you must undeploy the view before deleting it. You use the Undeploy Views utility in the
Administration Tool. This removes the opaque view from the back-end data source, changes the Table Type from None to Select, and restores the SELECT
statement of the object in the Physical layer of repository.
When to Redeploy Opaque Views
After removing an opaque view, you can choose to redeploy it. The Administration Tool does not distinguish between a first-time deployment and a redeployment. Make
sure that you remove a deployed view before deploying the opaque view again. Failure to do this causes the deploy operation to fail, and an error message is returned
from the data source.
Using Hints
Hints are instructions placed within a SQL statement that tell the data source query optimizer the most efficient way to execute the statement. Hints override the
optimizers execution plan, so you can use hints to improve performance by forcing the optimizer to use a more efficient plan. Hints are only supported for Oracle
Database data sources.
Using the Administration Tool, you can add hints to a repository, in both online and offline modes, to optimize the performance of queries. When you add a hint to the
repository, you associate it with Physical layer objects. When the object associated with the hint is queried, the Oracle BI Server inserts the hint into the SQL statement.
Table 7–6 shows the physical objects with which you can associate hints. It also shows
the Administration Tool dialog that corresponds to the physical object. Each of these dialogs contains a Hint field, into which you can type a hint to add it to the repository.
Hints are only supported when the Table Type is set to Physical Table. For other table types, the hint text is ignored. For physical tables with a table type of Select, you
can provide the hint text as part of the SQL statement entered in the Default Initialization String
field.
Caution: Do not manually delete the view table in the data source. If
deleted, the Oracle BI Server cannot query the view object. When you undeploy the view, it is removed automatically from the data source.
Table 7–6 Physical Layer Objects That Accept Hints
Database Object Dialog
Complex join Complex Join
Physical foreign key Physical Foreign Key
Physical table Physical Table - General tab
7-42 Metadata Repository Builders Guide for Oracle Business Intelligence Enterprise Edition
How to Use Oracle Hints
This section provides a few examples of how to use Oracle hints with the Oracle BI Server. For more information about Oracle hints, see Oracle Database SQL Language
Reference for the version of the Oracle Database that you use.
About the Index Hint
The Index hint instructs the optimizer to scan a specified index rather than a table. Example 7–1
explains how you would use the Index hint.
Example 7–1 Index Hint
You find queries against the ORDER_ITEMS table to be slow. You review the execution plan of the query optimizer and find the FAST_INDEX index is not being used. You
create an Index hint to force the optimizer to scan the FAST_INDEX index rather than the ORDER_ITEMS table. The syntax for the Index hint is indextable_name,
index_name
. To add this hint to the repository, go to the Physical Table dialog in
the Administration Tool and type the following text in the Hint field:
indexORDER_ITEMS, FAST_INDEX
About the Leading Hint
The Leading hint forces the optimizer to build the join order of a query with a specified table. The syntax for the Leading hint is leadingtable_name. If you
were creating a foreign key join between the Products table and the Sales Fact table and wanted to force the optimizer to begin the join with the Products table, you would
go to the Physical Foreign Key dialog in the Administration Tool and type the following text in the Hint field:
leadingProducts
About Performance Considerations for Hints
Hints that are well researched and planned can result in significantly better query performance. However, hints can also negatively affect performance if they result in a
suboptimal execution plan. Follow these guidelines to create hints to optimize query performance:
■
You should only add hints to a repository after you have tried to improve performance in the following ways:
– Added physical indexes or other physical changes to the Oracle Database.
– Made modeling changes within the server.
■
Avoid creating hints for physical table and join objects that are queried often. If you drop or rename a physical object that is associated with a hint, you must also
alter the hints accordingly.
Creating Hints
The following procedure explains how to add hints to the repository using the Administration Tool.
To create a hint: 1.
In the Administration Tool, go to one of the following dialogs:
– Physical Table—General tab
Working with Physical Tables, Cubes, and Joins 7-43
– Physical Foreign Key
– Complex Join
2. Type the text of the hint in the Hint field and click OK.