Schneider 10g Tuning Highlights
Schneider 10g Tuning Highlights
Presenter
JEREMY SCHNEIDER
Senior Consultant,
ITC Technology Services
OCP, RAC since 2002, Systems Admin
and Developer in previous lives
http://www.ardentperf.com
Fundamentals
Memory structures
Storage structures
RBO vs CBO
RBO vs CBO
1. Single Row by Rowid Only single column indexes are ever merged.
2. Single Row by Cluster Join If all columns in an index are specified in the WHERE
3. Single Row by Hash Cluster Key clause, that index will be used in preference to other
with Unique or Primary Key indexes for which some columns are referenced.
4. Single Row by Unique or Primary
If multiple indexes can be applied to a WHERE clause,
Key and they all have an equal number of columns specified,
only the index created last will be used.
5. Clustered Join If multiple columns of an index are being accessed with
6. Hash Cluster Key an = operator, that will override other operators such as
7. Indexed Cluster Key LIKE or BETWEEN. Two ='s will override two ='s and a
8. Composite Index LIKE.
9. Single-Column Indexes A higher percentage of columns accessed will override a
lower percentage of columns accessed. So generally,
10. Bounded Range Search on the optimizer will choose to use the index from which
Indexed Columns you specify the highest percentage of columns.
11. Unbounded Range Search on However, as stated previously, all columns specified in a
Indexed Columns unique or primary key index will override the use of all
12. Sort Merge Join other indexes.
13. MAX or MIN of Indexed Column The RBO uses rules to select the driving table.
14. ORDER BY on Indexed Column If a WHERE clause has a column that is the leading
15. Full Table Scan column on any index, the rule-based optimizer will use
that index. The exception is if a function is placed on the
leading index column in the WHERE clause.
Bitmaps
Linked Lists
Hash Maps
Caching
Sorting (opt,single,multi)
System Health
Statspack Reports or AWR Reports (10g)
DBControl
SQL Statement Tuning Methodology
Don’t guess! Set goals and have a plan.
Evaluate
Implement Recommendations
ADDM Invoke
Advisor SQL Tuning
AWR SQL Tuning Advisor
Candidates
SQL Tuning Advisor
1. Create Index
2. Rewrite SQL (UNION ALL, NOT EXISTS, etc)
3. Gather Stats (stale or missing)
4. Create SQL Profile (correct cardinality or selectivity estimates,
optimizer mode – only in comprehensive mode, not in limited mode)
Where to Learn More
Documentation – tahiti.oracle.com
Metalink and OTN
Local User Group
Online Community – Oracle Forums, oracle-l, c.d.o.s (usenet)
Websites – asktom, oracle-base, orafaq, dizwell, jlcomp
Blogs – Kyte, Lewis, Closson, Rittman
Try things out on your own!
Q&A
Questions, comments, suggestions?