dbTalk Databases Forums  

unicode searchstring, index not used.

comp.databases.oracle.server comp.databases.oracle.server


Discuss unicode searchstring, index not used. in the comp.databases.oracle.server forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ben brugman
 
Posts: n/a

Default unicode searchstring, index not used. - 07-08-2003 , 09:44 AM






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



Reply With Quote
  #2  
Old   
Sybrand Bakker
 
Posts: n/a

Default Re: unicode searchstring, index not used. - 07-08-2003 , 12:35 PM






On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <ben (AT) niethier (DOT) nl>
wrote:

Quote:
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


Reply With Quote
  #3  
Old   
ben brugman
 
Posts: n/a

Default Re: unicode searchstring, index not used. - 07-08-2003 , 01:19 PM



Quote:
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 (DOT) demon.nl> schreef in berichtnieuws
q60mgvos3urmdsg52bau6igmh2h3aatq1r (AT) 4ax (DOT) com...
Quote:
On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <ben (AT) niethier (DOT) 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



Reply With Quote
  #4  
Old   
Joseph Weinstein
 
Posts: n/a

Default Re: unicode searchstring, index not used. - 07-08-2003 , 02:22 PM





ben brugman wrote:

Quote:
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

Quote:
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 (DOT) demon.nl> schreef in berichtnieuws
q60mgvos3urmdsg52bau6igmh2h3aatq1r (AT) 4ax (DOT) com...
On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <ben (AT) niethier (DOT) 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


Reply With Quote
  #5  
Old   
ben brugman
 
Posts: n/a

Default Re: unicode searchstring, index not used. - 07-09-2003 , 06:10 AM



Quote:
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 (DOT) com.remove_this> schreef in
berichtnieuws 3F0B1A00.13F3FED0 (AT) bea (DOT) com.remove_this...
Quote:

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 (DOT) demon.nl> schreef in berichtnieuws
q60mgvos3urmdsg52bau6igmh2h3aatq1r (AT) 4ax (DOT) com...
On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <ben (AT) niethier (DOT) 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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.