http://people.apache.org/builds/geronimo/server/binaries/2.1/
-Donald ericp56 wrote:
Hello, I have a large table with a varchar(16) PK field. Using Geronimo JPA, thequery being generated by JPA is something like:declare @P0 nvarchar(4000) select @P0 = '1234567890'SELECT t0.field1 /*THE PK FIELD which is varchar(16)*/, t0.field2 FROM dbo.history t0 WHERE t0.field1 = @P0Instead of using the index (seek) , the conversion of varchar(16) to nvarchar(4000) causes a full index scan, which is painfully slow (2 seconds, should be in milliseconds). I tried using the @Column annotation, but that didn't change anything - @P0 is still nvarchar(4000) I tried using a named query, but it only allows basic SQL. I tried a native query, but the casting of the result fails. Any suggestions?
smime.p7s
Description: S/MIME Cryptographic Signature
