Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Initial extent size when creating a table

Status
Not open for further replies.

rossman

Programmer
Oct 15, 1999
13
0
0
CA
Visit site
Hi everyone,<br>I'm getting rather confused now. When creating a table:<br>If I have a row size of 3k and estimated row count of 126,000 rows what would you recommend my initial extent, next extent to be? My max extents is 100 .If your answere is not around 4m could you let me know how you came to you conclusion.<br>Thanks <br>Mike
 
4M seems like a pretty good estimate.&nbsp;&nbsp;The value for NEXT would depend on how confident you are with your row count estimate.&nbsp;&nbsp;If you are very confident, make it relatively small (maybe 1M?).&nbsp;&nbsp;Otherwise, make it larger.
 
By my calculations you need 126,000 * 3k = 378,000k bytes for your table, or somewhat less than 400mb.&nbsp;&nbsp;If you have both initial and next extent set to 4mb you will be able to allocate that much space for your table without exceeding the limit of 100 extents.&nbsp;&nbsp;There will, however, be very little room for expansion.<br><br>There are a number of issues beyond this straight forward calculation.&nbsp;&nbsp;For example, what is your db block size?&nbsp;&nbsp;If it's 4k then you can fit only one row per block.&nbsp;&nbsp;The space required immediately increases to 126,000 * 4k = 504,000k bytes, and 4mb extents won't be large enough to allocate all the needed space.<br><br>I'm also unclear on what you mean by &quot;row size&quot;.&nbsp;&nbsp;If this is the maximum length of a row in your table then the average length is probably quite a bit smaller, so you might need less space than you think.&nbsp;&nbsp;On the other hand, if row size is the average number of data bytes per row, then you will have to adjust upward for the overhead used by Oracle
 
Jeez!&nbsp;&nbsp;Nice catch, karluk!&nbsp;&nbsp;It most certainly IS 400M, NOT 4M!&nbsp;&nbsp;That's the problem with posting to these things when your brain's gone numb.&nbsp;&nbsp;
 
&lt;g&gt; nice to see it's not just *me* that (*&%^'s up on occaision Carp....<br><br> <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Please -- Don't send me email questions without posting them in Tek-Tips as well. Better yet -- Post the question in Tek-Tips and send me a note saying "Have a look at so-and-so in the thingy forum would you?"
 
It happens a lot more than I care to admit, Mike.&nbsp;&nbsp;However, I NORMALLY don't make such a public display of it!!
 
hi,sir
I want to estimate the length of a row ,I want to know
the number(n,m) and varchar ,date type 's length ,how many bytes .

thank you .

linfang
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top