4

I have one column that I recently converted to nvarchar(100) to store Asian characters. The other columns in this table, and the other tables in the same database, use varchar, int, bit and datetime. Since that change, some of my queries now take ten to twenty seconds to return less than fifty records. The tables store a thousand records or less.

I've read nvarchar has an associated IO performance cost with it, but this bad for such a small record set? Do I have to adopt an all or nothing approach with nvarchar (convert all varchar to nvarchar) or have I missed something obvious?

1
  • 4
    What is the query and the execution plan for one of these 10-20 second queries? Nov 26, 2012 at 18:54

1 Answer 1

3

Without knowing more details, it's impossible to tell, but you might be suffering from implicit conversion. There are a number of sites with information on the topic that you can use to help troubleshoot your particular query.

The short answer is that no, you should not need to convert all columns to nvarchar. If you are trying to join an nvarchar column to a varchar column, however, you could see a major performance impediment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.