I am trying to plan my storage needs for a database. If I expect to have about 30 bytes per row (My rows will be a timestamp(7 bytes + 1 for length), a number (approx 6 or 7 bytes) and a varchar2 (approx 15 bytes), do I need to consider any other overhead (i.e rowid is not stored in the table, but do I need to consider it for space requirements?)
I will also have to consider indexing requirements right?
If a row is 30 bytes, and i will be writing about 5 million rows per day i get
30 bytes * 5 million = 150 million bytes div by 1024 and 1000 = 146 MB per day
However, when I actually try to implement this scenario in oracle, I end up using about 30% more storage
I analyzed my row to make sure each was 30 bytes (using the analyze table command and the dba_tab_columns table-avg row len).
Does rowid require 10 bytes of storage ---in memory (is it correct to say it is dynamic?) ?
Is it ok to use pct_Free of zero if I expect to have no updates at all?
(if not what is the lowest I should use for pct free---I am getting information from
a plc and I do not forsee any update)
Finally, I have an integer value 229 that I put in a table and then I got the avg_col_len and it said
3. Is this in bytes? I thought a number like 229 should take 7 bytes. The date field said avg_row_len was 7...but I have heard that it is really 8...one byte for length...is there some
kind of length storage for numbers too?
Rowids require 18 bytes of space. But rowids are not stored in table - they are stored only in the indexes as pointers to actual table rows. So they have no influence on your table storage.
If you are sure there will not be any updates at all, this is perfectly accaptable setting for table (it is different story with indexes...)
Storage occupied by number 229
It takes 3 bytes to store this number in Oracle. What makes you think it will use 7 bytes? Oracle stores numbers very efficiently, read about it in Concepts manual. For example, the number 1,000,000,000 will ocupy only 2 bytes of space.
Storage occupied by dates
Daytes always occupies 7 bytes of storage. It is fixed length, so no need for extra byte for length.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?