ORACLE9i 性能调优.docx

上传人:b****8 文档编号:12505781 上传时间:2023-06-06 格式:DOCX 页数:37 大小:4.30MB
下载 相关 举报
ORACLE9i 性能调优.docx_第1页
第1页 / 共37页
ORACLE9i 性能调优.docx_第2页
第2页 / 共37页
ORACLE9i 性能调优.docx_第3页
第3页 / 共37页
ORACLE9i 性能调优.docx_第4页
第4页 / 共37页
ORACLE9i 性能调优.docx_第5页
第5页 / 共37页
ORACLE9i 性能调优.docx_第6页
第6页 / 共37页
ORACLE9i 性能调优.docx_第7页
第7页 / 共37页
ORACLE9i 性能调优.docx_第8页
第8页 / 共37页
ORACLE9i 性能调优.docx_第9页
第9页 / 共37页
ORACLE9i 性能调优.docx_第10页
第10页 / 共37页
ORACLE9i 性能调优.docx_第11页
第11页 / 共37页
ORACLE9i 性能调优.docx_第12页
第12页 / 共37页
ORACLE9i 性能调优.docx_第13页
第13页 / 共37页
ORACLE9i 性能调优.docx_第14页
第14页 / 共37页
ORACLE9i 性能调优.docx_第15页
第15页 / 共37页
ORACLE9i 性能调优.docx_第16页
第16页 / 共37页
ORACLE9i 性能调优.docx_第17页
第17页 / 共37页
ORACLE9i 性能调优.docx_第18页
第18页 / 共37页
ORACLE9i 性能调优.docx_第19页
第19页 / 共37页
ORACLE9i 性能调优.docx_第20页
第20页 / 共37页
亲,该文档总共37页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

ORACLE9i 性能调优.docx

《ORACLE9i 性能调优.docx》由会员分享,可在线阅读,更多相关《ORACLE9i 性能调优.docx(37页珍藏版)》请在冰点文库上搜索。

ORACLE9i 性能调优.docx

ORACLE9i性能调优

性能调优

Chapter01OverviewofOracke9iDatabasePerformanceTuning

Objectives

Aftercompletingthislesson,youshouldbeabletodothefollowing:

Definetherolesassociatedwiththedatabasetuningprocess

Describethedependenciesbetweentuningindifferentdevelopmentphases

Describeservicelevelagreements

Identifytuninggoals

Identifycommontuningproblems

Employtuningactivitiesduringdevelopmentandproduction

Balanceperformanceandsafetytrade-offs

ReferenceBooks

TuningQuestions

Whotunes?

-Applicationdesigners

-Applicationdevelopers

-Databaseadministrators

-Systemadministrators

Whattotune?

Howmuchtuningisrequired?

WhatDoestheDBATune?

Application:

SQLstatementperformanceSharedwithdevelopers

Changemanagement

Instancetuning;

Memory

Databasestructure

Instanceconfiguration

TuningPhases

Applicationdesignandprogramming

Databaseconfiguration

Addinganewapplicationtoanexistingdatabase

Troubleshootingandtuning

TuningGoals

Minimizingresponsetime

Increasingthroughput

Increasingloadcapabilities

Decreasingrecoverytime

(SLA)

CommPerformanceProblems

Badsessionmanagement:

Limitsscalabilitytoapointsthatcannotbeexceeded

Makesthesystemoneortwoordersofmagnitudeslowerthanitshouldbe

Badcursormanagement

Badrelationaldesign:

Unnecessarytablejoinsperformed

Usuallyaresultoftryingtobuildanobjectinterfacetorelationalstorage

TuningStepsIndevelopment

Tunethedesign

Tunetheapplication

Tunememory

TuneI/O

Tunecontention

Tunetheoperatingsystem

BaselineofStatistics

Abaselinesetofstatisticsisusedto:

Provideasetofstatisticsthatarecollectedwhenthesystemwasoperatingwithintheboundsset

Createahypothesisaboutwhathaschangeonthesystem

StepsforaProductionDB

1.Definetheproblem

2.ExaminethehostsystemandOraclestatistics

3.Considersomecommonperformanceerrors

4.Buildaconceptualmodel

5.Implementandmeasurethechange

6.Checkthatthebottleneckhasbeenresolved

TuningMethodology

Checkalertlogandtracefilesforerrors.

Checktheparameterfileforanydiagnosticofinappropriateparametersetting.

Checkmemory,I/O,andCPUusage.Identifyprocesseswithresourceusageanomalies.

IdentifyandtuneSQLstatementsthatareheavyconsumersofCPUofI/O.

Tuningresponsetime:

Analyzesystemperformanceintermsofworkdone(CPUorservicetime)versustimespentwaitingforwork(waittime)

Determinewhichcomponentconsumesthegreatestamountoftime

Drilldowntotunethatcomponent,ifappropriate.

Trade-OffsofP&S

Factorsthataffectperformance:

Multiplecontrolfiles

Multipleredologmembersinagroup

Frequentcheckpointing

Performingarchiving

Blockchecknumbers

Numberofconcurrentusersandtransactions

Summary

Inthislesson,youshouldhavelearndhowto:

Createagoodinitialdesign

Defineatuningmethodology

Performproductiontuning

Establishquantifiablegoals

Listtuningproblems

Decidebetweenperformanceandsafety

Chapter02DiagnosticandTuningTools

Objectives

Aftercompletingthislesson,youshouldbeabletodothefollowing:

Identifykeytuningcomponentsofthealertlogfile

Identifykeytuningcomponentsofbackgroundtracefiles

Identifykeytuningcomponentsofusertracefiles

CollectstatisticswithOracleEnterpriseManager

DescribehowStatspackcollectsstatistics

CollectstatisticswithStatspack

Identifydynamicperformanceviewsusefulintuning

Describeothertoolsusedfortuning

MaintenanceofAlertlog

Thealertlogfileconsistsofachronologicallogofmessagesanderrors.

Checkthealterlogfileregularlyto:

Detectinternalerrors(ORA-600)andblockcorruptionerrors

Monitordatabaseoperations

Viewthenodefaltinitializationparameters

Removerortrimthefileregularlyafterchecking

TuningComponents

Thealertlogfilecontainsthefollowinginformationwhichcanbeusedintuningdatabase:

Checkpointstartandendtimes

Imcompletecheckpoints

Timetoperformarchiving

Instancerecoverystartandcompletetimes

Deadlockandtimeouterrors

BPTraceFiles

TheOracleserverdumpsinformationabouterrorsdetectedbyanybackgroundprocessintotracefiles.

OracleSupportusesthesetracefilestodiagnoseandtroubleshoot.

Thesefilesdonotusuallycontaintuninginformation.

UserTraceFiles

Serverprocesstracingcanbeenabledordisabledatthesessionorinstancelevel.

AusertracefilecontainsstatisticsfortracedSQLstatementsinthatsession.

Usertracefilesarecreatdonaperserserverprocessbasis.

Usertracefilescanalsobecreateby:

-Backupcontrolfiletotrace

-DatabaseSETEVENTs

Views,Utilities,andTools

ToolsandviewsthatareavailabletotheDBAfordeterminingperformance:

OracleEnterpriseManager

Diagnosticsandtuningpacks

Statspack

V$xxxdynamictroubleshootingandperformanceviews

Dba_xxxdictionaryviews

Oraclewaitevents

Utlbstat.sqlandutlestat.sqlscripts

Statspack

InstallationofStatspackusingthespcreate.sqlscript

Collectionofstatisticsexecutestatspack.snap

Automaticcollectionofstatisticsusingthespauto.sqlscript

Produceareportusingthespreport.sqlscript

TocollecttiminginformationsetTIMED_STATISTICS=True

StatspackOutput

Informationfoundintheremainderofthedocument:

Completelistofwaitevents

InformationonSQLstatementscurrentlyinthepool

Instanceactivitystatistics

TablespaceandfileI/O

Bufferpoolstatistics

Rollbackorundosegmentstatistics

Latchactivity

Dictionarycachestatistics

Librarycachestatistics

SystemGlobalArea(SGA)statistics

Startupvaluesforinitializationparameters

DDandSpecialViews

Thefollowingdictionaryandspecialviewsprovideusefulstatisticsafterusingthedbms_statspackage:

Dba_tables,dba_tab_columns

Dba_clusters

Dba_indexes,index_stats

Index_histogram,dba_tab_histograms

Thisstatisticalinformationisstaticuntilyoureexecutedbms_stats.

SystemwideStatistics

Session-RelatedStatistics

OracleWaitEvents

Acollectionofwaiteventsprovidesinformationonthesessionsthathadtowaitormustwaitfordifferentreasons.

Theseeventsarelistedinthev$event_nameview,whichhasthefollowingcolumns

-EVENT#

-NAME

-PARAMETER1

-PARAMETER2

-PARAMETER3

V$event_name

StatisticsEventViews

V$session_event:

Waitsforaneventforeachsessionthathadtowait

V$session_wait:

Waitsforaneventforcurrentactivesessionthatarewaiting

V$system_event:

Totalwaitsforanevent,allsessionstogether

V$session_eventView

V$session_waitView

V$system_eventView

SpecialViews

V$views:

BasedonX$tables

Listedinv$fixed_table

X$tables:

Notusuallyquerieddirectly

Dynamicandconstantlychanging

Namesabbreviatedandobscure

Populatedatstartupandclearedatshutdown

TSandtuningviews

DBA-DevelopedTools

Developyourownscripts.

Usethesuppliedpackagesfortuning.

Scheduleperiodicperformancechecking.

TakeadvantageoftheEnterpriseManagerEventservicetotrackoftrackspecificsituations.

TakeadvantageoftheOracleEnterpriseManagerJobserviceto:

Automatetheregularexecutionofadministrativetasks.

ApplytasksthatautomaticallysolveproblemsdetectedbytheOracleEnterpriseManagereventservice.

LevelofStaticsCollection

Theinitializationparametersthatdeterminethelevelofstatisticcollectionare:

STATISTICS_LEVEL

TIMED_STATISTICS

TIMED_OS_STATISTICS

DB_CACHE_ADVICE

Summary

Inthislesson,youshouldhavelearnedhowto:

Usethealertlogfile

Getinformationfrombackgroupprocessestracefiles

TraceuserSQLstatements

Collectstatisticsfromdictionaryanddynamicperformancetroubleshootingviews

UsetheStatspackutilitytocollectperformancedata

Retrivevwaiteventsinformation

Chapter03DatabaseConfigurationandI/OIssues

Objectives

Aftercompletingthislesson,youshouldbeabletodothefollowing:

ListtheadvantagesofdistributingdifferentOraclefiletypes

Diagnosetablespaceusageproblems

Listreasonsforpartitioningdataintablespace

Describehowcheckpointswork

Monitorandtunechechpoints

Monitorandtuneredologs

OracleDatabase11Gincludesthreestandardstorageoptions:

Filesystem

Networkattachedstorage(NAS)

Storageareanetwork(SAN)

Directattachedstorage

Rawpartitions

AutomaticStorageManagement(ASM)

OracleProcessesandFiles

PerformanceGuidelines

Basicperformancerulesareasfollow:

KeepdiskI/Otoaminimum.

Spreadyourdiskloadacrossdiskdevicesandcontrollers.

Usetemporarytablespacewhereappropriate.

DistributingFiles

Separatedatafilesandredologfiles.

Stripetabledata

ReducediskI/Ounrelatedtothedatabase.

TablespaceUsage

Reservethesystemtablespacefordatadictionaryobjects.

Createlocallymanagedtablespacestoavoidspacemanagementissues.

Splittablesandindexesintoseparatetablespaces.

Createrollbacksegmentsintheirowntablespace.

Storeverylargeobjectsintheirowntablespace.

Createoneormoretemporarytablespace.

LocallyManagedsysTs

Creaedatabasesthathavealocallymanagedsystemtablespace.

ToolsforI/OStatistics

Usingv$filestatView

I/OStatistics

selectd.tablespace_nametablespace,d.file_name,f.phyrds,f.phywrts

fromv$filestatf,dba_data_filesd

wheref.file#=d.file_id

FileStriping

Operatingsystemstriping:

-Useoperatingsystemstripingsoftwareoraredundantarrayofinexpensivedisks(RAID).

-Determinetherightstripesize.

Manualstriping:

UsetheCREATETABLEorALTERTABLEcommandwiththeALLOCATE

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2