sql - Defining size of CLOB in Oracle -
i making table in storing xml. store xml using clob data type. max size of xml 5kb. size of clob column should define while creating table?
you don't define size when setting clob (unlike varchar). clob.
the max size of lob 4gb.
storage wise use space follows:
- if lob defined in-row, , lob less ~ 4kb , take amount of space document is. (eg store xml of 512 bytes in-row , use 512 bytes.
- if lob defined out of row (or exceeded 4kb) use multiple of "chunk" size defined when creating table.
when creating lob column, can specify storage clause control in-row , out-of-row options this:
lob (c) store lobseg (disable storage in row chunk 16384) i.e. specify lob can never stored inline regular table data, , allocate storage in multiples of 16kb per chunk, if document 1kb, take 16kb of storage.
if xml documents 5kb, may want consider in-row storage, , put small chunk size (the min chunk size 1 block, if have tablespace 4kb extents, minumum chunk size 4kb; if specify less, ignored). disadvantage of allowing in-row lobs, table larger, large range scans may suffer bit (but lob retrieval faster).
also in 11g have option compress lob segments may want consider (if licence covers it). though such small documents may not benefit greatly.
read more here : http://docs.oracle.com/cd/b28359_01/appdev.111/b28393/adlob_tables.htm
Comments
Post a Comment