August 29, 2012 at 2:35 am
Can we do the selection from the Database table by creating the Table Value Function. Or shall we create the sp for that. which is better approach for performence point of view.
August 29, 2012 at 4:48 am
It really depends on what you're trying to do. The basic table valued function's nickname is parameterized view. These functions work pretty well on their own. They can be somewhat problematic if you try to treat them like a real table and join them or nest them (just like views). Where people frequently run into problems is with the multi-statement table valued user defined functions. These are very problematic constructs from a performance standpoint and you should be very careful about their use.
In general, if you don't have a need for the table valued function, I'd just use a regular old stored procedure.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply