Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Tightly Packing Table Rows onto Data Blocks

Oracle Database Tips by Burleson Consulting

January 6, 2015

Question:  I have some read-only tables and I want to tightly pack the rows as dense as possible onto the data blocks in an optimal way.  There will be no updates, deletes or inserts.  How to you minimize space wastage and ensure fast retrieval via an index?

Answer:  There are several factors that govern free space within a table and a tablespace:

  • PCTFREE:  This is the percentage of space to leave free default (20%) for subsequent inserts or updates.  To pack the data tightly, set PCTFREE to a small value (e.g. 1).
  • NEXT extent size: A smaller NEXT extent size will minimize wastage.

To pack space tight, use these techniques:

STEP 1 - Load the table, adjusting PCTFREE and NEXT to minimize wastage.

STEP 2 - Reorganize the table (using CTAS with order by) into a fresh tablespace.  Re-sequencing the rows into the same order as the most-frequently-used index.  This reduces run-time I/O by fetching related rows in a single block read  The reorg table will have these features:

- Use insert append in the CTAS to always use a fresh empty block.

- Use table compression

- Make sure that there are no chained rows

- Re-set INITIAL to fit the whole table into one extent

- Set PCTFREE to a small value, to un-link the page only when it is very full.

To verify the dense row space packing you can run tablespace mapping scripts to see the free space on each block.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster