
ORACLE DATABASE ADMINISTRATOR
Space usage: Predicting the future by means of geometric series
Predrag Radovic 03.19.2003
Rating: -2.33- (out of 5)




|
In our daily practice of managing space usage, we most
often tend to focus on our largest objects when trying to forecast the
amount of space we need to allocate for the future growth.
Yet unpleasant surprises can often come from the side of smaller objects
that are about to request additional extents (or a number of them).
To answer the following questions...
- Is there enough space in my tablespaces to allocate the next N extents
related to the tables that have less than M % of free space left?
- What percentage and amount of space will I be left with in case such
allocations occur?
...all you need to do is run this query. It has been tested on Oracle 8.1.7, Standard Edition.
The total size of the next N extents is calculated as the sum of the
geometric series, starting with the NEXT_EXTENT as the first element and having the multiplier of (PCT_INCREASE+1).
The calculation takes into account both TABLE & INDEX extents for tables in
question.
You will be asked to provide the following values:
- the number of extents whose size you want to estimate
- the percenatage of free space left within the tables of interest
Column "Currently_FREE_MB" will report the amount of free space currently
available within a tablespace.
Column "Next_Extents_MB" will tell you what will be the total size of your
next extents.
Columns "Free_PCT_Left" & "Free_MB_Left" will let you know how much space
you will be left with, in percentages and Megabytes, respectively.
Any negative figures, or figures close to zero for the column FreePCTLeft
should raise the a...
To continue reading for free, register below or login
To read more you must become a member of SearchOracle.com
');
// -->

larm.
The cases of PCT_INCREASE being equal to zero are also being taken into
account.
The assumption has been made tables are analyzed, thus the data dictionary
columns referenced contain non-NULL values.
You could easily build a function based on this query to focus on specific
table names, number of extents and free space percentages only, passing
these values as parameters.
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.
 |

|
|
 |
|
 |