Listen Software's How To: SQL Tuning--Optimizer Hints | Database Journal

Listen Software’s How To: SQL Tuning–Optimizer Hints

Jul 8, 2002
1 minute read

Optimizer Steps: Each step of the execution plan returns a set of rows that are used either by the next step or in the last step.

The optimizer calculates the cost based on the estimated computer resources, including but not limited to I/O, CPU time, and memory.

The goal of the cost-based approach is the best throughput, or minimal resource
usage necessary to process all rows accessed by the statement.

alter system set TIMED_STATISTICS=TRUE; 
execute sys.dbms_utility.analyze_schema
('APPLICATION_USER','COMPUTE');

Cost-Based Approach

The optimizer generates a set of execution plans based on the possible join orders,
join operations, and available access paths. The optimizer estimates the costs of each plan and chooses the one with the lowest cost.

A smaller sort area size is likely to increase the cost for sort-merge join. Increase the SORT_AREA_SIZE variable in the initialization file.

Indexes

Indexes improve the performance of queries that select a small percentage of rows from the table (2 to 4 percent).

Only index columns with good selectivity. An index’s selectivity is good if few rows have the same value.

Selectivity = number of row / number of distinct rows

Back to the LSS “How To” Series Main Page

Database Journal Logo

DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases--foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.