Professional Web Applications Themes

unicode searchstring, index not used. - Oracle Server

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...

  1. #1

    Default unicode searchstring, index not used.

    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


    ben brugman Guest

  2. #2

    Default Re: unicode searchstring, index not used.

    On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <benniethier.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
    Sybrand Bakker Guest

  3. #3

    Default Re: unicode searchstring, index not used.

    >
    > 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 <gooiditwegsybrandb.demon.nl> schreef in berichtnieuws
    [email]q60mgvos3urmdsg52bau6igmh2h3aatq1r4ax.com[/email]...
    > On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <benniethier.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

    ben brugman Guest

  4. #4

    Default Re: unicode searchstring, index not used.



    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 <gooiditwegsybrandb.demon.nl> schreef in berichtnieuws
    > [email]q60mgvos3urmdsg52bau6igmh2h3aatq1r4ax.com[/email]...
    > > On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <benniethier.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
    Joseph Weinstein Guest

  5. #5

    Default Re: unicode searchstring, index not used.

    >
    > 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 ([url]http://www.inetsoftware.de/[/url])
    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_thisbea.com.remove_this> schreef in
    berichtnieuws [email]3F0B1A00.13F3FED0bea.com.remo[/email]ve_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 <gooiditwegsybrandb.demon.nl> schreef in berichtnieuws
    > > [email]q60mgvos3urmdsg52bau6igmh2h3aatq1r4ax.com[/email]...
    > > > On Tue, 8 Jul 2003 16:44:57 +0200, "ben brugman" <benniethier.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
    >

    ben brugman Guest

Similar Threads

  1. Settle a debate - to index or not to index?
    By Duke Ionescu in forum MySQL
    Replies: 1
    Last Post: March 23rd, 05:02 AM
  2. Replies: 4
    Last Post: August 3rd, 03:11 PM
  3. Index Topics and Index References
    By Tom_Cusick@adobeforums.com in forum Adobe Indesign Windows
    Replies: 2
    Last Post: July 8th, 07:20 PM
  4. Newb query: index.htm & index.php & the server default
    By Lab309 in forum PHP Development
    Replies: 7
    Last Post: September 22nd, 02:08 PM
  5. Create index VS Set Index Enabled - IDS 7.31
    By Stéphane Gadoury in forum Informix
    Replies: 2
    Last Post: July 21st, 02:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139