db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: A truncation error was encountered tryin,g to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
Date Tue, 06 Jun 2006 21:39:56 GMT
Farrukh Najmi wrote:

> Daniel John Debrunner wrote:

>> You probably created the table without specifying a length on BLOB, this
>> defaults to BLOB(1M). You need to use BLOB(2G). e.g.
>>
>> create table T (a int, b BLOB(2G))
>>
>> A bug about this info missing in the doc was reported as DERBY-769
>>
>> http://issues.apache.org/jira/browse/DERBY-769

> Thank you Dan! That sounds like the problem.
> BTW I am curious why the 2G is not the default?
> Is there a performance / space downside to specifying BLOB(2G) always?

It's due to Derby's history. BLOB/CLOB datatypes were added while
Cloudscape was closed-sourced at IBM and thus matched DB2 in behaviour.

There are no space concerns, no pre-allocation of space. The length only
specifies the largest possible BLOB/CLOB value for that column.

Dan.



Mime
View raw message