db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Re: btree overflow during insert
Date Fri, 14 Nov 2008 13:07:10 GMT
Knut Anders Hatlen wrote:

> Hmm... In the original post it looked like the errors happened while
> processing the batch (the messages said "Error for batch element
> #XX"). Are you sure that the index wasn't created implicitly before the
> inserts were performed? Constraints in the table definition may create a
> backing index even if CREATE INDEX hasn't been executed. In the example
> below, CREATE TABLE creates an index to back the UNIQUE constraint, so
> any inserts between CREATE TABLE and CREATE INDEX will still update a
> B-tree.
> 
> ij> CREATE TABLE MY_TABLE(TEXT VARCHAR(4096) UNIQUE);
> 0 rows inserted/updated/deleted
> ij> CREATE INDEX MY_INDEX ON MY_TABLE(TEXT);
> 0 rows inserted/updated/deleted
> WARNING 01504: The new index is a duplicate of an existing index: SQL081114105207590.

Originally the index was created at the same time as the table - well, a 
constraint was created, which created the backing index, as you said. 
We also tried populating the table without creating the constraint, then 
adding the constraint afterwards, but the result was the same, we got 
the btree space issue.  Increasing the DB block size seems to be the 
workaround.

-- 
Alan Burlison
--

Mime
View raw message