Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 doing a WHERE on a string, lowercase is faster?

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2007-12-17 : 19:09:30
Hello,

Say I am doing a WHERE on a varchar(50) column.

SELECT *
from Users
where username = @username

If all of the data in the username column are lowercase, will this make the search faster?

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-12-17 : 19:14:45
SQL Server is not case sensitive by default.
Do you have any index on UserName column in the table Users?

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-17 : 19:16:12
Whether or not the data is in lowercase, uppercase, or a mix doesn't matter for performance. The storage size is still the same.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -