I have a situation where I can use ToUpper() in codebehind or I can use Upper of SQL in the stored procedures. It got me thinking as to using which would be better? I don’t think it will be a major performance improvement, but I would like to know using which would be better and when
Share
I’m one of those, Database should only do data kind of guys. Personally, I would prefer ToUpper() in C# because that’s where your logic belongs not in the database. The only performance hit would be having to parse the toupper in the sql but I’m pretty sure that SPROC’s get optimized so there might not even be a difference as far as I can tell.
From my experience, don’t make the DB work harder than it has to, doing a lot of these operations will probably show performance hits on the database (for a large amount of strings, probably negligible for small amounts)