db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: A truncation error was encountered tryin,g to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
Date Wed, 07 Jun 2006 11:56:53 GMT
>>>>>>>>>>>> Daniel John Debrunner wrote (2006-06-06 14:39:56):
> 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.

Then, a largest possible default (2G?) would be a user-friendly
improvement to Derby.

-- 
Bernt Marius Johnsen, Database Technology Group, 
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway

Mime
View raw message