Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2006, 10:48 AM
Authorized User
 
Join Date: Dec 2005
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default Stored Procedure Overkill?

I'm re-writing a couple of different Web-based apps using techniques I've learned over the past year, one of which is using stored procedures for increased scalability and security.

My question is: Is it overkill to convert [u]every single</u> query in my apps to stored procedures? That's my current goal, but I wonder just a bit if it's necessary for the smaller queries.

 
Old February 3rd, 2006, 11:34 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

For a web app, I'd put them all in stored procs. It may seem like an overkill, but it adds a layer of security because your SQL is now on the backend, protecting the db schema.

 
Old February 3rd, 2006, 12:53 PM
Authorized User
 
Join Date: Dec 2005
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default

Cool, thanks. It's good to know I'm not over doing it.

Any thoughts on what I'll see in terms of increased responsiveness and scalability as a result of these efforts?

 
Old February 3rd, 2006, 01:07 PM
Friend of Wrox
 
Join Date: Feb 2006
Posts: 133
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav_jain2403
Default

Using Stored_Procedure increases the performance and scalability. If we use it, DataBase will not have to convert the query in a way which it can understand. Procedure takes less time.
 
Old February 3rd, 2006, 04:31 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

It also add to the maintanence aspect of it. Suppose you don't convert all of the queries and leave some simple ones in some pages, then some table structures change(they shouldn't) or you need to pull different data. Now you would have to change the sql on every page. With SPs, you just change the code in one place.

Jim






Similar Threads
Thread Thread Starter Forum Replies Last Post
Stored procedure ashuphp MySQL 1 April 2nd, 2007 04:20 PM
Stored Procedure jezywrap SQL Server ASP 1 January 3rd, 2007 12:29 AM
stored procedure kdm260 SQL Server 2000 2 June 19th, 2006 04:45 PM
Help About Stored Procedure zhuge6 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 May 20th, 2005 09:27 AM
Stored Procedure help flyin SQL Server 2000 4 August 3rd, 2004 07:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.