mark 

写给自己的

最近,外派一家大型保险公司做bi期间用到的数据库是oracle,正好趁此机会提升下自己的oracle水平。

1、执行计划。set autotrace {off | on | traceonly},输入sql语句,显示数据库的执行计划。

2、sql expert是一款sql语句性能优化工具。SQL优化工具Lecco SQL Expert For Oracle

3、什么是Oracle hint?

附网络上的:How to Study Oracle?

[Assuming you want to study oracle database, specifically to prepare yourself 
as a DBA, not other products such as Apps or Developer Suite...] 

1.0 Download from otn.oracle.com, or borrow CDs for, oracle server software 
enterprise edition. Make sure it's not any other lesser edition. Choose the OS 
you're most comfortable with. Select the version that is either (a) the latest, 
or (b) the one your company is using, or (c) the most popular. Install it and 
create a database. 

1.1 Download full documentation from docs.oracle.com for your version. If 
you're short of space, choose to install only HTML pages by deleting all .pdf 
files after installation, i.e. file copying. (If you like PDF better than HTML, 
then delete HTML files leaving PDFs). 

2.0 If you have little experience with oracle, find a practical book such as 
some OCP (Oracle Certified Professional) guide or oracle 101 and quickly go 
through it. Combine this study with reading Admin guide. 

2.1 If you have some experience, read the Concepts manual now. It's a tedious, 
seemingly thankless process. But months of reading it, with frequent hands-on 
work and experiment on your database, is the fastest way to learn oracle. 

2.11 After a week of reading Concepts manual, you can start to read on public 
forums such as comp.databases.oracle.server 
(http://groups.google.com/group/comp.databases.oracle.serve), 
http://forums.oracle.com, oracle-L 
(http://www.freelists.org/archives/oracle-l/). This is because it's simply not 
possible you'll encounter a large variety of problems in your own study. By 
reading messages posted by others, you indirectly learn from their real-life 
experience. Ignore the messages that are too difficult or non-technical, and 
research those you just learned. 

2.12 Constantly check the Reference manual and Admin guide while reading 
Concepts because memorizing hundreds of initialization parameters, DBA_ and V$ 
views can't be achieved in a few weeks. 

3.0 After the drudge of sequential read of the Concepts and scattered read of 
Reference and hands-on work with Admin guide, you can read in either sequential 
or scattered manner: 

Performance tuning manual, Administration manual, "Effective oracle by Design" 
(by Tom Kyte) and as great reference due to lack of updated versions, "Expert 
One On One" (by Tom Kyte)

4.0 You need to constantly search on the following three web sites when you 
have problems. 

4.1 Google Usenet/Newsgroup archive 
(http://groups.google.com/advanced_group_search). You can put in group name, 
most likely comp.databases.oracle.server, occasionally 
comp.databases.oracle.misc or comp.databases.oracle.tools. 

4.2 Google Advanced Search (http://www.google.com/advanced_search). After this 
search, you may or may not search the same thing on other web sites such as 
Altavista, which was used by us before Google came to life. But occasionally 
alltheweb.com can find something Google hasn't indexed yet. 

4.3.0 oracle Metalink if your company purchased oracle support. This is the 
only search site that is oracle-aware. By that I mean it knows "ORA-01000" is 
the same as "ORA-1000" so you don't have to search twice as on any generic 
search site. It knows "user$" is not the same as "user" as all other search 
engines would assume. In addition, if you need to search for an oracle bug 
report or patch, this is the only place. 

4.3.1 oracle Metalink Advanced search. Bookmark the no-frame page URL
http://metalink.oracle.com/metalink/plsql/kno_main.newAdvancedQuery
If you search for a keyword or a string that is too obscure, do remember to 
check the Bug Database as well as Archived Articles checkboxs so you get more 
hits. 

[continued in oracleStudy2.txt, a note of oracle research in general] 

Yong Huang 2004,2005