Tải bản đầy đủ (.pdf) (1,022 trang)

Sams oracle perfomance tuning and optimization apr 1996 ISBN 067230886x

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.61 MB, 1,022 trang )

OraclePerformanceTuningandOptimizationbyEdwardWhalen
Sams,MacmillanComputerPublishing
ISBN:067230886xPubDate:04/01/96

TableofContents


AppendixD
Glossary
Ihavealwaysthoughtthataglossaryandanindexgreatlyenhancethevalueofa
book.Ihavemadeitaprioritytohaveacompleteandaccurateglossaryand
index.Enjoy.
ad-hoc.
FromtheLatinthisis.Thistermisusedtodescribeanimpromptuor
spontaneousaction.Mostcommonlyusedintermsofanad-hocqueryto
meananimpromptu,simplequery.
aggregatefunctions.
Functionsthatoperateonthecollectionofvaluesinacertaincolumn.
TheseoperationsincludesuchthingsasSUM,COUNT,AVG,MAX,andsoon.
AsynchronousI/O(AIO).
AsynchronousI/OallowsaprocesstosubmitanI/Oandnothavetowait
fortheresponse.Later,whentheI/Oiscompleted,aninterruptoccursor
theprocesscanchecktoseewhethertheI/Ohascompleted.Byusing
AsynchronousI/Os,theDBWRcanmanagemultiplewritesatoncesothat
itisnotstarvedwaitingforI/Ostocomplete.
bandwidth.
Atermoftenassociatedwithnetworksorcomputerbusses.Thebandwidth
isthethroughputcapacity.Thebandwidthofthebusisthemaximumrateat
whichdatacanbetransferredacrossthebus.
batchprocessingsystem.
Usedtoperformlargebackgroundjobs,usuallywithinacertainspecified


timewindow.
BLOB(BinaryLargeData).
AlargeamountofbinarydatastoredwithinanOracledatabase.BLOBdata
canconsistofaudio,video,images,documents,andsoon;itisusually
storedasLONGdata.
block.
ThesmallestunitofstorageinanOracledatabase.Thedatabaseblock
containsheaderinformationconcerningtheblockitselfaswellasthedata.
buffer.
Anamountofmemoryusedtostoredata.Abufferstoresdatathatisabout
tobeusedorthathasjustbeenused.Inmanycases,buffersarein-memory


copiesofdatathatisalsoondisk.Bufferscanbeusedtoholdcopiesofdata
forquickreadaccess,theycanbemodifiedandwrittentodisk,ortheycan
becreatedinmemoryastemporarystorage.
InOracle,thedatabasebuffersoftheSGAstorethemostrecentlyused
blocksofdatabasedata.Thesetofdatabaseblockbuffersisknownasthe
databasebuffercache.Thebuffersusedtotemporarilystoreredoentries
untiltheycanbewrittentodiskareknownastheredologbuffers.
Acleanbufferisabufferthathasnotbeenmodified.Becausethisbuffer
hasnotbeenchanged,itisnotnecessaryfortheDBWRtowritethisbuffer
todisk.Adirtybufferisabufferthathasbeenmodified.Itisthejobofthe
DBWRtoeventuallywritealldirtyblockbuffersouttodisk.
cache.
Astorageareausedtoprovidefastaccesstodata.Inhardwareterms,the
cacheisasmall(relativetomainRAM)amountofmemorythatismuch
fasterthanmainmemory.Thismemoryisusedtoreducethetimeittakesto
reloadfrequentlyuseddataorinstructionsintotheCPU.CPUchips
themselvescontainsmallamountsofmemorybuiltinasacache.

InOracle,theblockbuffersandsharedpoolareconsideredcachesbecause
theyareusedtostoredataandinstructionsforquickaccess.Cachingisvery
effectiveinreducingthetimeittakestoretrievefrequentlyuseddata.
Cachingusuallyworksusingaleastrecentlyusedalgorithm.Datathathas
notbeenusedforawhileiseventuallyreleasedfromthecachetomake
roomfornewdata.Ifdataisrequestedandisinthecache(aphenomenon
calledacachehit),thedataisretrievedfromthecache,avoidinghavingto
retrieveitfrommemoryordisk.Oncethedatahasbeenaccessedagain,itis
markedasrecentlyusedandputonthetopofthecachelist.
Cartesianproducts.
Theresultofajoinwithnojoincondition.Eachrowinatableismatched
witheveryrowofanothertable.
checksum.
Anumbercalculatedfromthecontentsofastorageunitsuchasafileor
datablock.Usingamathematicalformula,thechecksumnumberis
generatedfromdata.Becauseitishighlyunlikelythatdatacorruptioncan
occurinsuchawaythatthechecksumwouldremainthesame,checksums
areusedtoverifydataintegrity.BeginningwithOracleversion7.2,
checksumscanbeenabledonbothdatablocksandredoblocks.
cluster(machine).
Agroupofcomputersthattogetherformalargerlogicalmachine.Oracle
clusterscomputerswiththeOracleParallelServeroption.


cluster(table).
Asetofindependenttableswithacommoncolumnstoredtogether.A
clustercanimproveperformancebyreducingI/Osandbypreloading
relateddataintotheSGAbeforeitisneeded.
clusterindex.
Theindexontheclusterkey.Eachclusterkeymusthaveanindexbefore

datacanbeenteredintothecluster.
clusterkey.
Thecommoncolumninthesetoftablesbuiltintoacluster.Theclusterkey
mustbeindexed.
colddata.
Thistermtypicallyreferstoinfrequentlyuseddata.Colddataisrarelyin
cachebecauseitisinfrequentlyaccessed.
colddatabase.
Thistermtypicallyreferstoadatabasethatiscurrentlyclosedandnot
mounted.Nouserscanconnecttothedatabaseandnodatafilescanbe
accessed.
collision.
Typicallyreferstoanetworkcollision.Anetworkcollisionoccurswhen
twoormoreNICstrytousethenetworkatthesametime.Whenthis
happens,alltheNICsmustresendtheirdata.
complexstatements.
AnSQLstatementthatcontainsasubquery.Thesubqueryisaquerywithin
theSQLstatementusedtodeterminevaluesinthemainorparent
statement.
compoundquery.
Aqueryinwhichthesetoperators(UNION,UNIONALL,INTERSECT,and
MINUS)areusedtojointwoormoresimpleorcomplexstatements.The
individualstatementsinthecompoundqueryarereferredtoascomponent
queries.
concurrency.
Theabilitytoperformconcurrencydefinedmanyfunctionsatthesame
time.Oracleprovidesforconcurrencybyallowingmanyuserstoaccessthe
databasesimultaneously.
consistentmode.
Inthismode,Oracleprovidesaconsistentviewofdatafromacertainpoint

intimeforthedurationofthetransaction.Untilthetransactionhas
completed,thedatacannotchange.
consistentread.


Adataaccessinconsistentmode.
constraint.
Themechanismthatensuresthatcertainconditionsrelatingcolumnsand
tablesaremaintained.
contention.
Atermusuallyusedtodescribeaconditionthatoccurswhentwoormore
processesorthreadsattempttoobtainthesameresource.Theresultsof
contentioncanvarydependingontheresourceinquestion.
cost-basedoptimizer.
TheOracleoptimizerthatchoosesanexecutionplanbasedoninformation
andstatisticsthatithasfortables,indexes,andclusters.
currentmode.
ThemodeinwhichOracleprovidesaviewasthedataexistsatthis
moment.Queriestypicallyuseconsistentmode.
currentread.
Areadincurrentmode;typicallyusedforUPDATE,INSERT,andDELETE
statements.
cursor.
AhandletoaspecificprivateSQLarea.Youcanthinkofacursorasa
pointertooranameofaparticularprivateSQLarea.
datadictionary.
AsetoftablesOracleusestomaintaininformationaboutthedatabase.The
datadictionarycontainsinformationabouttables,indexes,clusters,andso
on.
datawarehouse.

Anextremelylargewarehouses,seedatawarehousesdatabasemadeupof
datafrommanysourcestoprovideaninformationpoolforbusiness
queries.
DBA(databaseadministrator).
Thepersonresponsiblefortheoperationandconfigurationofthedatabase.
TheDBAisthepersonresponsiblefortheperformanceofthedatabase.The
DBAischargedwithkeepingthedatabaseoperatingsmoothly,ensuring
thatbackupsaredoneonaregularbasis(andthatthebackupswork),and
installingnewsoftware.Otherresponsibilitiesmayincludeplanningfor
futureexpansionanddiskspaceneeds;creatingdatabasesandtablespaces;
addingusersandmaintainingsecurity;andmonitoringthedatabaseand
retuningitasnecessary.LargeinstallationsmayhaveteamsofDBAsto
keepthesystemrunningsmoothly;alternatively,thetasksmaybe
segmentedamongtheDBAs.


DDL(DataDefinitionLanguage)commands.
Thecommandsusedinthecreationandmodificationofschemaobjects.
Thesecommandsincludetheabilitytocreate,alter,anddropobjects;grant
andrevokeprivilegesandroles;establishauditingoptions;andadd
commentstothedatadictionary.Thesecommandsareallrelatedtothe
managementandadministrationoftheOracledatabase.Beforeandafter
eachDDLstatement,Oracleimplicitlycommitsthecurrenttransaction.
deadlock.
Deadlocksoccurwhentwoormoreprocessesholdaresourcethattheother
oneneeds.Neitheroftheprocesseswillreleaseitsresourceuntilithas
receivedtheother’sresource;therefore,neitherprocesscanproceed.
decisionsupportsystem.
Characterizedbylargebusinessqueriesdesignedtoprovidevaluabledata
thatisusedtomakesoundbusinessdecisions.

deferredframe.
Anetworkframedelayedfromtransferringbecausethenetworkisbusy.
DELETE.
TheSQLstatementusedtodeletearoworrowsfromatable.
devicedriver.
Thepieceofsoftware,suppliedbytheOSvendororthehardwarevendor,
thatprovidessupportforapieceofhardwaresuchasadiskarraycontroller
oraNIC.
diskarray.
Asetoftwoormoredisksthatmayappeartothesystemasonelargedisk.
Adiskarraycanbeeitherasoftwareorahardwaredevice.
DML(DataManipulationLanguage)commands.
Thecommandsthatallowyoutoqueryandmodifydatawithinexisting
schemaobjects.UnliketheDDLcommands,acommitisnotimplicit.DML
statementsconsistofDELETE,INSERT,SELECT,andUPDATEstatements;
EXPLAINPLANstatements;andLOCKTABLEstatements.
dynamicperformancetables.
Tablescreatedatinstancestartupandusedtostoreinformationaboutthe
performanceoftheinstance.Thisinformationincludeconnection
information,I/Os,initializationparametervalues,andsoon.
Ethernet.
Anetworkhardwarestandard.Ethernetisprobablythemost-usednetwork
typeintheworld.
equijoin.
Ajoinstatementthatusesanequivalencyoperation.Theconverseofthisis


thenonequijoinoperation.
extent.
Agroupofcontiguousdatablocksallocatedforatable,index,orcluster.

Extentsareaddeddynamicallyasneeded.
foreignkey.
Anattributerequiringthatavaluemustexistinanotherobject,ifnot
NULL,andbeitsprimarykey.
frame.
Seenetworkframe.
function.
AsetofSQLorPL/SQLstatementsusedtogethertoexecuteaparticular
function.Proceduresandfunctionsareidenticalexceptthatfunctions
alwaysreturnavalue(proceduresdonot).ByprocessingtheSQLcodeon
thedatabaseserver,youcanreducetheamountofinstructionssentacross
thenetworkandreturnedfromtheSQLstatements.
HAL(HardwareAbstractionLayer).
Asoftwarelayerclosesttothehardwarethatperformsallhardware-specific
functions.TheHALlayerincludesthedevicedrivers.
hotdata.
Thistermtypicallyreferstofrequentlyaccesseddata.Hotdatatypically
getsagoodcache-hitrate.
hotdatabase.
Thistermtypicallyreferstoadatabasethatiscurrentlymounted,open,and
servicingtransactions.Theinstanceisupandusersareaccessingdata.
index.
Adevicedesignedtogiveyoufasteraccesstoyourdata.Anindexletsyou
avoidreadingthroughdatasequentiallyinordertofindtheitemyouare
seeking.
initializationparameter.
AparameterreadbyOracleatinstancestartup.Theseparametersaffectthe
Oracleconfiguration.
INSERT.
TheSQLstatementusedtoinsertarowintoatable.

instance.
TheOracleinstanceismadeupoftheSGA,theOraclebackground
processes,andthedatafilesthatmakeupyourdatabase.
I/O(InputandOutput[ofdata]).
ThistermInput/Output,seeI/Ocanbeusedtodescribeanytypeofdata
transferbutistypicallyassociatedwithaccessestodiskdrives.


join.
Aquerythatselectsdatafrommorethanonetable.Thedataselectedfrom
thedifferenttablesisdeterminedbyconditionsspecifiedwithintheFROM
clauseofthestatement.Theseconditionsarecalledjoinconditions.
joincondition.
ThespecificationwithintheWHEREclauseofajoinquerythatspecifiesthe
mannerinwhichtherowsinthedifferenttablesarepaired.
LAN(localareanetwork).
Alocalhigh-speednetworkthatusesnetworkhardwaresuchasEthernetor
TokenRingandprotocolssuchasTCP/IPandSPX/IPX.
lightweightprocess.
Sometimesknownasathread.Similartoaprocessbutsharestheprocess
contextwithotherlightweightprocesses.Alightweightprocesshasmuch
lessoverheadassociatedwithitthandoesanormalprocess.Athreadswitch
(changebetweenthreads)hasmuchlessoverheadthanaprocessswitch.
logicaldisk.
Atermusedtodescribeadiskthatisinrealitytwoormoredisksina
hardwareorsoftwarediskarray.Totheuser,itappearsasonelargedisk
wheninrealityitistwoormorestripedphysicaldisks.
mainmemory.
AtermoftenusedtodescribeRAM(RandomAccessMemory).Thisisthe
partofthecomputersystemusedtostoredatabeingprocessedordatathat

hasrecentlybeenaccessed.RAMisvolatileandisnotsavedwhenthe
systemispoweredoff.
microkernel.
Thecorecomponentofamicrokerneloperatingsystem.Themicrokernel
containsthebasecomponentsoftheoperatingsystem.Inamicrokernel
architecture,OSfunctionsusuallydoneinthekernel(suchasI/Oand
devicedriversupport)aremovedoutofthekernel.
MPP(MassivelyParallelProcessor)system.
Amultiprocessorcomputerconsistingofmanyindependentprocessorsthat
communicatethroughacomplex,high-speedbus.
multiprocessorsystem.
AcomputerthathastwoormoreCPUs.AmultiprocessorcanbeanSMP
(SymmetricMultiprocessor)oranMPP(MassivelyParallelProcessor)
system.
networkframe.
Thestructuresentacrossthenetworkwhichcontainsuserdataaswellas
networkcontrolinformation.Thetermsnetworkframeandnetworkpacket


aresometimesinterchangeable.
networkpacket.
ThestructurebuiltbytheNetworkProtocollayer.Thisstructureincludes
userdataaswellasnetworkandroutinginformation.
NIC(NetworkInterfaceCard).
Apieceofhardwareusedtonetworkcomputerstogether.ANICcanbeone
ofseveralvarietiesincludingEthernet,TokenRing,orfiberoptics.
nonequijoin.
Ajoinstatementthatdoesnotuseanequalityoperation.Theconverseof
thisistheequijoinoperation.
offline.

Thistermtypicallyreferstoadatabasethatiscurrentlyclosedandnot
mounted.Nouserscanconnecttothedatabaseandnodatafilescanbe
accessed.
OLTP(OnLineTransactionProcessing).
AnOLTPsystemischaracterizedbylargenumbersofusersinsertingand
retrievingdatainasomewhatunstructuredmanner.
online.
Thistermtypicallyreferstoadatabasethatiscurrentlymounted,open,and
servicingtransactions.Theinstanceisupandusersareaccessingdata.
optimizer.
AcomponentoftheOracleRDBMSusedtoselectSQLexecutionplansin
themostefficientandcost-effectivemanner.Therearetwooptimizers:a
cost-basedoptimizerandarule-basedoptimizer.Eachdeterminesthebest
executionplanbasedondifferentcriteria.
OracleCallInterface(OCI).
ThestandardsetofcallsusedtoaccesstheOracledatabase.
outerjoin.
Ajoinoperationthatusestheouterjoinoperator(+)inoneofthejoin
statements.Theresultofanouterjoinistherowsthatsatisfythejoin
conditionandthoserowsinthefirsttableforwhichnorowsinthesecond
tablesatisfythejoincondition.
package.
Acollectionofrelated,storedproceduresorfunctionsgroupedtogether.
packet.
Seenetworkpacket.
paging.
Anoperatingsystemfunctionusedtocopyvirtualmemorybetween
physicalmemoryandthepagingfile(seevirtualmemory).Pagingisused



whentheamountofvirtualmemoryinusehasexceededtheamountof
physicalmemoryavailable.Pagingisanexpensivetaskintermsof
performanceandshouldbeavoidedifpossible.
ParallelQueryoption.
Anadd-onpackagetotheOracleRDBMSthatallowsforconcurrent
processingofsomefunctions.
ParallelServeroption.
Anadd-onpackagetotheOracleRDBMSthatallowsformultiplesystems
toshareacommondatabase.Eachsystemhasitsowninstancebutthe
databasetablesareshared.Dataconsistencyisguaranteedbymeansofa
sophisticatedlockingmechanism.
physicalmemory.
TheactualhardwareRAM(RandomAccessMemory)availableinthe
computerforusebytheoperatingsystemandapplications.
PL/SQL.
AsetofprocedurallanguageextensionsthatOraclehasaddedtostandard
SQL.Procedures,functions,packages,andtriggersarewritteninthe
PL/SQLlanguage.
primarykey.
Attributesusedtouniquelyidentifyarowinatable.
procedure.
AsetofSQLorPL/SQLstatementsusedtogethertoexecuteaparticular
function.Proceduresandfunctionsareidenticalexceptthatfunctions
alwaysreturnavalue(proceduresdonot).ByprocessingtheSQLcodeon
thedatabaseserver,youcanreducetheamountofinstructionssentacross
thenetworkandreturnedfromtheSQLstatements.
programunit.
InOracle,thetermusedtodescribeapackage,astoredprocedure,ora
sequence.
query.

Aquestion.ASELECTstatementisconsideredaquerybecauseitrequests
informationfromthedatabase.Anyread-onlySQLstatementcanbe
thoughtofasaquery.
randomI/O.
Occurswhendataisaccessedonadiskdriveinnospecificorder.Random
I/Otypicallycreatessignificantdiskheadmovement.
readconsistency.
Anattributeusedtoensurethat,duringaSQLstatement,datareturnedfrom
Oracleisconsistent.Oracleusestherollbacksegmentstoensureread


consistency.
recursivecall.
AsetofSQLstatementsgeneratedbyOracleinresponsetosomeactionor
event.
redologfile.
Thefilethatcontainsacopyofalldatablocksthathavebeenmodifiedas
theresultofadatabasetransaction.Intheeventofasystemfailure,any
transactioncanberecoveredwiththeseredoblocks.Oraclerequiresatleast
tworedologfilesthatarewrittentoinaround-robinfashion.
referentialintegrity.
Aconstraintonacolumninatablethatreferencesanothercolumn.The
constraintcanbeusedtoguaranteethatthereferencedvalueexists.
replication.
Thecreationofanimageofadatabaseortableonanothercomputer
system.Areplicateddatabaseisacopyofanotherdatabase.
rollback.
Theactofundoingchangesthathavebeenmadebyatransaction.
rollbacksegment.
Theplaceinthedatabasewhereundoinformationiskeptandcanbe

obtainedifarollbackisneeded.
rule-basedoptimizer.
TheOracleoptimizerthatchoosesanexecutionplanbasedonatableof
costsassociatedwithvariousoperations.
scalability.
Typicallyusedinassociationwithmultiprocessororclusterconfigurations.
Thescalabilityoftheadditionalcomponentreferstotheperformancegain
obtainedbyaddingthatcomponent.Aperfectlyscaleablesolutiongives
doubletheperformancewhenyouaddasecondcomponent.
Forexample,ifyouhaveanSMPmachinewithameasuredperformanceof
1.0(normalized),addasecondCPU,andgetaperformanceof1.9,the
scalabilityofaddingthesecondCPUis1.9or90percent.Thistermisused
quitefrequentlyinhardwareandsoftwaremanufacturer’sliteraturewhen
marketingmultiprocessororclusteredsolutions.
schema.
Acollectionofobjectsassociatedwiththedatabase.
schemaobjects.
Abstractionsorlogicalstructuresthatrefertodatabaseobjectsorstructures.
Schemaobjectsconsistofsuchthingsasclusters,indexes,packages,
sequences,storedprocedures,synonyms,tables,views,andsoon.


segment.
Thesetofextentsthathavebeenallocatedtoaspecificobject.Segment
typesconsistofdata,index,cluster,hash,androllbacktypes.
selfjoin.
Ajoininwhichatableisjoinedwithitself.
sequences.
AconveniencefeatureofOraclethatallowsuniquesequentialnumbersto
beautomaticallygeneratedforyou.

sequentialI/O.
Occurswhendataisaccessedonadiskdriveinorder.SequentialI/O
typicallycausesverylittlediskheadmovement.
ServerManager.
Oracle’sGUIdatabaseadministrationtool.ServerManagerisusedto
replaceSQL*DBA.
session.
ThesetofeventsthatoccursfromwhenauserconnectstotheOracle
RDBMStowhenthatuserdisconnects.
SGA.
SeeSystemGlobalArea.
sharedpool.
TheareaintheSGAthatcontainsthedatadictionarycacheandshared
parsedSQLstatements.
simplestatement.
AnSQLstatementthatinvolvesonlyoneINSERT,UPDATE,orDELETE
statement.
SMP(SymmetricMultiprocessor).
AnSMPsystemisamultiprocessorcomputerthatusesasharedmemory
architecture.SMPsystemsareusuallyeitheratightly-coupledoralooselycoupledarchitecture.
snapshot.
Acopyofadatabaseortable.Thistermisusedinrelationtodatabase
replication.
SPX/IPX.
AnetworkprotocoldevelopedfortheNetWareoperatingsystem.Today,
SPX/IPXrunsonmanyoperatingsystems.
SQL*DBA.
TheOracledatabaseadministrationtool.SQL*DBAisbeingmadeobsolete
byServerManager.
SQL*Loader.



TheOracledatabaseloadingtool.
SQL*Net.
TheOraclecomponentthatallowsconnectionsfromanetworkintothe
OracleRDBMS.SQL*Netsupportsmanyprotocols;SQL*Netonany
architecturecantalktoSQL*Netonanyothersupportedarchitecture.
SQL*Plus.
AnOracle-suppliedtoolthatallowsuserstorunSQLstatementsdirectly.
streaming.
Atermusuallyassociatedwithatapedevice.Tapesperformbestwhenthe
tapeiscontinuallyinmotion,orstreaming.Ifthedataisnotfedtothetape
quicklyenough,thetapedrivemustrepositionthetapetowhereveritlast
stoppedrecordingdata(torepositionthetape,thedrivemuststopthetape
andrewindit).Thisactionseverelydegradesperformance.
storedfunction.
Seefunction.
storedprocedure.
Seeprocedure.
subquery.
ASELECTstatementreferencedinanUPDATE,INSERT,orDELETEstatement.
swapping.
Anoperatingsystemfunctionsimilartopaging;usedtocopyvirtual
memorybetweenphysicalmemoryandthepagingfile(seevirtual
memory).Swappingisalmostidenticaltopagingexceptthatswappingis
doneonaprocessbasisandpagingisdoneonamemory-pagebasis.
Swappingisusedwhentheamountofvirtualmemoryinusehasexceeded
theamountofphysicalmemoryavailable.Swappingisquiteexpensivein
termsofperformanceandshouldbeavoidedifpossible.
synonym.

Analiasforatable,view,sequence,orprogramunit.
SystemGlobalArea.
AsharedmemoryregionOracleusestostoredataandcontrolinformation
foroneOracleinstance.TheSGAisallocatedwhentheOracleinstance
starts;itisdeallocatedwhentheOracleinstanceshutsdown.EachOracle
instancethatstartshasitsownSGA.TheinformationintheSGAismade
upofthedatabasebuffers,theredologbuffer,andthesharedpool;eachhas
afixedsizeandiscreatedatinstancestartup.
table.
ThebasicunitofstorageintheOracledatabase.Usersstoretheirdatain
tables.


tablespace.
Alogicalstructurethatconsistsofoneormoredatafiles.Atablespaceis
usedtologicallycontaintables,clusters,andindexes.
TCP/IP(TransmissionControlProtocol/InternetProtocol).
Anetworkprotocol.TCP/IPisprobablythemostusednetworkprotocolin
theworld.
thread.
Sometimesknowasalightweightprocess.Similartoaprocessbutshares
theprocesscontextwithotherthreads.Athreadhasmuchlessoverhead
associatedwithitthandoesanormalprocess.Athreadswitch(change
betweenthreads)hasmuchlessoverheadthanaprocessswitch.
TokenRing.
Ahardwarenetworkstandard.TokenRingnetworksuseatoken-passing
mechanismforarbitration.OnlytheNICwiththetokencanusethe
network.
transaction.
Asetofdatabasestatementsthatrepresentsalogicalunitofworkor

function.AdatabasetransactionstartswhenthefirstSQLstatementis
submittedandendswhenthecommitorrollbackhasoccurred.Performance
measurements(suchasthosedescribedinChapter5,“Benchmarking,”
oftenusesthenumberoftransactionspersecondastheperformancemetric.
trigger.
Amechanismthatallowsyoutowriteproceduresthatareautomatically
executedwheneveranINSERT,UPDATE,orDELETEstatementisexecutedon
atableorview.Triggerscanbeusedtoenforceintegrityconstraintsor
automatesomeothercustomfunction.
two-phasecommit.
Theprocessbywhichdistributedtransactionsoccur.Inatwo-phase
commit,eachnodecommitsitschangesandsignalsthatithascompleted.
Whenallnodeshavesuccessfullycommitted,thedistributedtransactionhas
committed.
UPDATE.
TheSQLstatementusedtochangerowsinatable.
view.
Awindowintoatableorsetoftables.Aviewisawayforatableorsetof
tablestobeseen.Aview,likeatable,canbequeried,updated,insertedinto,
anddeletedfrom.Thedata,however,isactuallystoredinthetablesto
whichtheviewrefers.
virtualmemory.


Thememorythatcanbeusedforprogramsintheoperatingsystem.To
overcomethelimitationsassociatedwithinsufficientphysicalmemory,
virtualmemoryallowsprogramstorunthatarelargerthantheamountof
physicalmemoryinthesystem.Whenthereisnotenoughphysicalmemory
inthesystem,theseprogramsarecopiedfromRAMtoadiskfilecalleda
pagingorswapfile.Thisarrangementallowssmallsystemstorunmany

programs.Thereisaperformancepenaltyyoupaywhenthecomputer
pagesorswaps.

TableofContents
Copyright©MacmillanComputerPublishing,Inc.


OraclePerformanceTuningandOptimizationbyEdwardWhalen
Sams,MacmillanComputerPublishing
ISBN:067230886xPubDate:04/01/96

Introduction
Foreword
AbouttheAuthor

PartI—Introduction
Chapter1—IntroductiontoOracle
TheDatabase
ThePhysicalLayer
TheLogicalLayer
TheOracleInstance
TheOracleMemoryStructure
SystemGlobalArea(SGA)
ProgramGlobalArea(PGA)
Processes
HowTransactionsWork
OracleProducts
OracleRDBMSProducts
OracleWorkgroupServer
PersonalOracleforWindows

OracleDevelopmentTools
OracleApplications
OracleServices
Summary

Chapter2—UnderstandingTerms
Terms
RDBMSFunctionality
Checkpoint
LoggingandArchiving
BusinessModels
OnLineTransactionProcessing(OLTP)
BatchProcessing
DecisionSupport
DataWarehousing
BinaryLargeObjects(BLOBs)


UnitConversions
Powersof10
StorageUnits
Summary

Chapter3—WhatIsaWell-TunedSystem?
Client/ServerComputing
TheClientorFront-EndMachines
TheServer
TheNetwork
Client/ServerChecklist
Host-BasedComputing

TheFront-EndApplication
TheDatabase
Terminal-BasedChecklist
BatchComputing
Batch-ProcessingChecklist
Exceptions
MultimediaSystems
ShippingSystems
Summary

Chapter4—TuningMethodology
Goals
Throughput
ResponseTime
Connectivity
FaultTolerance
LoadTime
TuningMethodology
ExaminetheProblem
DeterminetheProblem
DeterminetheSolutionandSetGoals
TesttheSolution
AnalyzetheResults
Summary

Chapter5—Benchmarking
IntroductiontoBenchmarking
IndustryStandardBenchmarks
TheTransactionProcessingPerformanceCouncil(TPC)



TPCRulesandRegulations
Results
Benchmarks
PublicationBenchmarks
CustomBenchmarks
WritingYourOwnBenchmark
Summary

Chapter6—PerformanceMonitoringTools
OracleTools
SQL*DBAMonitor
ServerManager
OracleSNMPAgents
SQLTrace
EXPLAINPLAN
OSTools
Third-PartyTools
Real-TimeMonitors
ThresholdMonitors
Summary

Chapter7—PerformanceEngineeringStartsatthe
DesignStage
DesignStage
DatabaseLayout
IndexesandClusters
ApplicationDesign
HardwareSizing
NetworkConsiderations

PerformanceTuningaftertheSystemIsBuilt
TuningtheClient
TuningtheServer
TuningtheNetwork
Summary

PartII—TuningtheServer
Chapter8—WhatAffectsOracleServerPerformance?
SystemBottlenecks
FindingtheBottleneck
RemovingtheBottleneck


SystemTuning
TuningRDBMSResources
TuningOSResources
TuningHardwareResources
OtherTuningFactors
SystemLimitations
Summary

Chapter9—OracleInstanceTuning
TuningMemory
TuningtheOperatingSystem
TuningthePrivateSQLandPL/SQLAreas
TuningtheSharedPool
TuningtheBufferCache
TuningtheI/OSubsystem
UnderstandingDiskContention
IdentifyingDiskContentionProblems

SolvingDiskContentionProblems
ReducingUnnecessaryI/OOverhead
MigratedandChainedRows
DynamicExtensions
PCTFREEandPCTUSEDCommandOptions
AReviewofI/OReductionTechniques
TuningRollbackSegments
UnderstandingHowRollbackSegmentsWork
TuningRollbackSegments
ReviewofRollbackSegmentTuning
CheckingforLatchContention
RedoLogBufferContention
RedoLogBufferLatchContention
TuningCheckpoints
OptimizingArchiving
AdjustingtheEffectofArchiving
OptimizingSorts
MinimizingFreeListContention
Summary

Chapter10—PerformanceEnhancements
BlockSize
Clusters


Direct-WriteSorts
Fragmentation
HashClusters
WhenToHash
Indexes

IndexTypes
HowtheOracleIndexWorks
WhatToIndex
MultiblockReads
MultiblockWrites
ParallelQueryOption
ParallelQueryProcessing
Direct-WriteSorts
ParallelIndexCreation
ParallelLoading
ParallelRecovery
ParallelServerOption
SpinCounts
Summary

Chapter11—TuningtheServerOperatingSystem
Goals
Processes
Memory
I/O
DirectorSynchronousI/O
AsynchronousI/O
Miscellaneous
Post-WaitSemaphore
SchedulingandPreemption
CacheAffinity
Summary

Chapter12—OperatingSystem-SpecificTuning
NetWare

ArchitecturalOverview
TuningConsiderations
WindowsNT
ArchitecturalOverview
TuningConsiderations


OS/2
ArchitecturalOverview
TuningConsiderations
UNIX
ArchitecturalOverview
TuningConsiderations
Summary

Chapter13—SystemProcessors
OverviewofComputerArchitecture
CPUandCache
CPUDesign
CISCProcessors
RISCProcessors
MultiprocessorSystems
SMPSystems
MPPSystems
CPUCache
SystemMemoryArchitecture
VirtualMemorySystem
BusDesign
Summary


Chapter14—AdvancedDiskI/OConcepts
DiskOperation
SeekTime
RotationalLatency
DataTransferRate
QueueTime
DiskPerformance
RandomI/Os
SequentialI/Os
Summary

Chapter15—DiskArrays
HowDoesaDiskArrayWork?
SoftwareArray
HardwareArray
RAIDTechnology
RAID-0
RAID-1


RAID-2
RAID-3
RAID-4
RAID-5
Fault-ToleranceConcerns
NoDataProtection
FullDataProtection
PartialDataProtection
ConfiguringRAIDforRDBMSPerformance
IsolateSequentialI/Os

DistributeRandomI/Os
SizetheVolumeProperly
ConfigurefortheDiskArray
RAIDComparison
Summary

PartIII—ConfiguringtheSystem
Chapter16—OLTPSystem
CharacteristicsoftheOLTPSystem
DataAccessPatterns
SystemLoad
Goals
DesignConsiderations
PhysicalDataLayout
HardwareConsiderations
TuningConsiderations
OracleTuning
ServerOSTuning
Enhancements
OracleParallelServerOption
HardwareEnhancements
PerformanceVerification
WhatToTestintheRDBMS
WhatToTestintheOS
Benchmarks
Summary

Chapter17—BatchProcessingSystem
CharacteristicsoftheBatchProcessingSystem



DataAccessPatterns
SystemLoad
Goals
DesignConsiderations
PhysicalDataLayout
HardwareConsiderations
TuningConsiderations
OracleTuning
ServerOSTuning
Enhancements
ParallelQueryOption
OracleParallelServerOption
HardwareEnhancements
PerformanceVerification
WhatToTestintheRDBMS
WhatToTestintheOS
Benchmarks
Summary

Chapter18—DecisionSupportSystem
CharacteristicsofaDSSSystem
DataAccessPatterns
SystemLoad
Goals
DesignConsiderations
PhysicalDataLayout
HardwareConsiderations
TuningConsiderations
OracleTuning

ServerOSTuning
Enhancements
ParallelQueryOption
OracleParallelServerOption
HardwareEnhancements
PerformanceVerification
WhatToTestintheRDBMS
WhatToTestintheOS
Benchmarks
Summary


Chapter19—DataWarehousingSystem
CharacteristicsofaDataWarehouse
DataAccessPatterns
SystemLoad
Goals
DesignConsiderations
PhysicalDataLayout
FaultToleranceConsideration
HardwareConsiderations
TuningConsiderations
OracleTuning
ServerOSTuning
Enhancements
ParallelQueryOption
OracleParallelServer
HardwareEnhancements
PerformanceVerification
WhatToTestintheRDBMS

WhatToTestintheOS
Benchmarks
Summary

Chapter20—BLOBSystem
CharacteristicsofBLOBs
DataAccessPatterns
SystemLoad
Goals
DesignConsiderations
PhysicalDataLayout
HardwareConsiderations
TuningConsiderations
OracleTuning
ServerOSTuning
Enhancements
HardwareEnhancements
PerformanceVerification
WhatToTestintheRDBMS
WhatToTestintheOS
Benchmarks


Summary

Chapter21—TheOracleParallelServerSystem
OracleParallelServerArchitecture
DesignConsiderations
DesignGoals
SystemDesign

TuningtheParallelServerSystem
Summary

Chapter22—OptimalBackupandRecovery
RDBMSOperationalReview
BackupProcess
RecoveryProcess
CharacteristicsoftheOracleBackupProcess
Cold(Offline)Backup
Hot(Online)Backup
DataAccessPatternsDuringBackup
SystemLoadDuringBackup
BackupGoals
SystemDesignConsiderations
ColdDatabaseBackup
HotDatabaseBackup
TuningConsiderations
SystemEnhancementsToImproveBackupPerformance
CPUEnhancements
I/OEnhancements
NetworkEnhancements
SplitUptheBackup
PerformanceVerification
WhatToTestintheRDBMS
WhatToTestintheOS
Summary

Chapter23—MiscellaneousConfigurations
FinancialSystems
SystemCharacteristics

DesignandTuningHints
Enhancements
ReplicatedSystems
SystemCharacteristics


×