How Reformatted Queries Optimize Searches
4.2.5.3 How Reformatted Queries Optimize Searches
The majority of queries in an Oracle Content Server instance involve a small, targeted set of content items or return a hundred rows, at most. Oracle Content Server software can easily scale to millions of content items. However, testing on an Oracle database with a collection containing 10 million content items indicates that the execution plan that Oracle selects is not the most efficient. Oracle generally does not choose the best optimization strategies to resolve many queries, even some that are trivial. The following examples explain this issue: ■ Example 1: Reformatting a Query by Adding a Single Hint on page 4-19 ■ Example 2: Reformatting a Query by Adding Multiple Hints on page 4-194.2.5.3.1 Example 1: Reformatting a Query by Adding a Single Hint In the environment
described above, Oracle does not resolve the following query as efficiently as possible: SELECT FROM Revisions, Documents, DocMeta WHERE Revisions.dID = Documents.dID AND Revisions.dID = DocMeta.dID AND Revisions.dRevClassID = 333 Order By Revisions.dID Because a fairly selective index is available dRevClassID_2 for Revisions.dRevClassID, this query should access dRevClassID_2 and perform a sort on the rows that match the dRevClassID. However, in this query example, Oracle chooses to use the Revisions.dID index. This choice is actually worse than performing a full table scan on the Revisions table because it does a full index scan and accesses the table to obtain the dRevClassID for each row. Obviously, resolving the query using this execution plan does not work well when the Oracle Content Server repository has over 10 million content items. In this case, it requires approximately 500 seconds to return the results. However, the performance improves dramatically when the query is modified by adding a hint as follows: SELECT + INDEXRevisions dRevClassID_2 FROM Revisions, Documents, DocMeta WHERE Revisions.dID = Documents.dID AND Revisions.dID = DocMeta.dID AND Revisions.dRevClassID = 333 Order By Revisions.dID The query is modified by adding the following hint to the SELECT clause: + INDEXRevisions dRevClassID_2 This forces Oracle database to choose the dRevClassID_2 index instead of the index for Revisions.dID. Because no more than a few content items share dRevClassID in this example, the modified query returns the results instantly.4.2.5.3.2 Example 2: Reformatting a Query by Adding Multiple Hints In a typical Oracle
Content Server instance, most documents have a Y released status for the dReleaseState with a dInDate earlier than the current date. However, only a few documents have an N new, not yet indexed status for the dReleaseState. The following query is searching for content items that have not yet been released: SELECT dID FROM Revisions 4-20 Oracle Fusion Middleware System Administrators Guide for Oracle Content Server WHERE Revisions.dReleaseState = NN AND Revisions.dStatus in NDONE, NRELEASED, NDELETED AND Revisions.dInDate={ts 2005-02-23 17:46:38.321} The optimized result for the query uses the index for dReleaseState: SELECT+ LEADINGRevisions INDEX Revisions dReleaseState dID FROM Revisions WHERE Revisions.dReleaseState = NN AND Revisions.dStatus in NDONE, NRELEASED, NDELETED AND Revisions.dInDate={ts 2005-02-23 17:46:38.321}4.2.5.4 Types of Recognized Hints
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