Re: Insert 90MB data file in one cell

From: Dogan Cibiceli <dcib_at_gwl.com>
Date: Fri, 07 May 1999 14:28:12 -0600
Message-ID: <37334CDC.D52C81BA_at_gwl.com>


klimsamgin wrote:

> Hi!
>
> I use LONG RAW columns to store large binary datafiles in ORACLE7
> under Solaris 2.5 (for example, 90MB file).
> And when I insert this big value in the table's cell
> at a heat, my PRO*C program can't allocate
> enough memory in the system (90MB buffer with data).
> To resolve this trouble, I should insert small
> pieces of this file in the cell(for examle, 1000x90KB, 1000 pieces).
> But how can I do this? Which command need used?
>
> Of couse, I can use 1000 cells, but what about one cell?
>
> Thanks,
> Klim.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

I would say use another table and link them with a foreign key. Use the foreign key and counter. Divide it to as small as you like. For ex. 1MB pieces. Then there will be 90 rows. Each time you call a function allocate a 1MB portion fill it and insert into that table. There you just need 1MB space. If youcannot do that allocate smaller. Then when fetching fetch in incremental count. Your table should look like this

 foreign_key count raw_data

f1                      1        kllksdlfkds;f
f1                      2        dl;fkds;lfkdsl;k
f1                     3         dfslkdsflkd;sfkdsl;

The whole object is then kllksdlfkds;f + dl;fkds;lfkdsl;k + dfslkdsflkd;sfkdsl;.

Sorry for the lousy example :)

Dogan Received on Fri May 07 1999 - 22:28:12 CEST

Original text of this message