0484-0484

Previous | Table of Contents | Next

Page 484

Estimating Storage for a Table

To estimate the amount of storage a table will use, you should know the number of rows expected in the table and their average size . In addition, you need to know the overheads Oracle will use. The first Oracle block of each data file is an overhead block, as is the first Oracle block of every database segment. Each block has at least 80 bytes of overhead, plus an additional 23 bytes for every increase in the MAXEXTENTS storage parameter beyond 1. There are five bytes of overhead for each row and one byte of overhead for each column that has a value. Not all the remaining space in a block is used to store your data; some of the block remains free so that the rows can expand into it. This is the PCTFREE parameter, which you can specify when you create the segment.

These overhead figures give you a rough idea of the amount of storage you should give to a segment's initial extent. After you arrive at an estimate, add on a little more. Appendix A of the Oracle8 Server Administrator's Guide gives a more detailed example of working out the amount of storage to allocate to a segment.

Summary

In this chapter, you looked at Oracle's use of the files on the file system for the database, the process by which storage is managed logically in terms of tablespaces, and the types of segments that can occupy storage within a tablespace. You also learned about storage allocation to the segments when they are created and when the segments need to grow, as well as the process by which storage is released. You also examined the ROWID, which is the unique address for every row in a database.

Previous | Table of Contents | Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net