ÈçºÎ¿´¶®ORACLEÖ´Ðмƻ®
ÈçºÎ¿´¶®ORACLEÖ´Ðмƻ®
Ò»¡¢Ê²Ã´ÊÇÖ´Ðмƻ®
An explain plan is a representation of the access path that is taken when a query is executed within Oracle.
¶þ¡¢ÈçºÎ·ÃÎÊÊý¾Ý
At the physical level Oracle reads blocks of data. The smallest amount of data read is a single Oracle block, the largest is constrained by operating system limits (and multiblock i/o). Logically Oracle finds the data to read by using the following methods:
Full Table Scan (FTS) --È«±íɨÃè
Index Lookup (unique & non-unique) --Ë÷ÒýɨÃ裨ΨһºÍ·ÇΨһ£©
Rowid --ÎïÀíÐÐid
Èý¡¢Ö´Ðмƻ®²ã´Î¹Øϵ
When looking at a plan, the rightmost (ie most inndented) uppermost operation is the first thing that is executed. --²ÉÓÃ×îÓÒ×îÉÏ×îÏÈÖ´ÐеÄÔÔò¿´²ã´Î¹Øϵ£¬ÔÚͬһ¼¶Èç¹ûij¸ö¶¯×÷ûÓÐ×ÓID¾Í×îÏÈÖ´ÐÐ
1.Ò»¸ö¼òµ¥µÄÀý×Ó£º
SQL> select /*+parallel (e 4)*/ * from emp e;
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=82 Bytes=7134)
1 0 TABLE ACCESS* (FULL) OF 'EMP' (Cost=1 Card=82 Bytes=7134):Q5000
--[:Q5000]±íʾÊDz¢Ðз½Ê½
1 PARALLEL_TO_SERIAL SELECT /*+ NO_EXPAND ROWID(A1) */ A1."EMPNO"
,A1."ENAME",A1."JOB",A1."MGR",A1."HI
ÓÅ»¯Ä£Ê½ÊÇCHOOSEµÄÇé¿öÏ£¬¿´Cost²ÎÊýÊÇ·ñÓÐÖµÀ´¾ö¶¨²ÉÓÃCBO»¹ÊÇRBO£º
SELECT STATEMENT [CHOOSE] Cost=1234 --CostÓÐÖµ£¬²ÉÓÃCBO
SELECT STATEMENT [CHOOSE] --CostΪ¿Õ£¬²ÉÓÃRBO(9IÊÇÈç´ËÏÔʾµÄ)
2.²ã´ÎµÄ¸¸×Ó¹ØϵµÄÀý×Ó£º
PARENT1
**FIRST CHILD
****FIRST GRANDCHILD
**SECOND CHILD
Here the same principles apply
Ïà¹ØÎĵµ£º
OracleÖÐÁÙʱ±í²úÉú¹ýÁ¿RedoµÄ˵Ã÷
×î½ü,ÔÚOracle9iÖÐÄãÓùýÁÙʱ±íÂð?
ËüÊÇ·ñ¸øÄã´øÀ´ÁËÐÔÄÜÌá¸ß?Äã×¢Òâ¹ýô?
--------------------------------------------------------------------------------
ºÃÁËÑÔ¹éÕý´«.
ÎÒÃÇÖªµÀÁÙʱ±íÔÚDML²Ù×÷ÖпÉÒÔ¼õÉÙredoµÄÉú³É,´Ó¶øÔÚ±£´æÖмä½á¹û¼¯Ê±¿ÉÒÔ´øÀ´½Ï´óµÄÐÔÄÜÌá¸ß.
¿ÉÊÇ,È ......
1¡¢²é¿´ORACLE×î´óÓαêÊý
C:\Documents and Settings\Administrator>sqlplus "sys/admin@test151 as sysdba" £¨sysÒÔdbaµÇ¼test151·þÎñ£©
SQL*Plus: Release 9.2.0.1.0 - Production on ÐÇÆÚËÄ 11ÔÂ 5 09:08:04 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights ......
ʵÏÖ·½·¨£º
1¡¢¿ªÊ¼->ÉèÖÃ->¿ØÖÆÃæ°å->¹ÜÀí¹¤¾ß->·þÎñ
Í£Ö¹ËùÓÐOracle·þÎñ¡£
2¡¢¿ªÊ¼->³ÌÐò->Oracle - OraHome81->Oracle Installation Products->
Universal Installer
жװËùÓÐOracle²úÆ·£¬µ«Universal Installer±¾Éí²»Äܱ»É¾³ý
5¡¢ÔËÐÐregedit£¬Ñ¡ÔñHKEY_LOCAL_MACHINESOFTWAREORACLE£¬°´ ......
ÔÚÖ´ÐÐÆô¶¯¹Ø±ÕÃüÁî֮ǰÐèÒªÕýÈ·ÉèÖÃÏÂÁл·¾³±äÁ¿£º
ORACLE_BASE
ORACLE_HOME °²×°¹ý³ÌÖÐÏÔʾµÄoracle home Ŀ¼
ORACLE_SID
PATH=$PAHT£º$ORACLE_HOME/bin
ÒÔ oracle Õ˺ŵǽ Linux£¬»òÕß´Ó root ÏÂÊäÈë su - or ......