About The Oracle Query Optimizer Component Query Optimization Process
4.2.5.1 About The Oracle Query Optimizer Component
Oracle database does not automatically select the best execution plan for certain types of user queries. To counter this, the Oracle Query Optimizer adds hints to queries that force Oracle database to perform searches more efficiently. The hints are based on an intrinsic knowledge of Oracle Content Servers table data distribution and its index selectivity. To take advantage of this knowledge, Oracle Query Optimizer uses a pre-defined Hint Rules Table to analyze the database query and then add appropriate hints to the query. In turn, the added hints improve Oracles search performance. Oracle Query Optimizer takes advantage of Content Servers data distribution in database tables and its index selection preferences. Based on these characteristics, the Hint Rules Table included with Oracle Query Optimizer contains pre-defined rules. The feature uses these rules to analyze a database query and to add one or more appropriate hints to the query to optimize the search performance. In very large collections containing millions of content items, the Oracle Content Server software generally has a difficult time selecting an appropriate optimization strategy to resolve even simple queries. To counteract this problem, Oracle Query Optimizer examines the submitted query and, based on its analysis, reformats the query by adding appropriate hints to optimize the search process. To add hints, the feature uses Oracle Content Server hints, The Hint Rules Table , and The Hint Cache .4.2.5.2 Query Optimization Process
The stages of the optimization process are completed in the following sequence: 1. The submitted query is analyzed to verify if it contains one or more hints and, if so, determine the type of hint; see Stage 1: Query Analysis on page 4-17. 2. If the querys WHERE clause does not contain a hint, the optimization feature must parse out the WHERE clause; see Stage 2: Parsing on page 4-17. 3. After parsing, each condition in the querys WHERE clause is evaluated against the Hint Rules Table in an attempt to qualify the condition and normalize the query; see Stage 3: Normalization on page 4-17. 4. After the WHERE clause conditions are qualified and the query is normalized, a hint is selected or retrieved from the hint cache; see Stage 4: Select Hint on page 4-18. 5. The query is reformatted using the selected hint; see Stage 5: Reformat Query on page 4-18. Managing System Settings 4-17 Figure 4–2 Optimization Process Sequence4.2.5.2.1 Stage 1: Query Analysis In this stage, a query is checked for both Oracle
native and Content Server hints. This is determined based on the hint syntax: Query Hints Syntax . A query that contains Oracle hints is passed through. A query that contains Content Server hints bypasses Stage 2: Parsing and Stage 3: Normalization . If a query contains multiple Content Server hints, the best hint is chosen. Queries that do not contain any hints must be parsed and normalized.4.2.5.2.2 Stage 2: Parsing In this stage, a query that does not contain any hints is sent
through the query parser and the WHERE clause is parsed out. A WHERE clause consists of one or more conditions joined with either AND or OR conjunctions. For each condition, the field name, operator, and field value are extracted. The ANDOR conjunctions of the clause are preserved; the parentheses are dropped. Conditions must use the following format: fieldname operator value For example, a properly formatted condition would be dID = 3. An incorrect condition would be 3 = dID.4.2.5.2.3 Stage 3: Normalization In this stage, normalization simplifies conditions,
finalizes query operators, and provides a stable view of the WHERE clause for additional steps. The result of the normalization process produces a base for generating the cache key and the list of fields to use to search for hints. ■ Qualifying WHERE Clause Conditions: Note: To establish which database tables and columns have indexes, the Hint Rules Table is defined on Content Server resources and on the running system. 4-18 Oracle Fusion Middleware System Administrators Guide for Oracle Content Server Each condition in the WHERE clause is checked against The Hint Rules Table . If a conditions field name is included in the Hint Rules Table, then it is qualified and the condition is considered to be normalized. The condition contains its table name and alias. Then the normalized conditions are sorted to ensure that the same set of conditions is always listed consistently. ■ Discarding WHERE Clause Conditions During Normalization: During normalization, the following conditions are not considered relevant and are eliminated from further processing: – Join conditions. – Conditions that contain subqueries. – Conditions whose field names do not have entries in the Hint Rules Table and cannot be qualified. – OR conditions that contain more than one field. For example: dSecurityGroup = Secure or dDocAccount LIKE prj – Conditions that contain the LIKE operator whose value begins with a wildcard. ■ Reformatting WHERE Clause Conditions: In the normalization step, the query conditions are rewritten to consolidate complex query conditions. OR conditions are reevaluated as follows: – If all the fields are the same and all the operators are equal or all the operators are LIKE and no values begin with a wildcard, the conditions are combined and changed to an IN query. – If the fields are the same but have different operators, the conditions are combined and the generic operator is assigned. – If the fields are different, the conditions are dropped. For example, during normalization, the following condition is reformatted: dReleaseState = Y OR dReleaseState = O It is reformatted as follows: dReleaseState IN Y, O ■ Finding Potential Range Queries: The parsed query is analyzed to find potential range queries that are then consolidated during the normalization process. For example, the conditions dIndate date1 and dInDate date2 are changed to one condition with the operator range.4.2.5.2.4 Stage 4: Select Hint In this stage, the normalized conditions are checked
against the hint cache. If one or more conditions have applicable hints in the cache, they are included. If applicable hints are not found in the cache, the conditions are analyzed and the preference orders are compared to determine the best possible hint.4.2.5.2.5 Stage 5: Reformat Query In this stage, the query is reformatted by adding in the
selected hint. For more information about how reformatting queries with hints helps to optimize searches and some examples of reformatted queries, see Section 4.2.5.3, How Reformatted Queries Optimize Searches. Managing System Settings 4-194.2.5.3 How Reformatted Queries Optimize Searches
Parts
» Oracle Fusion Middleware Online Documentation Library
» Understanding Oracle Universal Content Management and Oracle Content Server
» Utilities Management Pages Applications Command Line
» Administration Tray Admin Applets Page
» Modifying Server Configuration Parameters for Oracle Content Server
» Viewing Log Information for Oracle Content Server
» Starting Oracle Content Server with Scripts
» Restarting Oracle Content Server with Scripts
» Viewing MBean Information for Oracle Content Server Accessing Oracle Content Server With a Browser
» Click OK. Running a Standalone Application on a Windows System
» Delete Update About Batch Loading
» Optional Parameters About Batch Loading
» About Preparing a Batch Load File
» About Running the Batch Loader Batch Loading from the Command Line
» Using the IdcCommand Utility and Remote Access
» Example: Best Practice Case Study
» Log File Characteristics Accessing the Log Files
» Accessing the Content Server Analyzer Viewing the Analysis Progress and Results
» Configuration Information Environment Packager Configuration Debug Entry
» About System Properties Configuring System Properties
» Configuring Content Security Configuring Internet Information Configuring the Database
» About The Oracle Query Optimizer Component Query Optimization Process
» How Reformatted Queries Optimize Searches
» Types of Recognized Hints Query Hints Syntax
» Additional Supported Sort Constructs The Hint Rules Table Edit Hint Rules Form
» The Hint Cache Searching Content Using the Oracle Query Optimizer Component
» Enter the applicable information for the query and hints. Click Remove.
» Data Management Introduction to the File Store System
» DefaultFileStore Settings Empty Storage Rule
» Using Standard Oracle Content Server Variables
» Understanding FileStoreProvider Storage Principles
» PartitionList Table StorageRules Table
» PathMetaData Table PathConstruction Table
» FileSystemFileStoreAlgorithmFilters Table FileStoreProvider Resource Tables
» Example PathMetaData Table Options Configuration for Standard File Paths
» Configuration for a Webless or Optional Web Store
» Configuration for Database Storage Altered Path Construction and Algorithms
» Script Construction Mapping URLs with WebUrlMapPlugin
» Supported Variables for Referencing AddEdit URL Mapping Entries
» Info Update Form Dynamic Conversion CGI parameters
» Oracle Content Server Providers
» Choosing an Appropriate Provider
» Security Providers About Providers
» Changes in Security Compared to Oracle Content Server 10g
» Security within Oracle Content Server
» Additional Security Options Introduction to Oracle UCM and Oracle Content Server Security
» Configuring Oracle UCM for Two-Way SSL Communication
» Configuring Oracle Access Manager 11g with Oracle UCM
» Configuring Oracle Access Manager 10g with Oracle UCM
» Configuring Oracle Single Sign-On for Oracle UCM
» Configuring Oracle WebLogic Server Web Services
» External Users Introduction to User Login Types
» Local Users Introduction to User Login Types
» Introduction to User Logins and Aliases
» Highlight the alias to be deleted and click Delete.
» Best Practices for Working with Security Groups Performance Considerations
» Predefined Roles About Permissions
» Accounts and Security Groups Hierarchical Accounts
» Assigning Accounts to a User with Oracle WebLogic Server
» Xalco Security Xalco Accounts
» Xalco Roles Roles and Permissions Table Roles and Users Table Accounts and Users Table
» Empty Access Control List Fields
» About Proxy Connections Additional Oracle Content Server Security Connections
» About Credential Mapping Credential Values
» About Named Password Connections Guidelines for Proxy Connections Data
» About Using HTTP Protocol for Content Server Connection Configuring the HTTP Provider
» About BrowserUrlPath Customization Browser URL Customization
» Affected Idoc Script Variables and Functions
» Changing Absolute Full Path Computation Changing Administration Path Computation
» ExtUserAttribInfo ResultSet Extended User Attributes
» encodeHtml Function Filter Data Input
» HtmlDataInputFilterLevel Configuration Variable Filter Data Input
» Viewing Information about a Component
» Enabling and Disabling a Component Uploading a Component
» Select the Template option. The Click Next. Click Next.
» Click Select. To show the entire list of predefined templates, select Show All. Click OK.
» Click Select. Select a query from the list. Click OK.
» Click Select. To show the entire list of predefined services, select Show All. Click OK.
» Click Select. To show the entire list of predefined includes, select Show All. Click OK.
» Click Insert. Repeat these steps until all of the table columns have been Click OK.
» Considerations for Using OracleTextSearch Configuring OracleTextSearch for Oracle Content Server
» Indexing and Query Speeds and Techniques
» Fast Rebuild Query Syntax OracleTextSearch Operators
» Case Sensitivity and Stemming Rules Search Results Data Clustering
» Snippets Additional Changes Oracle Text 11g Features and Benefits
» Determining Fields to Optimize Modifying the Fields Displayed on Search Results
» Searching with OracleTextSearch Metadata Wildcards
» Search Results with OracleTextSearch
» Configuring an Oracle Content Server Source with Other Single Sign-On Solutions
» Configuration Migration Introduction to Migration Tools and Components
» Archiver Introduction to Migration Tools and Components
» Folder Archiving FolderStructureArchive Component
» Migration Structure About Migration Templates and Bundles
» Limitations Migration Logs Migration Tips
» Using a web browser, select Config Migration Admin from the Oracle Content
» Archive Structure Collections Archive Details
» If required, enter the administrator login name and password, then click OK. Enter .archive
» Click Update. Click Delete. Select Custom Query Expression.
» Update Import Rule Insert Revision Import Rule Insert Create Import Rule
» Transfer Uses Transfer Methods Transfer Terms
» Local Transfer Pull Transfer Push Transfer
» Transferring Batch Files Transferring Files
» Single Revision Replications Replication Uses
» Click Edit. Select Is Transfer Automated. Click OK.
» Export Import Self ExportImport
» One-to-One Archiving One-to-Many Archiving
» Adding Content ID Prefixes Changing Release Dates
» Many-to-One Archiving Configuration Migration Tips
» Overview of FolderStructureArchive Component Differences With Built-in Folders Archiving Features
» Using a Folder Structure Archive Configuration Variables
» Important Implementation Considerations Folder Structure Archiving
» How ArchiverReplicationExceptions Works Scenario 1 Scenario 2
» Administering and Using ArchiverReplicationExceptions
» Total Export Possible with Blank Export Query New Check-Ins and Batch File Transfers
» Folder Archive Export Doesnt Work If Collections Table Has Many Records
» Select an archive. Click the Click Edit in the Export Query section.
» Click the Select an archive from the Current Archives list Click the
» Click the Table list Edit button.
Show more