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: any feedback on this?
Date Tue, 24 Jun 2008 08:31:11 GMT
Alan Burlison <Alan.Burlison@Sun.COM> writes:

> Bryan Pendleton wrote:
>
>> I store my critical string fields twice, in two separate columns, one
>> column has the user-desired case, and the other column has the same data
>> in all upper case.
>>
>> Then, when I want to search without considering case, I take my search
>> terms, convert them to all upper case, and search against the
>> upper-case column.
>
> That's what I thought, thanks for the confirmation.  One question: if
> I use something like
>  	where upper_col = UPPER(?)
> will Derby still use an index, or should I convert the case of the
> search term externally then do
> 	 where upper_col = ?

Both of the above queries would normally use the index on upper_col, if
such an index is present.

-- 
Knut Anders

Mime
View raw message