I have heard that using functions such as 'convert' in stored procedures forces SQL to ignore all table indexes. Does anyone know if this is true? How can I use functions in stored procedures and be sure that table indexes are utilized?
I haven't heard that one, but if you are using a sp without parameters, then the sp will not normally be recompiled when it is run. This can cause some poor use or non use of indices, depending on how the sp was originally compiled.<br>The WITH RECOMPILE option can force the sp to be optimized every time it is run.<br>I wonder whether the implicit conversion of data types in SQL Server has any impact on the use of indices though. Anyone know? <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.