How to use storage...
I'm using the following command:
CREATE TABLE CH07NEW_ADDRESSES
OF CUSTOMER_ADDRESS_TYPE
because I'm creating an object table, but next I want the table to have 10MB of storage and room for rows to double in size when they are update
so I know it should like this so far..
CREATE TABLE CH07NEW_ADDRESSES
OF CUSTOMER_ADDRESS_TYPE
TABLESPACE USER_DTAB
STORAGE
but how should the code after "STORAGE" read?
From the docs the syntax of the storage clause is:
STORAGE
({ INITIAL size_clause
| NEXT size_clause
| MINEXTENTS integer
| MAXEXTENTS { integer | UNLIMITED }
| PCTINCREASE integer
| FREELISTS integer
| FREELIST GROUPS integer
| OPTIMAL [ size_clause
| NULL
]
| BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
}
[ INITIAL size_clause
| NEXT size_clause
| MINEXTENTS integer
| MAXEXTENTS { integer | UNLIMITED }
| PCTINCREASE integer
| FREELISTS integer
| FREELIST GROUPS integer
| OPTIMAL [ size_clause
| NULL
]
| BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
]...
)
I'm not sure exactly what you meant by your statement "room for rows to double in size when they are update", but I assume you at least want something like:
STORAGE (INITIAL 10240K NEXT 10240K PCTINCREASE 0)
Thanks. You know what you're talking about more than me, but it wouldn't read as:
CREATE TABLE CH07NEW_ADDRESSES
OF CUSTOMER_ADDRESS_TYPE
TABLESPACE USER_DTAB
STORAGE (INITIAL 10M NEXT 10M PCTINCREASE 200);
PCTINCREASE determines how fast the size of the next extent to be added gets increased. So in your example, the initial extent would be 10M, the second would be 10M, the third would be 30M, the fourth 90M, etc...
Again, I'm not sure what your looking for, but that's how what you wrote would be interpreted.
Oh gotcha. So if I do:
STORAGE (INITIAL 10M NEXT 10M PCTINCREASE 0)
The initial extent is 10M, second 20M, third 40M, fourth 80M ??
I want to double each time.