Normalization of Strings With String.ToUpperInvariant()

后端 未结 3 499
离开以前
离开以前 2021-01-02 07:16

I am currently storing normalized versions of strings in my SQL Server database in lower case. For example, in my Users table, I have a UserName and a LoweredUserName field

3条回答
  •  一生所求
    2021-01-02 07:49

    To answer your first question, yes Microsoft is a bit inconsistent. To answer your second question, no do not switch anything until you have confirmed that this is causing a bottleneck in your application.

    Think how much forward progress you can make on you project instead of wasting time switching everything. Your development time is much more valuable than the savings you would get from such a change.

    Remember:

    Premature optimization is the root of all evil (or at least most of it) in programming. - Donald Knuth

提交回复
热议问题