db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: btree overflow during insert
Date Thu, 13 Nov 2008 17:01:23 GMT
Alan Burlison <Alan.Burlison@Sun.COM> writes:

> Knut Anders Hatlen wrote:
>> I have logged DERBY-3947 and attached a reproducible test case.
>> Note that it is possible to set derby.storage.pageSize just for a single
>> index by issuing
>> CALL SYSCS_UTIL.SET_DATABASE_PROPERTY('derby.storage.pageSize', '32768')
>> right before the index in question is created and resetting it with
>> CALL SYSCS_UTIL.SET_DATABASE_PROPERTY('derby.storage.pageSize', null)
>> afterwards.
> Thank-you very much for doing this, and the comments in the bug are
> useful too as they gives me a hint as to how we might change the table
> definition to avoid the problem altogether.  We can probably work
> around this by reducing the length of the varchar column being
> indexed, which is a little aggressively-sized (32672).  Failing that
> we can use the workaround you suggest.
> One thing I'm not quite clear on: does Derby allocate the full length
> of a varchar column in an index that uses it?  In our case, although
> the column is varchar(32672), only a small fraction of it is used, 4Kb
> at most.

No, it shouldn't allocate more space than what is actually used by the
column. That probably means that reducing the declared length of the
varchar column won't help. I thought there was a mechanism that
automatically picked a larger page size at table/index creation time if
the table had long columns, but it may be that it only kicks in for
CLOBs and BLOBs.

Knut Anders

View raw message