Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Pctfree vs pctused


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Pctfree vs pctused

  1. 1. Forum Archives Forum ArchivesPCTFREE Vs PCTUSEDThread: PCTFREE Vs PCTUSEDClick Here to Expand Forum to Full - Feature Database ArticlesDatabasejournal.comParallel Processing -- Bane or BoonPerforming Full-text Searches in MySQL 5.6SQL Server 2012: Time Marches OnPartitioning in SQL Server - Part 3SQL Server 2012 Integration Services - Introduction to ManagingSQL Server with PowerShellTechniques for Analyzing Historical DB2 Application Perform anceDataWorking With Metrics Extensions in Oracle Enterprise Manager12c Cloud ControlA Tale of Two IndexesCom paring SQL Server and MySQL FunctionsDeveloping a SQL Server Backup StrategyUser Name Password Log inRemember Me?RegisterHelpWhats New?FAQ Calendar Forum Actions Quick Links Advanced SearchResults 1 to 10 of 15Page 1 of 2 1 2LastThread Tools Display02-23-2001 09:12 PMJoin Date:Posts:Oct 2000250#1Senior MemberckwanForumPCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  2. 2. Dear all,I want to pour some questions on theabove topic questions :1. I come across a statement saying thatPCTUSED Parameter explanation - After adata block becomes full, as determined byPCTFREE, Oracle does not consider theblock for the insertion of new rows untilthe percentage of the block being usedfalls below the parameter PCTUSED.Before this value is archived, Oracle usesthe free space of the data block only forupdates to rows already contained in thedata block.Q : What is the reason for this - PCTUSED? Why they want to control that parameter? Can I set it to 0 ?Q: Is free list this pre-allocated ? Is thisonly use for PCTFREE ? Where does itstore ?Your answer is very much appreciated.Thanks.Reply With Quote02-24-2001 03:04 AMJoin Date:Posts:Feb 20017re: pctused vs pctfreehope this will provide you your answer...The PCTFREE parameter specifies thepercentage ofspace in each data block that is reservedfor growthresulting from updates of rows in thatdata block. Thisparameter has a default value of 10percent.For example, the value of the PCTFREEparameter isspecified as 20 in a CREATE TABLEstatement. Thisindicates that inserts to the block shouldstop as soon as#2Junior MemberIT_girl200PCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  3. 3. free space drops to 20 percent or less.The free spacethereafter can only be used for updates.The PCTUSED parameter represents theminimumpercentage of the used space that theOracle server triesto maintain for each data block of thetable. Thisparameter has a default value of 40percent.When a data block is filled to the limitdetermined by thevalue of the PCTFREE parameter, Oracleconsiders theblock unavailable for the insertion of newrows. The blockis unavailable for the insertion of newrows until thepercentage filled by the data of that blockfalls below thevalue of the PCTUSED parameter.Until the percentage of the block fallsbelow the value ofthe PCTUSED parameter, Oracle uses thefree space ofthe data block only for updating the rowscontained in thedata block.For example, if PCTUSED is defined as 40percent, theblock is reused for inserts as soon asutilization drops toless than 40 percent. Inserts continueuntil utilizationreaches 80 percent and the cycle repeats.Reply With QuotePCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  4. 4. 02-24-2001 03:31 AMJoin Date:Location:Posts:Feb 2001Bombay,India530Pctused and Pctfree are block storageparameters.Pctused is used to find out how muchpercentage of the block will be used tostore rows.Pctfree is used to find out howmuch percentage of the block will be usedto store rows resulting from furtherupdates to the rows in the samedatablock.Eg. If u keep pctused to 40% and u can insert rows till 40 %.if thelimit exceeds 40%,still also u can insertrows in the datablock till the limit reaches80% (100%-20%) as u have kept pctfreeto 20%.Now if one goes on deleting therows,the block is not said to be free unlessand until pctused falls below 40%.As soonas pctused falls below 40% from deletingthe rows, that block can be used to insertthe rows.In this way the cyclecontinous.So it is recommended that unever sum uppctused+pctfree=100.Always have somegap between them this helps in reducingur Oracle server for allocation anddisallocation of freelists.If any further doubts write torohitsn@hotmail.comAdvisorrohitsnReply With Quote02-25-2001 12:48 PMJoin Date:Location:Posts:May 2000ATLANTA, GA, USA3,136This is an interesting question. I wouldlike to share my experience.In the last 3 months, I had interviewed 15Oracle DBAs and asked the samequestion. Only one person answeredcorrectly.Both the parameters are applicable andused for each data block in the Database.I hope an example will give you the rightanswer.#4ModeratortamilselvanPCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  5. 5. Consider 8K block size. The total bytes 8 x1024 = 8196 bytesEach block requires approximately 117bytes for the header. Please note that theheader size varies depending upon theblock size.The total available bytes for data = ( 8196– 117) = 8079 bytes.A table is created with PCTFREE 20PCTUSED 50 .PCTRFREE in bytes = 1615PCTUSED in bytes = 4039Now the data available for insert andupdate = (8079 – (20 * 8079)/100 ) =6463 Bytes.Now user can insert new rows into thisblock as long as the old rows’ total bytes+ new row’s total byte is less than orequal to 6463 bytes. If the new row’s totalbyte cannot be put into this block, thenOracle will get the next block from thefree list, and inserts into it.When a row is updated and the row’s datais expanded, then PCTFREE come intoplay. The updated row’s data is placedinto PCTFREE’s area, provided the updatedrow’s new data can be fit into PCTFREEarea. If it is not fit into that area, anothernew block will be obtained from theFreelist, and the row will be migrated. Butthe original row info (pointer) is kept inthe old block. For subsequent access tothis row involves 2 read I/O. That is whyrow migration should be avoided becauseof excessive I/Os.ROW DELETION:The PCTUSED parameter value (in thisexample 50 %) is the threshold limit forthe old block to be added in the FREELIST.To understand better, let us assume that ablock is of full data. Now the user startsdeleting rows from the block. When a rowis deleted, Oracle does not put the blockinto the FREELIST because it requiresmany recursive calls to update theFREELIST. The PCTUSED % (50)determines when the block should beadded into FREELIST. When the totalbytes in the block is less than or equal to4039 bytes, then the block will be addedinto FREELIST.If a table has high inserts and highdeletion, then you should decrease thePCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  6. 6. PCTUSED value in order to minimize thefrequent update of FREELIST.The best confidence booster is knowledge.Good Luck, guys.Reply With Quote02-26-2001 12:03 PMJoin Date:Location:Posts:May 2000ATLANTA, GA, USA3,136Correction in earlier post.The overhead for each block is 107 bytes,not 117 bytes.Tamilselvan#5ModeratortamilselvanReply With Quote02-26-2001 12:27 PMJoin Date:Location:Posts:Oct 2000Saskatoon, SK,Canada3,925#6Senior AdvisorsambavanPCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  7. 7. That was one damn good explanation. Buton reading this thread, Im getting morequestions than that of answers.1. How do one get to check the over headfor different block_sizes.2. What happens when one sets thePCTFREE to 80%Sorry for such a lame question, but wascurious to know the answer, atleast to thefirst one.Thanx,SamThanxSamLife is a journey, not a destination!Reply With Quote02-26-2001 12:41 PMJoin Date:Location:Posts:May 2000ATLANTA, GA, USA3,136Oracle says the overhead for each blockvaries from 84 bytes to 107 bytes.I do not know how to cross check overhead bytes for various block sizes.Does anybody know the answer?#7ModeratortamilselvanReply With Quote02-26-2001 12:44 PMJoin Date:Location:Posts:Jun 2000Madrid, Spain7,448if pctfree is high then basically we arewasting hard drive space since only 10%of block is used for inserts, of course ifyou consider that you will update the rowsso often and fill the 80% up then it´s up#8Pando & CompanypandoPCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  8. 8. to you but I think it´s pretty rareI say 10% but it can be less sincepctfree+pctused cant be more than 100and if we set pctused 20 and pctfree 80most probably we will face perfomanceissues because the block has to be put onfreelist and taken off free list all the time.As for block overhead I think there is aformula in Oracle DBA HandbookReply With Quote02-26-2001 12:47 PMJoin Date:Posts:Jan 2001642To add on to the question pool,I understand that the pctused is used byoracle to put the block into the free list forfuture inserts.1) Will any new blocks(extends) added willdirectly put into the freelist ?2) I know that I have a table, in which Irarely have any updates and deletes butonly insertions, then can I set theparameters forPCT FREE = 100and PCT USED=0?Badrinath#9AdvisorbadrinathnReply With Quote02-26-2001 01:11 PMJoin Date:Posts:Nov 2000212badrinathn:on site [url][/url] is gooddiscussion of that issue. from myunderstanding, new blocks goes to socalled master free list.pctused=0 and pctfree=100 would makesense for insert only table.#10MemberLNDReply With QuotePCTFREE Vs PCTUSED of 9 12/02/2013 01:40
  9. 9. « Previous Thread | Next Thread »Acceptable Use PolicyCopyright 2013 QuinStreet Inc. All Rights Reserved.Terms of Service | Licensing & Permissions | Privacy PolicyAbout the IT Business Edge Network | AdvertiseAll times are GMT -4. The time now is 07:29 PM.Page 1 of 2 1 2 LastQuick Navigation Forum Archives TopPCTFREE Vs PCTUSED of 9 12/02/2013 01:40