views:

188

answers:

1

Are there known issues with storing user defined types within index organized tables in Oracle 10G?

CREATE OR REPLACE TYPE MyList AS VARRAY(256) OF NUMBER(8,0);

CREATE TABLE myTable (
    id NUMBER(10,0) NOT NULL, 
    my_list MyList NOT NULL)
    CONSTRAINT pk_myTable_id PRIMARY KEY(id))
ORGANIZATION INDEX NOLOGGING;

With this type and table setup, I loaded via insert append ~2.4M records and it took 20G of space at which point I ran out of disk space. Looking at the size of the data types, this seemed to be taking up a lot of space for what was being stored. I then changed the table to be a regular table (not IOT) and I stored 6M+ records in ~7G of storage, added the PK index which took an additional 512M.

I've used IOT many times in the past, but not with a user defined type.

Why is it that the storage requirements when using a UDT and IOT are so high?

A: 

AFAICR, Oracle always stores VARRAY's out of row in the IOT's.

I'll now try to find the references in the docs to confirm this.

Quassnoi
From what I can tell the VARRAY is stored as a LOB in both the IOT and Standard Heap tables.
RC
@RC: yes, but a LOB that does not exceed 4000 bytes in size can be stored both in-row and out-of-row.
Quassnoi