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 2008
»
SQL Server 2008 - General
»
Performance
Performance
Rate Topic
Display Mode
Topic Options
Author
Message
tonyarp05 61903
tonyarp05 61903
Posted Friday, December 07, 2012 4:26 AM
Valued Member
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 12:34 AM
Points: 54,
Visits: 191
Hi,
I am developing one tool. I need to write to stored procedure for each and every functionality.
Should i write single and call all the functionality in that? OR I can write different Stored procedure for different functionality?
Which will give us good performance? please give idea on this
Regards,
Tony
Post #1393989
Koen Verbeeck
Koen Verbeeck
Posted Friday, December 07, 2012 5:49 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:30 AM
Points: 9,410,
Visits: 6,495
Your questions is too vague to give a decent answer on.
You can create different stored procedures for different functionality. I wouldn't want to create one single sp for everything, just out of usability, manageability and maintainability perspective.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1394019
Chris Harshman
Chris Harshman
Posted Friday, December 07, 2012 7:58 AM
SSCommitted
Group: General Forum Members
Last Login: Yesterday @ 10:26 AM
Points: 1,572,
Visits: 1,731
What you will need to balance are code reusability vs. performance. If you put too much functionality inside one stored proc, thent he query optimizer will have a more difficult time determining the best execution plan and you may have problems such as parameter sniffing creep up. I'd create different stored procedures for different functionality, as long as the functionality was on different criteria. I suppose to make more sense of this discussion you'd have to tell us what the different functionalities were, how many tables involved, etc.
Post #1394072
tonyarp05 61903
tonyarp05 61903
Posted Sunday, December 09, 2012 11:16 PM
Valued Member
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 12:34 AM
Points: 54,
Visits: 191
This tool for search the results in DB and give the output to front end.
There are lot of functionality!
1.Search(10 seperate search functionality) - can be done through 10 to 15 tables
2.Add - Can be done through near 20 tables
...
Def, I will go with different Stored procedure for each functionality
Please let me know if you can give more input.
REgards,
Tony
Post #1394464
Bhuvnesh
Bhuvnesh
Posted Monday, December 10, 2012 3:14 AM
SSCrazy
Group: General Forum Members
Last Login: Thursday, June 13, 2013 7:03 AM
Points: 2,562,
Visits: 3,453
tonyarp05 61903 (12/9/2012)
Def, I will go with different Stored procedure for each functionality
Please let me know if you can give more input.
i will suppport you for this as it will give you more readability and easiness to troubloeshoot any issue.
-------Bhuvnesh----------
While 1 = 1 (Learning SQL....)
Click to get fast response of your post
Post #1394513
« 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.