4

Possible Duplicate:
varchar vs nvarchar performance

I have changed all nvarchar column to varchar for a hope to speed up query. but my Query now become slow. before it was running 15 sec, now run time is 26 sec.

what could make this slower? am I avoiding something?

Community
  • 1
  • 1
Shuvra
  • 213
  • 2
  • 15
  • not sure, but I think nvarchar uses up all the bytes allocated to it, padding values with spaces. – Shamim Hafiz - MSFT Jun 07 '11 at 10:20
  • nvarchar can be used to have some information stored in database for special characters and can you share the query ? – Pankaj Jun 07 '11 at 10:21
  • 3
    @Shakti Singh - or with OP's one http://stackoverflow.com/questions/6250728/nvarchar-perform-better-than-varchar –  Jun 07 '11 at 10:23

1 Answers1

2

If you show us the schema and the query, we might be able to help - my first bet would be that you have different data types in the schema and query, and that therefore you're now doing an extra type conversion somewhere. There also might be consequences from the actual data conversion you performed, your database might be more heavily fragmented than it was (or, as suggested in an answer to the other identical question you asked, your statistics might be outdated, leading to bad query plans).

Tao
  • 13,457
  • 7
  • 65
  • 76