Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Fast access to a BLOB
Hi,
how can I tune the access to a BLOB. At this time I use this Pro*C/C++ Code: (this code needs about 1 second for a BLOB of less then 10k in a table of 3 columns (2 VARCHAR(256) and a BLOB) and about 10000 rows !!!)
EXEC SQL AT :conn ALLOCATE :blob; EXEC SQL AT :conn SELECT data INTO :blob FROM archivtab WHERE objID=:obj; EXEC SQL AT :conn LOB DESCRIBE :blob GET LENGTH INTO :length;if (length == 0) return -1;
do
{
amt=length>32000?32000:length;
buffer.len=amt;
EXEC SQL AT :conn LOB READ :amt FROM :blob AT :offset INTO :buffer;
memmove(tmp,buffer.arr,amt);
tmp+=32000;
length-=32000;
offset+=32000;
} while (length>0);
EXEC SQL AT :conn FREE :blob; Received on Fri Jul 09 1999 - 10:00:31 CDT