This action might not be possible to undo. Are you sure you want to continue?
1] Modified 30-OCT-2009 Type BULLETIN Status PUBLISHED
In this Document Purpose Scope and Application Oracle CBO and Siebel Business Applications Preparing and Administrating the Siebel Database for CBO Changes Made in Siebel 7.7, Siebel 7.8 and Siebel 8.0 for Supporting CBO References
Siebel System Software - Version: 7.7.2  to 8.0  - Release: V7 to V8 Information in this document applies to any platform. Area(s):Installation, System Administration Release(s):V7 (Enterprise), V7 (Professional), V8 (Enterprise), V8 (Professional) Database(s):Oracle App Server OS(s):All Supported Platforms Latest release tested against:V8 (Enterprise) Keywords:CBO, RBO, tuning, performance, 9i, parameter, statistics, cost, choose, optimizer This document was previously published as Siebel Technical Note 582. IMPORTANT NOTE: This document is no longer being updated. Ultimate reference for Oracle performance and tuning for Siebel Application is the White paper: Performance Tuning Guide for Siebel CRM Application on Oracle (Doc ID 781927.1)
Oracle Cost Based Optimizer (CBO) is supported for Siebel versions 7.7.x, 7.8.x, and 8.0 when deployed with Oracle RDBMS 9i and 10g. For Siebel version 7.5.x or earlier, the only optimizer mode supported is RULE for any of the database versions supported by the Siebel versions. Siebel Oracle RDBMS Version Version 7.5.x or higher 8.1.7.x (where x >= 3) 184.108.40.206 9.2.0.x (where x >= 2) 7.7.x or higher 8.1.7.x (where x >= 3) 9.2.0.x (where x >= 4) 220.127.116.11 or 10.1.0.x (where x>= 4), higher 10.2.0.x. 7.8.x or higher 9.2.0. x (where x>=4) Optimizer Mode RULE RULE RULE RULE COST COST COST Init.ora parameter OPTIMIZER_MODE RULE RULE RULE RULE CHOOSE * ALL_ROWS CHOOSE
Hence.0.8. when the OPTIMIZER_MODE should be set to RULE as described in the Document 477789.0. Some of the visible parameters are listed below. Oracle CBO and Siebel Business Applications A query optimizer determines the best Execution Path for performing each query. . with each having an estimated cost computed for each plan. On the other hand. For example. the highest performance and lowest cost).0 10. The Oracle Rule Based Optimization (RBO) method chooses its plans based on a set of fixed rules. For Oracle 9i. then one of the RBO‟s rules specifies that this query will always be executed using the index. you may refer to the Oracle Database Reference Manual to get more information.7. Preparing and Administrating the Siebel Database for CBO When using Oracle‟s Cost Based Optimization with the Siebel database.1. the cost-based optimization strategy generates multiple execution plans for a given query. the execution plan for the sample query remains the same regardless of whether the EMP table has 10 rows or 10 million rows. The details of these parameters are not within the scope of this document. RBO enumerates a deterministic. which evaluates all of the different access and join methods for the specific query and uses the most efficient one. it is crucial that the statistics the CBO uses are available and accurately maintained. and 8. 10. The behavior of the RBO is entirely fixed.x. The query optimizer chooses the plan with the most efficient cost (for example. OPTIMIZER_MODE should be set to CHOOSE unless you are performing an upgrade. and regardless of whether the “EMPNO > 50” predicate will return 2 rows or 2 million rows. While the Cost Based Optimization method leverages a costing model based on statistics.2.x (where x>=3). as specified below: Database Parameters For Oracle 10g. ordered (fixed rank) set of plans based on a pre-defined set of rules and always picks the first applicable plan in the order. Besides setting the OPTIMIZER_MODE to CHOOSE or ALL_ROWS. OPTIMIZER_MODE should be set to ALL_ROWS which is the default value. Scope and Application This document is informational and intended for any user.8. 7.1 document.0. columns and indexes. The CBO requires accurate statistics in order to deliver good query performance. if you have a query of the form: SELECT * from EMP where EMPNO > 50 and if there is an index on column EMPNO. 10.2 and above COST COST ALL_ROWS ALL_ROWS (*) except during the Upgrade process on 9i. The purpose of this document is to cover the main aspects of the Cost Based Optimizer mode and its relation with Siebel versions 7.0.2. there are some requirements that should be followed regarding the database parameters configuration and the Optimizer statistics generation on tables. about 60 other parameters affect the generation of the query plan (46 of them are hidden parameters).
OPTIMIZER_MAX_PERMUTATIONS This parameter restricts the number of permutations of the tables the optimizer will consider in queries with joins. for the Siebel application to work effectively and efficiently.ora File. Controls the access path selection to be more or less index friendly. the following parameters need to be set to the recommended values other than default values. A higher value result in higher parse time. Siebel Installation Guide for Microsoft Windows: Servers.0 0 CHOOSE False Enforced False 10g Default Value ** Obsolete 10.x. Siebel Installation Guide for UNIX Version 8. Enable or disable query rewriting globally for the database 200 OPTIMIZER_INDEX_COST_ADJ QUERY_REWRITE_ENABLED 100 Fals (**) Do not automatically alter the values of these parameters which have been deprecated to hidden parameters in 10g.The following visible parameters must be set to their default values where applicable: Oracle Parameter HASH_JOIN_ENABLED OPTIMIZER_FEATURES_ENABLE OPTIMIZER_INDEX_CACHING OPTIMIZER_MODE PARTITION_VIEW_ENABLED QUERY_REWRITE_INTEGRITY STAR_TRANSFORMATION_ENABLED 9i Default Value True 9. then you can set the OPTIMIZER_FEATURES_ENABLE=10. Refer to the Oracle documentation for further information. this parameter has been made obsolete. Mobile Web Clients.ora File.2. The parameters below should be set according to the information documented in the following Siebel Bookshelf references: Siebel Installation Guide for Microsoft Windows Version 8. Hence. NOTE: Starting with Oracle Database 10g.ora File. based on the recommendations for visible parameters in version 9i.0 > Configuring the RDBMS > Configuring an Oracle Database for Siebel Applications > Guidelines for Configuring Settings in the init.2.0 * 0 ALL_ROWS ** Obsolete Enforced False * It is always a good idea to set the OPTIMIZER_FEATURES_ENABLE = <Oracle DB patch version being used> to get full benefit of a series of optimizer feature supported by Oracle DB version. if your db version is already 10.2. In addition. a lower value carries the possibility of overlooking a good plan.0 > Configuring the RDBMS > Configuring an Oracle Database for Siebel Applications > Guidelines for Configuring Settings in the init. .8 > Configuring the RDBMS > Configuring Oracle for Siebel Applications > Guidelines for Configuring Settings in the init. Oracle Parameter Description 9i Def Valu 1 OPTIMIZER_DYNAMIC_SAMPLING This parameter controls the level of dynamic sampling performed by the optimizer.x.1. Tools Version 7.
As such. Tools Version 7. Mobile Web Clients. The following related parameters should be set by a trained DBA and according to the information in the applicable Oracle database documentation and requirements for your implementation. WORKAREA_SIZE_POLICY Specifies the policy for sizing work areas. It specifies the PGA_AGGREGATE_TARGET maximum amount of memory. Siebel Installation Guide for UNIX: Servers. the amount of RAM available. SORT_AREA_SIZE This value is specified in bytes. and may Set PGA_AGGREGATE_TARGET in be adjusted according to the number of PGA_AGGREGATE_TARGET . which Oracle uses to maintain a portion of the sort in memory. Dictionary Managed TEMP tablespac a multiple of the SORT_AREA_SIZE SORT_AREA_RETAINED_SIZE Specifies (in bytes) the maximum amount Set PGA_AGGREGATE_TARGET in of the user global area (UGA) memory PGA_AGGREGATE_TARGET . this value dictates the number of data blocks read in 32 blocks and adjusted as necessary a single Oracle I/O operation during a table value of 32. PGA_AGGREGATE_TARGET is Optimizer Statistics Optimizer statistics on tables. to be used for hash joins. this value should be set PGA target advisory views for ad TYPICAL in production and ALL . The retained size controls the size of the read buffer.7 > Guidelines for Configuring the RDBMS > Configuring Oracle for Siebel Applications. Tools Version 7. Siebel Installation Guide for UNIX: Servers.You users. Mobile Web Clients. Mobile Web Clients. and of 1.000 (1 MB). in bytes.Der retained after a sort run completes. Oracle Parameter Description Recomme Valu DB_FILE_MULTIBLOCK_READ_COUNT The database buffer cache parameter For most implementations. Optimal perform the size of sorted queries. Collecting Optimizer Statistics General G For most production implementa of users. General guidance on these related settings is provided below: Oracle Parameter Description PGA_AGGREGATE_TARGET Specifies the target aggregate PGA memory available to all server processes attached to the instance. HASH_AREA_SIZE Relevant to parallel execution operations and to the query Set PGA_AGGREGATE_TARGE portion of DML or DDL statements.7 > Guidelines for Configuring the RDBMS > Configuring Oracle for Siebel Applications.000. it is important to ensure that accurate optimizer statistics are collected and made available to the query optimizer. This parameter If PGA_AGGREGATE_TARGET controls the mode in which working areas are tuned. Siebel Installation Guide for Microsoft Windows: Servers.ora File. Tools Version 7. columns and indexes are the single most important factor that drives the generation of optimal query plans.8 > Configuring the RDBMS > Configuring Oracle for Siebel Applications > Guidelines for Configuring Settings in the init. scan. STATISTICS_LEVEL All the advisories in Oracle9i Release 2 including the Buffer Cache Advisor are controlled by a newly introduced parameter STATISTICS_LEVEL.
columns. In general it is slower to execute therefore it would not be suitable when the optimizer statistic collection window is short. indexes and histograms for columns where the data shape is skewed. Each one of them has advantages and disadvantages. indexes and histograms for all indexes columns: EXECUTE DBMS_STATS.Oracle provides two ways for collecting optimizer statistics: 1. method_opt => 'FOR ALL INDEXED COLUMNS'. Using a PL/SQL package DBMS_STATS Oracle Corporation highly recommends using the DBMS_STATS package for optimizer statistics maintenance.DEFAULT_DEGREE) Collects the optimizer statistics for the table. Useful when you add a new index.GATHER_TABLE_STATS( ownname => '<table owner>'. and Supplied PL/SQL Packages and Types Reference manuals.GATHER_TABLE_STATS( ownname => '<table owner>'. it should be mentioned that the more accurate optimizer statistics that are maintained will typically result in better execution plans. please refer to the Oracle Database Performance and Tuning Guide and Reference. Only collects histograms for skewed column. indexed columns. tabname => '<table name>'. degree => DBMS_STATS. granularity => 'ALL'.GATHER_INDEX_STATS( ownname => '<index owner>'. degree => DBMS_STATS. EXECUTE DBMS_STATS.DEFAULT_DEGREE) Collects the optimizer statistics for the table. This package has several options for collecting optimizer statistics. tabname => '<table name>'. granularity => 'ALL'. tabname => '<table name>'. cascade => TRUE. The examples below are only to illustrate some usages of DBMS_STATS to collect and delete statistics. method_opt => 'FOR ALL COLUMNS SIZE SKEWONLY'. cascade => TRUE. EXECUTE DBMS_STATS. Recommend this method when the initial optimizer statistics collection window is enough (depending on the table size it may take more time to complete) and space is not a constraint.GATHER_TABLE_STATS( ownname => '<table owner>'. columns. do not use it as a guideline. method_opt => 'FOR ALL COLUMNS SIZE AUTO'. indname => '<index name>') . For more details. cascade => TRUE. degree => DBMS_STATS. granularity => 'ALL'. indexes and histograms for all columns.DEFAULT_DEGREE) Collects only the optimizer statistics for the index. EXECUTE DBMS_STATS. Using the ANALYZE command 2. Collects the optimizer statistics for the table. However.
USER_TAB_COLUMNS. TABNAME LAST_ANALYZED NUM_ROWS BLOCKS AVG_ROW_LEN SAMPLE_SIZE -------------------. all columns. Deletes the optimizer statistics collected for the index: EXECUTE DBMS_STATS. ALL_TABLES. USER_INDEXES) o Number of leaf block o Distinct Key o Levels o Clustering factor To verify the optimizer statistics. ALL_TAB_COLUMNS.. USER_TABLES) o Number of row o Number of blocks o Average row length Column (DBA_TAB_COLUMNS.DELETE_TABLE_STATS( ownname => '<table owner>'.---------. Verifying Optimizer Statistics The followings Optimizer statistics are used by the Cost-based Optimizer in Oracle RDBMS 9i and 10g.----------. tabname => '<table name>').Deleting Optimizer Statistics Deletes the optimizer statistics collected for the tables.----------- . ALL_HISTOGRAMS.DELETE_INDEX_STATS( ownname => '<index owner>„.------------------. ALL_INDEXES.1:1 This script can be run from the Oracle SQL*Plus utility. Please refer to the Oracle Database Performance and Tuning Guide and Reference for more information.SQL script provided below: Attachment 478028.---------. The output lists the optimizer statistics and also let you know when it was last collected.. Example: SQL> @stat s_party Table . indname => „<index name>‟).. USER_HISTOGRAMS) o Number of distinct value o Number of NULL o Density o Data distribution (Histograms) Index (DBA_INDEXES. This helps you to understand the execution plan of a SQL statement and decide whether it is time to re-gather the statistics again. DBA_HISTOGRAMS. You need to provide the table name after the file. indexes associated with the table: EXECUTE DBMS_STATS. Table (DBA_TABLES. you may use the STAT.
--------------.00000111 75 PAR_PARTY_ID 01-23-2004 11:58:26 15906 5344562 .-------------31 3. INDNAME LAST_ANALYZED LFBLK DKEYS ALVLBLK AVGDBLK BLEVEL -----------------.. you may use the COLDIST.---------...------------------. The histograms partition the values of the columns into bands..3952E+35 73803 3.----------ROW_ID 01-23-2004 11:58:25 5360604 0 .00000019 1 PARTY_TYPE_CD 01-23-2004 11:58:25 9 0 . ENDPOINT_NUMBER ENDPOINT_VALUE --------------.---------S_PARTY_F1 01-23-2004 11:58:32 23 15906 1 1 1030 1 S_PARTY_M1 01-23-2004 11:58:38 4837 2 2418 18798 37597 S_PARTY_M2 01-23-2004 11:59:31 13232 4679585 1 1 5475889 S_PARTY_M3 01-23-2004 12:00:21 13716 4679801 1 1 5059433 S_PARTY_M4 01-23-2004 12:00:59 9387 4679568 1 1 5233052 S_PARTY_P1 01-23-2004 11:58:31 6570 5468509 1 1 254834 S_PARTY_U1 01-23-2004 12:01:04 11084 5460497 1 1 110498 To verify the histograms.---------. You need to provide the table name and column name to get the histograms.---------. It helps the optimizer to choose a better plan only when the data is highly skewed and the SQL statement uses a literal..00000019 75 CREATED CREATED_BY LAST_UPD LAST_UPD_BY MODIFICATION_NUM CONFLICT_ID 01-23-2004 11:58:25 67931 0 .---------.7611E+35 CF 2 2 2 2 2 .00007114 75 Index(s) .00000010 17 NAME 01-23-2004 11:58:26 4654599 138347 ..00000019 75 ROOT_PARTY_FLG 01-23-2004 11:58:26 2 0 . so that all column values in a band fall within the same range.00000009 1 GROUP_TYPE_CD 01-23-2004 11:58:26 18 145776 .------------------.---------.PARTY_TYPE_CD Histograms .00000009 8 PARTY_UID 01-23-2004 11:58:25 5360604 0 .-----------. 01-23-2004 11:58:25 5360604 32602 100 5360604 COLUMN_NAME LAST_ANALYZED NUM_DISTINCT NUM_NULLS DENSITY NUM_BUCKETS -----------------------------.. Example: SQL> @coldist S_PARTY.---------. It is similar to the column distributions on DB2/UDB database.SQL script provided below: Attachment 478028.1:2 This script can also be run from the SQL*Plus utility...S_PARTY Columns(s) .
x.2. 7.1251E+35 4.1843632 5309265 5360486 5360493 5360507 5360521 5360604 4. with optimizer mode set as CBO.1764E+35 4.8 and Siebel 8. These are done by issuing the following command: ALTER SESSION SET _OPTIMIZER_JOIN_SEL_SANITY_CHECK = TRUE Whenever the query fetches all rows. Typically the client queries fetch a screen full of rows.0 for Supporting CBO Some changes were made in the Siebel application to support Oracle CBO in Siebel 7. Siebel 7. when the SQL style is set to Oracle CBO: Sets the optimization mode to the first_rows_10: ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_10 Disables hash join: ALTER SESSION SET HASH_JOIN_ENABLED = FALSE. Siebel 7.1744E+35 4.4369E+35 Changes Made in Siebel 7. This makes it important to optimize the query plan for returning the first few rows quickly. ALTER SESSION SET _HASH_JOIN_ENABLED = FALSE. to change the optimization technique to all rows.3334E+35 4.8 and 8. The changes were mainly for the first rows optimization for the client queries.7.8 and Siebel 8.0. The behavior has been fixed in Siebel versions 8. which causes the following message to appear in the database alert log file: 08:59:06 2005 ALTER SESSION SET hash_join_enabled specifies an obsolete parameter Change Request 12-R5WXCB has been logged to address this product defect by changing the parameter HASH_JOIN_ENABLED to the hidden parameter _HASH_JOIN_ENABLED preventing the alert log error message. NOTE: Parameter HASH_JOIN_ENABLED has been deprecated to the hidden parameter _HASH_JOIN_ENABLED in Oracle 10g.7. it has been observed that SQL query performance is satisfactory with the following two parameter settings in the init. for Oracle 9i. .2 and 7. For better performance in Siebel versions 7.5.8. keep the cursor open and fetch more rows when the user presses next record set or next record on the last row.1.2. for Oracle 10g Disables sort-merge: ALTER SESSION SET _OPTIMIZER_SORTMERGE_JOIN_ENABLED = FALSE Enables sanity check for join using two columns.x or 10.7.0 connecting to Oracle 10.1770E+35 4.2. a hint /*+ all_row */ gets appended to the SQL statement after the SELECT clause. The alert log message regarding the deprecated parameter can be safely ignored in situations where it is generated.0.3334E+35 4.ora file: _b_tree_bitmap_plans = FALSE _no_or_expansion = FALSE The Siebel database connector makes the following session level changes.
Enterprise Edition > Siebel System Software . Document 477789. Document 478242. Oracle Database Performance and Tuning Guide and Reference. Oracle Database Reference.1 which documents that Siebel version 6. This document was previously published as Siebel Technical Note 582. you must use the rule based optimizer during the upgrade.zip (727 B) technote582-2_coldist.x applications only support Rule based optimizer on Oracle databases.x with Siebel eBusiness Application versions prior to Siebel version 7.1 which documents that when upgrading to Siebel version 7. Document 477690.1 which documents that sub-optimal execution plan can be generated by the Oracle Optimizer if the statistics are generated on empty tables.7 applications on Oracle 9i.7.1 which documents that you may encounter slow performance behaviors when using Oracle database version 9.zip (542 B) Related Products Siebel > Customer Relationship Management > CRM . Attachments technote582-1_stat.References Below are some additional references: Document 476301.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.