Professional Web Applications Themes

Bad performance of a distributed stored procedure - Microsoft SQL / MS SQL Server

Hello All, I have two SQL servers (Server1, Server2) . Server1 has stored procedure that can call another procedure from Server2. The performance of the processing is very low. But if I call the same procedure from the Server2 then performance is good. Could anyone explain how to find out the reason of the bad performance of the procedure started on Server1? Or please say how to track the reason of the bad performance. Thanks. Please e-mail com...

  1. #1

    Default Bad performance of a distributed stored procedure

    Hello All,


    I have two SQL servers (Server1, Server2) . Server1 has stored procedure
    that can call another procedure from Server2. The performance of the
    processing is very low. But if I call the same procedure from the Server2
    then performance is good.

    Could anyone explain how to find out the reason of the bad performance of
    the procedure started on Server1? Or please say how to track the reason of
    the bad performance.
    Thanks.


    Please e-mail com



    msnews.microsoft.com Guest

  2. #2

    Default Re: Bad performance of a distributed stored procedure

    Are you using any joins in your SP, which involves two tables from two
    different servers?

    If yes, then the SP will execute faster on the server which owns the table
    with large data used in join.

    Typically what happens is when you use join query on a local table and
    remote table , then all the data from the remote table is transferred to the
    local server and the join is executed. If both tables are small(less than
    10000 rows) , then you wouldn't be able to notice any significant
    performance difference. On the other hand , if remote table is having more
    rows then the SP executes very slow on the local server.

    HTH,
    Praveen Maddali

    "msnews.microsoft.com" <com> wrote in message
    news:phx.gbl... 


    praveen Guest

  3. #3

    Default Re: Bad performance of a distributed stored procedure

    There is no distributed query. The query on Server1 does not have joins with
    tables on Server2.
    I just launching SP1 on the Server1 that call SP2 of Server2. All joins in
    SP2 are within Server2 tables environment.

    "praveen" <stph.net> wrote in message
    news:phx.gbl... 
    the [/ref]
    Server2 [/ref]
    of [/ref]
    of 
    >
    >[/ref]


    Vik Guest

  4. #4

    Default Re: Bad performance of a distributed stored procedure

    In that case, try executing the query using OPENQUERY(). See BOL for
    details.

    Gert-Jan


    Vik wrote: 
    > the [/ref]
    > Server2 [/ref]
    > of [/ref]
    > of 
    > >
    > >[/ref][/ref]
    Gert-Jan Guest

Similar Threads

  1. new 2 stored procedure
    By emmim44 in forum Coldfusion Database Access
    Replies: 19
    Last Post: March 29th, 09:27 PM
  2. Stored Procedure Performance
    By Joe Pacelli in forum Coldfusion Database Access
    Replies: 5
    Last Post: May 10th, 05:14 PM
  3. Stored Procedure Help
    By Jack in forum Microsoft SQL / MS SQL Server
    Replies: 7
    Last Post: July 14th, 06:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139