September 14th, 2012, 04:15 AM
TSQL / View / SQL?
Could you please advise the difference in efiificeny between these three options.
1. a SQL command is executed within code using joins to retrieve a recordset
2. a Stored Procedure (TSQL) - is executed from within code which has the same joins and returns the same recordset
3. a table view is created of these SQL joins and a SQL command is executed to retrieve the recordset via the table view.
This is all via a locally running web application directly accessing SQL via a DSN.
September 14th, 2012, 10:11 AM
2 should be marginally faster than 1 or 3
but that margin is so small, you prolly won't be able to measure it
September 14th, 2012, 12:04 PM
That's what I thought, so the reasoning being given for the requirement of the views doesn't add up.
Thanks for your input, have a great weekend.
September 14th, 2012, 12:25 PM
"which would bring with it performance benefits" -- um... no