db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: Unique constraints and null
Date Thu, 23 Mar 2006 08:41:34 GMT
>>>>>>>>>>>> Mike Matrigali wrote (2006-03-22 11:22:39):
> I am not aware of any work being done.  My only concern is that such an 
> implementation does not the affect the performance of existing index 
> operations.  I would be interested in knowing what approach you are 
> considering to address it.

Some thoughts: Basically I can see two approaches
1) Ignore null values in the index. Should be straight forward in the
optimizer to know when to use the index or not. Downside: When there
are multiple columns in the index, there are more cases when the index
is unisable.
2) Put the nulls into the index. We would then have to consider nulls
unequal to nulls when checking the constraint, but keep null equal to
null when inserting into the B-trees.

I can't see any reason (except bugs, of course) that a proper
implementation should affect performance for existing index
functionality.

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

Mime
View raw message