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: Wed, 9 Jul 2003 13:10:51 +0200
Message-ID: <begsvi$kt6$1@reader11.wxs.nl>


>
> Whose JDBC driver are you using? Most drivers that implement
> this sort of thing, also have an option to stop prepending the "n'"
> for this very reason.
> Joe Weinstein at BEA

The one from Microsoft and INET (http://www.inetsoftware.de/) both gave the same results.
(I am not aware that they have an option to stop prepending the "n'", but if there is I would appriciate some pointers. I am not the Java man, I do the database.).

Thanks in advance

ben brugman

Joseph Weinstein <joe.remove_this_at_bea.com.remove_this> schreef in berichtnieuws 3F0B1A00.13F3FED0_at_bea.com.remove_this...
>
>
> ben brugman wrote:
>
> > 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).
> >
>
> Whose JDBC driver are you using? Most drivers that implement
> this sort of thing, also have an option to stop prepending the "n'"
> for this very reason.
> Joe Weinstein at BEA
>
> >
> > 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 Wed Jul 09 2003 - 06:10:51 CDT

Original text of this message

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