Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Performance Tuning
»
selection from db table using function or sp....
selection from db table using function or sp.
Rate Topic
Display Mode
Topic Options
Author
Message
nitin.varshney
nitin.varshney
Posted Wednesday, August 29, 2012 2:35 AM
SSC Rookie
Group: General Forum Members
Last Login: Wednesday, June 12, 2013 11:28 PM
Points: 27,
Visits: 116
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.
Post #1351469
Grant Fritchey
Grant Fritchey
Posted Wednesday, August 29, 2012 4:48 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 1:06 AM
Points: 13,437,
Visits: 25,282
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
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1351511
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.