|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这能找出所有错误的99.99%。它不能找出的是仅仅涉及数据文件的损坏(这很不常见)。如果你想要检查一张表,你通常应该没有选项地运行myisamchk或用-s或--silent选项的任何一个。实行
我们在实践事情中常常要看某个sql语句的实行企图,比方:
在sqlplus利用命令SETAUTOTRACEON后,实行企图显现以下:
SELECTSTATEMENTOptimizer=ALL_ROWS(Cost=985Card=1Bytes=26)
Statistics
----------------------------------------------------------
35recursivecalls
0dbblockgets
1052consistentgets
7168physicalreads
0redosize
395bytessentviaSQL*Nettoclient
512bytesreceivedviaSQL*Netfromclient
2SQL*Netroundtripsto/fromclient
0sorts(memory)
0sorts(disk)
1rowsprocessed
个中recursivecalls,dbblockgets,consistentgets的详细寄义是甚么?
详细注释以下:
·RecursiveCalls.Numberofrecursivecallsgeneratedatboththeuserandsystemlevel.
OracleDatabasemaintainstablesusedforinternalprocessing.Whenitneedstochangethesetables,OracleDatabasegeneratesaninternalSQLstatement,whichinturngeneratesarecursivecall.
Inshort,recursivecallsarebasicallySQLperformedonbehalfofyourSQL.So,ifyouhadtoparsethequery,forexample,youmighthavehadtorunsomeotherqueriestogetdatadictionaryinformation.Thesewouldberecursivecalls.Spacemanagement,securitychecks,callingPL/SQLfromSQL—allincurrecursiveSQLcalls.
·DBBlockGets.NumberoftimesaCURRENTblockwasrequested.
Currentmodeblocksareretrievedastheyexistrightnow,notinaconsistentreadfashion.
Normally,blocksretrievedforaqueryareretrievedastheyexistedwhenthequerybegan.Currentmodeblocksareretrievedastheyexistrightnow,notfromapreviouspointintime.
DuringaSELECT,youmightseecurrentmoderetrievalsduetoreadingthedatadictionarytofindtheextentinformationforatabletodoafullscan(becauseyouneedthe"rightnow"information,nottheconsistentread).Duringamodification,youwillaccesstheblocksincurrentmodeinordertowritetothem.
(DBBlockGets:哀求的数据块在buffer能满意的个数)
·ConsistentGets.Numberoftimesaconsistentreadwasrequestedforablock.
Thisishowmanyblocksyouprocessedin"consistentread"mode.Thiswillincludecountsofblocksreadfromtherollbacksegmentinordertorollbackablock.
ThisisthemodeyoureadblocksinwithaSELECT,forexample.
Also,whenyoudoasearchedUPDATE/DELETE,youreadtheblocksinconsistentreadmodeandthengettheblockincurrentmodetoactuallydothemodification.
(ConsistentGets:数据哀求总数在回滚段Buffer中)
·PhysicalReads.Totalnumberofdatablocksreadfromdisk.Thisnumberequalsthevalueof"physicalreadsdirect"plusallreadsintobuffercache.(PhysicalReads:实例启动后,从磁盘读到BufferCache数据块数目)
·Sorts(disk).Numberofsortoperationsthatrequiredatleastonediskwrite.SortsthatrequireI/Otodiskarequiteresourceintensive.TryincreasingthesizeoftheinitializationparameterSORT_AREA_SIZE.
刚安装好的MySql包含一个含空密码的root帐户和一个匿名帐户,这是很大的安全隐患,对于一些重要的应用我们应将安全性尽可能提高,在这里应把匿名帐户删除、root帐户设置密码 |
|