Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
P. 1
Everyday Oracle DBA - Chapter 4 Database Tuning - Making is Sing

Everyday Oracle DBA - Chapter 4 Database Tuning - Making is Sing



|Views: 377|Likes:
Published by hoangtran1307

More info:

Published by: hoangtran1307 on Jul 07, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





ORACLE FLUFF / Everyday Oracle DBA / Wells / 6208-7 / Chapter4Blind Folio
Database Tuning:Making It Sing
P:\010Comp\Oracle8\208-7\ch04.vpFriday, December 02, 2005 12:10:01 AMColor profile: Generic CMYK printer profileComposite Default screen
f backup and recovery are the most important things a DBA does,then tuning is the runner-up.Oracle’sdatabaseengineisahighlytunablecreatureand,metaphoricallyspeaking, you
make itsing by monitoring how Oracle performs as itruns,andthenadjustingdifferentparameters,increasing(hopefully)itsperformance.It’softenthecasethatthetimespentwaitingforvariouscomputingfunctionstofinishadverselyimpactsbothacompany’sexpensesanditsman hours. Time is wasted when users have to wait (sometimes for extendedperiods of time) for queries to be returned. Sometimes it’s imperative yoursystem keeps pace with the speed and ever-increasing needs of the businesscommunity, or perhaps you need to optimize use of your existing hardwareinfrastructure particularly at a time when organizations insist on doing morework,evenwithlesscapitalinvestedinhardware.InthewordsofGajaKrishna Vaidyanatha (co-author of 
Oracle Performance Tuning 101
andowner of DB Performance Management Consulting), you may be one of theunfortunatesoulssufferingfrom“compulsivetuningdisorder,”whospendsaninordinateamountoftimetuningthedatabasebylookingatirrelevantthings.Whateveryourreasonfortuning,however,andregardlessoftheapproachyou take, the fact is you’ll often be called upon to spend time in the tuningarena.While there are widely differing schools of thought concerning tuningmethodology, what to tune typically falls into six major categories.
Database Design
Optimally, if you can (that is to say if you’re lucky enough to have a say inthedesignprocess),thebiggestbangforthetuningbuckistypicallyatdatabase design time. Knowing the design, being able to put structures inplace from the get-go, and normalizing the design to the extent it is practical(even third normal form is too normal for some databases) will go a longway when it comes to tuning. Understanding how users will use the dataalso helps, and not being afraid of employing a lot of Oracle’s new features(new as of Oracle 8, Oracle 8
, Oracle 9
, or even Oracle 10
) even if theyare scary new features like materialized views, dimensions, and partitioning
Everyday Oracle DBA
ORACLE FLUFF / Everyday Oracle DBA / Wells / 6208-7 / Chapter4Blind Folio
P:\010Comp\Oracle8\208-7\ch04.vpFriday, December 02, 2005 12:10:18 AMColor profile: Generic CMYK printer profileComposite Default screen
can also benefit a design, either from the planning stage or even later, afterthe database is in place. Also, a word to the wise: work with your systemadministratorstolaythefilesoutondiskasoptimallyaspossible.Theyknow the disks that will perform better, if your organization segregates jobresponsibilities between system administration and database administration,and you know the tables and tablespaces that are likely to be more active.Many that don’t know end up putting the most active data on the least wellperforming disks.
Application Tuning
Ifyoucan’ttunethedatabasedesign,thenextbestoptionistotunetheapplication and the application code. In many cases, the 80-20 rule applies.Eighty percent of all performance problems can be resolved with codingmore optimal SQL or appropriately scheduling batch jobs during off-peakhours. Of course, if you’re in a global organization, finding an off-peak timemaybenexttoimpossible,butitsstillworthatry.Themajorityofthischapterwill cover this kind of tuning.
Memory Tuning
Properly sizing the SGA, your database buffers, and pools can go a long waytowards maintaining an efficiently running database. Having sufficient spaceto allow you to pin objects into memory, in particular those frequently usedon large objects, can limit the amount of disk access needed. Of course, it’sdifficult by any stretch of the imagination to justify pinning a few billion-rowtables into memory, even if it were possible, but in this, as with all things,moderation is the key.
Disk I/O Tuning
Theproperplacingofdatafilesandaptlysizingthemtoprovidethemaximumthroughput of data from disk to the application can be an important step intuning. Again, placing active files on controllers with the best throughputcan mean your users won’t notice the application slowing down. The bestthroughput possible can mean your application won’t be noticeably sloweddown.Chapter4:Database Tuning: Making It Sing
ORACLE FLUFF / Everyday Oracle DBA / Wells / 6208-7 / Chapter4Blind Folio
P:\010Comp\Oracle8\208-7\ch04.vpFriday, December 02, 2005 12:10:29 AMColor profile: Generic CMYK printer profileComposite Default screen

Activity (18)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
devraj_h liked this
brijesh1747 liked this
jaganj liked this
devraj_h liked this
akinkurtulan liked this
joe_programmer liked this
esam2009 liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->