Size of triggers and stored-procs

Size of triggers and stored-procs

Post by Sangeeth » Sat, 31 Oct 1998 04:00:00



Hi ,
        I too wanted to know about the stored procedure size.This mail
was helpful.It would be great if U could
let me know,if it the size is in  KB or pages.

Thanks in advance
Sangeetha


   >
   > Hi,
   >
   >   How can the size of the SP & trigger be computed ?
   >
   >   We checked with sp_spaceused <obj_name>, the response was
   >
   >   'object stored in "sysprocedures" and no space is allocated
directly
   > "  '
   >
   >  Is there any freeware available to compute the size of the sp,
trigger
   > & table?
   >
   > - Bhanu

   From the Sybooks Performance and Tuning Guide:

   To get a rough estimate of the size of a single stored procedure,
view,
   or trigger, use:

   select(count(*) / 8) +1

       from sysprocedures

   where id = object_id(" procedure_name")

   For example, to find the size of the titleid_proc in pubs2:

   select(count(*) / 8) +1

       from sysprocedures

   where id = object_id("titleid_proc")

   -----------

             3
   --

   -----------------------
   Shawn Enderlin, DBA

   Holiday Companies

 
 
 

Size of triggers and stored-procs

Post by Bret Halfor » Sat, 31 Oct 1998 04:00:00


It is a very rough calculation, but the result should be interpreted as
2Kb pages.  "select count(*)" gives the number of rows.  Sysprocedures
rows can vary in length from 14 to 280 bytes; the forumula is assuming 8
rows per page.


> Hi ,
>         I too wanted to know about the stored procedure size.This mail
> was helpful.It would be great if U could
> let me know,if it the size is in  KB or pages.

> Thanks in advance
> Sangeetha



>    > Hi,

>    >   How can the size of the SP & trigger be computed ?

>    >   We checked with sp_spaceused <obj_name>, the response was

>    >   'object stored in "sysprocedures" and no space is allocated
> directly
>    > "  '

>    >  Is there any freeware available to compute the size of the sp,
> trigger
>    > & table?

>    > - Bhanu

>    From the Sybooks Performance and Tuning Guide:

>    To get a rough estimate of the size of a single stored procedure,
> view,
>    or trigger, use:

>    select(count(*) / 8) +1

>        from sysprocedures

>    where id = object_id(" procedure_name")

>    For example, to find the size of the titleid_proc in pubs2:

>    select(count(*) / 8) +1

>        from sysprocedures

>    where id = object_id("titleid_proc")

>    -----------

>              3
>    --

>    -----------------------
>    Shawn Enderlin, DBA

>    Holiday Companies

--
Bret Halford                    Imagine my disappointment
Sybase Technical Support        in learning the true nature            
3665 Discovery Drive            of rec.humor.oracle...
Boulder, CO 80303

 
 
 

1. Accepting Dynamic Size of Parameters in Stored Procs

Hello,
Does anyone have any experience or knowledge of being able to send an
unlimited amount of parameters to a stored proc and having the stored proc
detect how many parameters were sent?

Example:
1) calling the stored proc with 2 strings:
exec sp_myproc "al","davis"

2) calling the stored proc with 7 strings:
exec sp_myproc "a","b","c","d","e","f","g"

The following sp_myproc would need to be able to support an unlimited amount
of parameters as well as detect how many were sent...

Thanks in advance for any help and/or code samples given!

-- Al

2. How to Tell VB & Ado to not stop on error?

3. Size of stored procs in SQL-7

4. Pdox7 Win95 to Pdox7Win3.1 Problem

5. sp_refreshviews for Stored Procs and Triggers?

6. a join question

7. Stored Procs vs. Triggers

8. Point-in-polygon spatial queries

9. Triggers, Stored Procs and Remote Data

10. Deferred name resolution in stored procs and triggers but not views

11. Need assistance with a trigger and stored procs

12. Error 1203 and Stored Procs from Triggers

13. renaming database in views,triggers, and stored procs