SQL Server Performance

Stored Procedures tutorial.

Discussion in 'ALL SQL SERVER QUESTIONS' started by nelsonm, Feb 9, 2012.

  1. nelsonm New Member

    Mr. Oneill,

    I'm building a customer scheduling and work order tracking online web site for a client that provides commercial and residential handyman services and it has been suggested i consider using stored procedures.

    Hence, I'm reading your tutorial on SQL stored procedures.

    You quote: " If you find yourself using the same query over and over again, it would make sense to put it into a stored procedure.".

    Well, yes i do use the same querys over and over. However, the same query is not used over and over in different areas of the web application. they are used over and over in one area each. I have php crud scripts for each database table. As an example, i have a work order php script that does crud operations on the work order, customer, technician, service items, and pricing tables for the work order grid display. That script is only used for and on the work order grid display. All other php crud scripts (customer, employee, price list ...) function the same way.

    The only script i can think of that would be used all over would be the user authorization script used to restrict access and filter data throughout the site depending on the users' login restrictions.

    So my question is... does "if used over and over" mean scripts used anywhere over and over or is the authorization script the only candidate for stored procedures?

    All reply's to this topic on whether using stored procedures are an all or nothing proposition on forums i use say i should always use stored procedures due to the benefits.
  2. Luis Martin Moderator

  3. FrankKalis Moderator

    Agreed. Also, the discussion whether to use what approach for data access is an endless one with good arguments for both sides. As long as you are consistent and fully understand the consequence of the chosen approach, I'd say go with whatever you feel more comfortable with.

Share This Page