Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: unicode searchstring, index not used.

Re: unicode searchstring, index not used.

From: ben brugman <ben_at_niethier.nl>
Date: Tue, 8 Jul 2003 20:19:19 +0200
Message-ID: <bef1kl$l7c$1@reader10.wxs.nl>


>
> First of all by refrain from posting riddle and quiz questions without
> prize
>

Sorry to keep the message brief, the
prize was not mentioned. Sorry for that.

More verbose.
J2ee works with Unicode (all over the place). Our existing database does not need Unicode, so all character columns are implemented as varchar2.

When a search is done from the code, it is send to the database as a Unicode search. So something like

select name, number from members where name = n'WIL';

(The n indicating that it is a Unicode string, this is done with a JDBC interface (I think), it is not sent as a string but as a query with parameters, but the parameter still being unicode).

Now if we use a table were name is implemented as Unicode, the search will use the index.

If we use our existing table, the search does not use the index.

Problem is that, in J2ee the use of Unicode is general, and as far as I know can not be switched of. To my knowledge it can not be converted to a 8 bit character set either. The used characters all fit in the 8 bit character set, our organisation does not use any character outside this set so we do not need Unicode.

Java is the new coding technique in our organisation, most applications are in Delphi up to now. I think it would be rediculous that because of a change to a new 'coding environment' (read Java) the existing database structure can not be used anymore. (That to keep indexes working on should implement text fields as a Unicode field).

My question was kept short, hoping that somebody would recognise the problem without deterring them from reading the message.

ben brugman.

Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> schreef in berichtnieuws q60mgvos3urmdsg52bau6igmh2h3aatq1r_at_4ax.com...
> On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <ben_at_niethier.nl>
> wrote:
>
> >Application is J2ee,
> >The searchstring is supplied in unicode.
> >Column is varchar and indexed.
> >The index is not used.
> >
> >How to aliviate this ?
> >
> >ben brugman
> >
>
>
> First of all by refrain from posting riddle and quiz questions without
> prize
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Tue Jul 08 2003 - 13:19:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US