Q
Problem solve Get help with specific problems with your technologies, process and projects.

Changing block size

I'm moving from 8i (8K block size) to 9i (16K block size). What is the best uniform size to minimize wasted space?

I'm moving from 8i (8K block size) to 9i (16K block size).

  1. What is the best uniform size to minimize wasted space for T1, T2, T3, T4, LARGE, MEDIUM and SMALL?
  2. I would also like to keep number of extents under the LMT extent threshold (for 16K block size: 1024 / 2 = 512).
  3. How do you determine what is ideal?

The first four tables are frequently accessed and I'd like to put each in its own tablespace.

     BYTES      AVGROW  NUMROWs

T01  2934046720    351   6927068      
 
T02  1357619200     40  25814396  
 
T03  1305518080    186   4678146      
 
T04   658841600     90   5380288      

                    LARGE UNIFORM SZ ?

T05   293068800     31   5946303
  
T06   293068800     36   4567866     
 
T06   182804480     23   4820931      
 
T08   121978880     24   3196038
 
T09    82739200     31   1554056      
 
T10    59023360     27   1474153      
 
T11    50913280     27   1477840      
 
                    MEDIUM UNIFORM SZ? 
 
T12    17612800     53    264330     
 
T13    17530880     64    183504
 
T14    15892480     37    359238       
 
T15     6184960    135     36074       
 
T16     5283840     32    104411       
 
T17     3932160    196     15484       
 
T18     3481600     32     83276       
 
T19     1597440     29     45335       
 
T20     1597440    127      9813       
 
                    SMALL  UNIFORM SZ ?
 
T21      737280     28     19545       

T22      286720     25      8158       
 
T23      245760    278       677       
 
T24       81920     35      1071       
 
T25       81920     61       480       
 
T26       81920     33       969       

T27       40960     89       171       
 
To change your block size, you are going to have to use Oracle's export and import utilities to perform your migration. So export your current Oracle 8i database to a dump file. Then recreate your database as a 9i database (or go straight to 10g if possible!) this time with a 16K block size.

After you have created your 9i database with the new block size, precreate your tablespaces to hold your data. When you create your tablespaces, make the Locally Managed Tablespaces and have Oracle automatically determine your extent sizes for you. The following is an example:

CREATE TABLESPACE users
DATAFILE '/u01/orcl/users01.dbf' SIZE 100M EXTENT MANAGEMENT LOCAL AUTOALLOCATE;

When you use AUTOALLOCATE, Oracle will decide the best extent sizes for you. Since I've been using AUTOALLOCATE for a number of years now, I have not given one single thought to the optimal extent size for my database segments. I quit specifying my extent sizes years ago and have never looked back.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close