Re: Max Number of Stored Procs in 1 Database (sql server 200)

From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 11/29/04


Date: Mon, 29 Nov 2004 08:43:33 +0100

On Sun, 28 Nov 2004 16:19:03 -0800, we7313 wrote:

>Whats the maimum number of stored procedures you can have in one database?
>Would I notice any performance degredation if I had over 2,000?

Hi we7313,

There is no seperate maximum for number of stored procedures, but there is
a maximum number of object. From Books Online:

"Database objects include all tables, views, stored procedures, extended
stored procedures, triggers, rules, defaults, and constraints. The sum of
the number of all these objects in a database cannot exceed 2,147,483,647"

I never noticed any performance degradation on increasing the number of
stored procedures. If you take very exact measurements, you might see a
small performance degradation because of increased number of recompiles
(if a stored procedure is executed, the execution plan is generated and
stored in cache; if it is rerun later the cached plan is used, but the
cache size is limited).

Best, Hugo

-- 
(Remove _NO_ and _SPAM_ to get my e-mail address)


Relevant Pages

  • Re: Newbie: Stored Procedures and Or Datasets ?
    ... >the proc is executed for the first time, the execution plan is then cached ... whole lot of advantages over a standard ad-hoc T-SQL ... An Evaluation of Stored Procedures for the .NET Developer ... SQL Server, execution plans are cached for all T-SQL batches, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Handling data relations in Gridview
    ... same functionality is to use stored procedures for the CRUD interface ... generation, and about the cache you mentioned, if the whole data is not ... Categories;select ProductID, ProductName, CategoryID from Products"; ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Confused about proc vs. dynamic SQL vs LINQ
    ... stored procedures are going to be faster than ... performance from dynamic sql (sql that you generate on the client and ... as well as if the queries are the same and a number ... another execution plan would be faster because statistics changed. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Performance Tool Question
    ... tool has a performance-optimizer ... Open a new window in query analyzer and type execute myprocedurename (type ... The execution plan will show all scans to be performed and will give hints ... > I am looking for a tool that will help optimize TSQL and Stored Procedures ...
    (microsoft.public.sqlserver.server)
  • Re: Stored proc recompilation
    ... There are other benefits to using stored procedures than just reusing the ... you have no choice but to generate a new execution plan each ... Jacco Schalkwijk ... "Chuck Urwiler" wrote in message ...
    (microsoft.public.sqlserver.programming)