Re: Index not used when UNICODE = true?
- From: "joeNOSPAM@xxxxxxx" <joe.weinstein@xxxxxxxxx>
- Date: Tue, 3 Jun 2008 08:05:06 -0700 (PDT)
On Jun 3, 1:44 am, MarkusM. <Mark...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,
we've an Java application which select some records from SQL Server 2005. If
connection parameter unicode is active, every select executes an full table
scan an the app is very slow (> 1hour). After changing unicode=false, the
index is used and executing is processed in seconds.
Has someone an idea for this problem?
--
Markus M.
Softwareentwickler/Software Developer
Hi. It's a long-known issue. By default, the driver will send java
character data
as java characters (16-bit). If your table is defined as varchar (8-
bit), the DBMS
can't/won't use any index, because it can't be sure it's conversion of
the 16-bit
data to 8-bit won't corrupt it. If you tell the driver to send char
data as 8-bit,
the DBMS can use varchar indexes. The other solution is to convert the
table
to NVARCHAR.
Joe Weinstein at Oracle
.
- Prev by Date: Re: Index not used when UNICODE = true?
- Next by Date: RE: JDBC Performance is no where near .NET performance (JDBC 1.2 against mssql2008)
- Previous by thread: Re: Index not used when UNICODE = true?
- Next by thread: RE: JDBC Performance is no where near .NET performance (JDBC 1.2 against mssql2008)
- Index(es):
Relevant Pages
|