I think VB accessing stored-procedures gets better performance than writting all queries on VB code.
Is it true? I need some articles that prove it.
Thanks.
This is true. The reasoning behind this is that SQL Server misses out a stage when executing stored procedures. In-line SQL has to have an execution plan written for it before it executes. With a stored proc, the execution plan is already there.
Well....mostly true, and I'd recommend going down the SP route, although I would suggest leaving complex logic out of the database.
But bear in mind the situation where an index has a lop-sided distribution and some time it's very selective, others not. The SP will use the stored query plan which will be good for the set of parameters supplied when the query plan was created but bad in the other case. In which case the stored proc would have to be created "with recompile", which loses most of the benefit.
Not usually an issue, but always worth keeping in mind.
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.