Home > Oracle Database / Applications Tips > Oracle database administrator > A simple way to reorganize a table and release the unused space
Oracle Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ORACLE DATABASE ADMINISTRATOR

A simple way to reorganize a table and release the unused space


Debajit Mishra
08.12.2003
Rating: -3.12- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


During Extract/Transform/Load (ETL) projects we do a lot of data loading, deleting and reloading. I have come up with this simple solution to better manage and organize the table space and performance during ETL operations. Our table size grew considerably though it has much less data. So any full table scan operation was taking a long time. After we used this method, we reduced the table size, released unused table space and gained lot of time during full table scan operations on the table.

I looked into Oracle documentation on how to reoganize a table and they say to use EXPORT or IMPORT, or it can be done by copying data into a temporary table, using TRUNCATE on the table, and then moving data back to the original table. We were planning to do something like that until I came up with this idea. We use this method to reorganize about 100 tables spanning several GBs of storage space. It was tested using Oralce 9.2.0.3.

We load data into a table by the direct path method: In such a direct-path INSERT, data is appended to the end of the table rather than using existing space currently allocated to the table. When we load data into a table and delete some or all of the records by using the DELETE statement, the delete operation does not release the allocated space even if there isn't any data. So until the space is released, they are not going to be used by any direct load operation. The above command reorganizes the table in the same table space. Basically, the reorganization allocate...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Oracle database administrator
Understanding SQL string functions
What is the difference between a database engineer, architect and administrator?
Import on one table from dump file
Error during RMAN backup
Can I drop a column in SYS schema?
STATSPACK tool: transaction vs. execution measurement
Should I port from Microsoft Access?
How can I find statistics on total memory usage and database connections?
Installing multiple Oracle homes
Modifying SYS password in a RAC environment

Oracle MDM and metadata
Oracle's Fusion Applications: Way behind or right on track?
Data warehouse based on operational data model
Method other than DB link for large data transfer
New Oracle BI tool adds color to compliance efforts
Oracle data warehousing and business intelligence guide
Getting BI with a little help from your friends
Legal auditing firm retains customers with Oracle BI
Peering into Bill Inmon's data warehousing crystal ball
Queries to retrieve table metadata
Metadata management in the data warehouse environment
Oracle MDM and metadata Research

Oracle data and application integration
Users caution to look before you leap with Oracle Fusion Applications
Oracle CRM On Demand data integration raises big issues
Q&A: Oracle's Lenley Hensarling on integrating Value Chain apps with EnterpriseOne
Oracle brings Fusion Middleware into the modern age
Risk analysis software now part of Oracle Agile PLM software portfolio
SearchOracle.com podcasts
Special Report: Collaborate '09
Oracle and Java: Some think advisory board would comfort users
Oracle New Year's resolutions, part 1: Advice for navigating 2009
Oracle to acquire application service management firm

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
metabase  (SearchOracle.com)
metadata repository  (SearchOracle.com)
metainformation  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


s new space that is needed for the amount of data the table has. Then it releases all the previously allocated space that doesn't have data any more. All the physical attributes of the table remain the same. Optionally, one can use the ONLINE option of the ALTER TABLE command.

For More Information

  • Feedback: E-mail the editor with your thoughts about this tip.
  • More tips: Hundreds of free Oracle tips and scripts.
  • Tip contest: Have an Oracle tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
  • Ask the Experts: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.
  • Forums: Ask your technical Oracle questions--or help out your peers by answering them--in our active forums.
  • Best Web Links: Oracle tips, tutorials, and scripts from around the Web.

Rate this Tip
To rate tips, you must be a member of SearchOracle.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Oracle Development Solutions - SQL, J2EE, XML, SOA
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts