Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> NVARCHAR2 for unicode database
We use a third party software. To enable multilingual support, we use
unicode database: AL32UTF8 as character set, and AL16UTF16 as national
character set.
When I monitor the performance of the database, I notice the following query doesn't use the index on clientusername. select * from client where clientusername = N'testuser';
If I get rid of N, it starts to use the index. The datatype of CLIENTUSERNAME is VARCHAR2(32) .
I have two questions.
1. Why doesn't CBO use index on clientusername?
It appares that Oracle implicitly add TO_NCHAR on clientusername.
2. "A national character set is an alternate character set that enables you to store Unicode character data in a database that does not have a Unicode database character set." We have chosen AL32UTF8 as character set. Is there any reason we need to use Unicode String Literals(N)?
Thanks,
Bin
Received on Thu Mar 18 2004 - 22:22:29 CST