I want to know the top 10-20 Store procedures used in the table.

Hello All, 
There are total 3500+ Store procedures created in the server. So,  I want to know the top 10-20 Store procedures used in the table. Like which store procedures are important and what are they, is there any code to find them? 
I think the question might be very silly, but i don't know which store procedure to look at it. 
Please help me on this issue.
Thanks.
Thanks, Shyam.

By what? CPU? Memory? Execution count?
Glenn Berry wrote this
-- HIGH CPU ************
      -- Get Top 100 executed SP's ordered by execution count
      SELECT TOP 100 qt.text AS 'SP Name', qs.execution_count AS 'Execution Count',  
      qs.execution_count/DATEDIFF(Second, qs.creation_time, GetDate()) AS 'Calls/Second',
      qs.total_worker_time/qs.execution_count AS 'AvgWorkerTime',
      qs.total_worker_time AS 'TotalWorkerTime',
      qs.total_elapsed_time/qs.execution_count AS 'AvgElapsedTime',
      qs.max_logical_reads, qs.max_logical_writes, qs.total_physical_reads, 
      DATEDIFF(Minute, qs.creation_time, GetDate()) AS 'Age in Cache'
      FROM sys.dm_exec_query_stats AS qs
      CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt
      WHERE qt.dbid = db_id() -- Filter by current database
      ORDER BY qs.execution_count DESC
      -- HIGH CPU *************
      -- Get Top 20 executed SP's ordered by total worker time (CPU pressure)
      SELECT TOP 20 qt.text AS 'SP Name', qs.total_worker_time AS 'TotalWorkerTime', 
      qs.total_worker_time/qs.execution_count AS 'AvgWorkerTime',
      qs.execution_count AS 'Execution Count', 
      ISNULL(qs.execution_count/DATEDIFF(Second, qs.creation_time, GetDate()), 0) AS 'Calls/Second',
      ISNULL(qs.total_elapsed_time/qs.execution_count, 0) AS 'AvgElapsedTime', 
      qs.max_logical_reads, qs.max_logical_writes, 
      DATEDIFF(Minute, qs.creation_time, GetDate()) AS 'Age in Cache'
      FROM sys.dm_exec_query_stats AS qs
      CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt
      WHERE qt.dbid = db_id() -- Filter by current database
      ORDER BY qs.total_worker_time DESC
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • I want to know the table name and field name of this description

    i want to know the table name and field names of this description
    supplieriddomain

    Hi SV,
    Try this:
    1) Go to SE15 (Repository info system)
    2) Expand ABAP Dictionary
    3) Expand Fields
    4) Click on Table Fields
    5) Enter the field name you want to search in field name or use wild cards with keywords in short decription field (like supplier ) and Execute.
    OR
    If it's a screen field, do a F1 on the field and click on Technical information on the help window popped up from Menu..this will tell you the field name along with structure or table name.
    Hope this helps you.
    Regards,
    Vivek

  • I want to know the table name and field names of this descriptions

    i want to know the table name and field names of this descriptions
    FPAApprover.UniqueName,FPAApprover.PasswordAdapter

    Hi Ramana,
    Go to the system table DD03T , use the table contents..
    In the field ' DDTEXT ' , give your keywords...
    for ex : say Unique name... as  UniqueName* in field DDTEXT
    Execute.. u will find the entries....
    May be ur problem will be solved...
    Thank u...
    Reward if useful and close the thread..
    Rajiv

  • Want to know the tables of a particualr transaction code

    Hi,
    whatz the technique of knowing the tables of a particular transaction code.
    I have got a tcode - va01.
    Want to know the tables of this transaction code.
    How...?

    Hi,
    If you want know about transaction code table details
    1. Enter Tcode 'ST05' (SQL Trace on), You can find how many tables are involved in the tcode
    2. Goto SE93, enter VA01 and find the program name, Go to object browse (se80) and enter program name and find out how many tables are invloved (Another way go to search- Give search term 'Tables' -> there u can find the tables involved.
    Regards
    Bhupal Reddy

  • Want to know the table names as well as number of rows

    hi...every one.....i want to explain more in detail to previous thread i have posted.
    actually i need to display all the table names and number of rows for each, in a schema(like AP,HR,....)
    it's must that i should do it by using a stored procedure.
    so the best way for this would be by using cursor and loop.
    so please help me in solving this question.

    i need to display all the table names and number of rows for each, in a schema(like AP,HR,....)
    it's must that i should do it by using a stored procedure.Homework ?
    Anyway, try this
    SQL> create or replace procedure count_rows
      2  is
      3     nrows   number;
      4     str     varchar2(100);
      5  begin
      6     for T in (select table_name from user_tables
      7                     order by table_name)
      8     loop
      9             str := 'select count(*) from '||T.table_name;
    10             execute immediate str into nrows;
    11             dbms_output.put_line(T.table_name||'  '||nrows);
    12     end loop;
    13* end;
    SQL> /Don't forget to "set serveroutput on" when you execute it.

  • I have a value 'JPM'.wants to know the table containing this value.

    My application is throwing error becouse of one of the value (JPM) .
    Can i know which table has this value.
    I cannot use USER_TABB_COLUMNS since i dont know the COLUMN_TYPE.
    i dont know wat kind of field is this.
    the schema is not big and it contains approx. 500 objects.
    Kindly suggest.

    Mysterious. This is why I dislike dynamic SQL: you can't tell whether it's really going to work until you run it. All I can suggest is some debugging. I don't really like to encourgae the use of the Devil's Debugger, but you can change the inner loop to show which column it's about to execute and hence try to figure out what goes wrong when it fails....
    SQL> DECLARE
      2     n NUMBER;
      3  BEGIN
      4      FOR r IN ( SELECT owner, table_name, column_name
      5                 FROM all_tab_columns
      6                 WHERE  data_type IN ('CHAR', 'VARCHAR2')
      7                 AND   owner = 'A'
      8                 AND    data_length >=3 )
      9      LOOP
    10          dbms_output.put_line(r.owner||'.'||r.table_name||'.'||r.column_name);
    11          EXECUTE IMMEDIATE
    12              'select count(*) from '||r.owner||'.'||r.table_name||
    13              ' where '||r.column_name||' = ''JPM''' INTO n;
    14          IF n != 0 THEN
    15              dbms_output.put_line('FOUND='||r.owner||'.'||r.table_name||'.'||r.column_name);
    16          END IF;
    17      END LOOP;
    18  END;
    19  /
    A.DEPTREE.TYPE
    A.DEPTREE.SCHEMA
    A.DEPTREE.NAME
    A.IDEPTREE.DEPENDENCIES
    A.T1.COL2
    A.TEO.WHATEVER
    A.TT1.COL1
    PL/SQL procedure successfully completed.
    SQL> Cheers, APC

  • I want to know the tables in FI for my report requirement

    I have a requirement to develop a report which contains selection-screen as
    Company code ---
    G/L Account     o 305400
                           o 305500
    Period              --- to ---
    305400 is stock-excess
    305500 is stock-shortage
    if user enters company code,selects first radiobutton and enters period as 11 to 12 it should display all the Reference documents with date,reference document(4900066123), material, plant, qty, value(6999.33)
    please go through FS10N
    my requirement is same like this tcode
    but my report should display all the reference documents((4900066123)) with amounts in single screen not the total amount for G/L account(305400)
    can any one tell me from which tables i have to pull the data
    the tables which have relation between g/l account and reference document and period
    thanks & regards
    Pradeep Reddy.M

    Hi,
    U can find all d details regarding FI tables & their relations here....
    http://www.sapgenie.com/abap/tables_fi.htm
    You can find the details about the FI module here
    http://www.sap-img.com/sap-fi.htm
    Thanks,
    Sankar M

  • Want To Know The Name OF Company Table

    In Administration -> Choose Company, It gives me the list of all Company Name,Database Name,Version etc .
    I Want to know the Table Name which has all information about company name and all.
    Regards

    The db version is stored in table CINF (Version). Others information gave you members already. If you want have list of all dbs on the server like in login screen, you should use select from information schemas as
    select * from information_schema.tables where table_name = 'CINF'
    and youll receive all databases, where the CINF table is, then create tmp table (dbname, company, version fields) and in cursor go through all results from select * from information_schema.tables where table_name = 'CINF'
    make insert into this tmp table. At the end make select from this tmp table.

  • I bought whatsup on 5th of june and my account has been debited for INR 60.  Today(8th june) again my account has been debited for INR 55.  I want to know the reason behind it?

    i bought whatsup on 5th of june and my account has been debited for INR 60.  Today(8th june) again my account has been debited for INR 55.  I want to know the reason behind it?

    You could go to the app store on your phone then tap on the update button bottom right then tap on purchases at the top and see what has been bought on your phone also you could goto itunes in you romputer and click on your account once itunes store has been selected from the left then click on account and enter your password and scroll down to Purchase history and click on "see all" and have a look at recent purchases

  • I want to know the size of my drive.

    I want to know the size of my drive or folder like I used to at the bottom of the window. But since installing Lion that's vanished ?? Elp...
    It used to be indicated at the bottom of my windows, size, amount of files etc. How do I switch this back on ?
    I can't see it, elp me
    Isabella

    Tony, you are a genius who doesn't waste time on words, just deeds.......... Top marks from me !

  • I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    There probably is, but it requires that you be able to use punctuation and write in sentences so that we can understand exactly what you want.
    You can block others from using your Apple ID by changing your password.  There is no way to erase what was already downloaded on to someone else's device, for obvious reasons,

  • I purchased CS5 Design Standard about 5 years ago. Now I am trying to install  second PC, but I got a message like " This serial number is not correct."  I want to know the correct serial number, but I missed my ex adobe ID because I've changed my E-mail

    I purchased CS5 Design Standard about 5 years ago. Now I am trying to install  second PC, but I got a message like " This serial number is not correct."  I want to know the correct serial number, but I missed my ex adobe ID because I've changed my E-mail address.

    It is not clear to me what your issue is with not being able to sign in to your Adobe account to find the serial number.  You should still be able to sign in and find your serial number if you registered the software.
    If your first PC is a Windows machine you might be able to extract the serial number from it using the Belarc Advisor
    http://www.belarc.com/free_download.html

  • I want to know about time machine if i can use the hard drive that i use for time machine back up as a normal hard drive too or if it's only for time machine

    I want to know about time machine if i can use the hard drive that i use for time machine back up as a normal hard drive too or if it's only for time machine
    and if it yes i want to know if i have 1TB hard disk to use the 500gb for time machine and the other 500gb for normal use

    thank you very much because i am considering to buy the porsche design hard disk 1TB and i want to have it for normal use and for time machine is a pitty to give 1TB for back up only again thanks and i know seperate the back and the working jobs are better but the i have to have 2 hardisks and i want only 1

  • How do i connect my macbook pro to another screen (a fujitsu siemens) i got the cable for it but i want to know the settings so i transfer desc to the fujitsu screen.

    How do i connect my macbook pro to another screen (a fujitsu siemens) i got the cable for it but i want to know the settings so i transfer desc to the fujitsu screen.

    Welcome to Apple Support Communities
    If you have the cable, just connect it to both and the desktop will show up on the external display. Then, you can select different modes, changing arrangement in System Preferences > Displays > Arrangement, or using shortcuts > http://support.apple.com/kb/ht5019

  • Hi I want to buy an unlocked iPhone 5in the Middle East. I want to know if I will be able to use my iPhone and all its applications when we go back to live in the US for long term.

    Hi I want to buy an unlocked iPhone 5 in the Middle East. I want to know if I will be able to use my iPhone and all its applications when we go back to live in the US for long term.
    Thank you

    Apple Online Store sells unlocked iPhone in the following countries: Australia, Austria, Belgium (French, Dutch), Brazil, Canada (English, French), China, Czech Republic, Denmark, Finland, France, Germany, Hong Kong (English, Chinese), Hungary, Ireland, Italy, Luxembourg, Malaysia, Mexico, New Zealand, Netherlands, Norway, Poland, Portugal, Singapore, Spain, Sweden, Switzerland (French, German), Taiwan, Thailand, United Arab Emirates, United Kingdom, and United States.
    You can probably be absolutely sure any other source will be carrier locked
    It also appears that only Zain offer unlocking (of all the ME carriers )  in Jordan and Bahrain
    A ME iPhone 5  ( A1429 GSM )will not  work on US LTE when you return 

Maybe you are looking for

  • How to share my ical to my ipod

    I don't know how to share my iCal from my MacBook Air with my iPod (sincronize), please help

  • Can't close multiple open documents

    I have Lion, and all the iWork updates. Try as I might I cannout seem to get Pages to STOP opening the last 10 documents I was working on. I have tried the System Preferences for Mission Control and rebooted and UNselecting "open with windows" or wha

  • RAC Interconnect performance

    Hi, We are facing RAC Interconnect performance problems. Oracle Version: Oracle 9i RAC (9.2.0.7) Operating system: SunOS 5.8 SQL> SELECT b1.inst_id, b2.value "RECEIVED", b1.value "RECEIVE TIME", ((b1.value / b2.value) * 10) "AVG RECEIVE TIME (ms)" FR

  • 3d rotating tool in flash cs6

    I created a simple windmill which helix is slighly off angle, to create 3d perspective, so i use z control in 3d rotating tool, or any possible other way to make this helix rotate,which works perfecly fine, until it comes time to put this in a motion

  • Elements premiere 12 trial not accessible with windows 8.1

    elements premiere 12 trial not accessible with windows 8.1