Earlier I wrote two blog posts about Search Records with Single Quotes in two parts. Refer the blog posts over here.
Though I had clarified that all the methods displayed in these two blog posts have the exact same performance, I kept on getting question on this subject, again and again! Well, as there are so many questions, I have decided to create a quick video which demonstrates that there is no performance difference among the four methods which I have displayed earlier.
[youtube=http://www.youtube.com/watch?v=Hn9EZEH2G5c]
Action Item
Here are the blog posts I have previously written. You can read it over here:
You can subscribe to my YouTube Channel for frequent updates.
Reference:Â Pinal Dave (https://blog.sqlauthority.com)
1 Comment. Leave new
Hello Pinal, You said €œThough I had clarified that all the methods displayed in these two blog posts have the exact same performance, I kept on getting question on this subject, again and again!a To compare performance of different methods on such a small data set can result in very accurate conclusions. Looking at this method: SELECT [ProductModelID] ,[Name] FROM [AdventureWorks2014].[Production].[ProductModel] WHERE [Name] REPLACE(name, ””,”) I would never execute this over a large data set because it is not only scanning the field “namea for a character (which any method will have to do, but which should be sufficient), it will then replace the character, and it will then compare the whole field character by character with the value as it was before the change! If you were to run this over a data set of a million records, I would guess that this would take at least twice as long to execute as one of the simpler methods. Ren A Valencourt, CCP, MCTS Senior Programmer/Analyst IS Department [phone number removed for privacy reasons] (FAX) CTB CTB, Inc. A Berkshire Hathaway Company