This topic has been reported for inappropriate content


Diagnosing and Resolving High Remote Query Costs in Local Stored Procedure Execu

  • When a remote query consumes 99% of the cost of a local stored procedure (SP) execution, it suggests that the remote query is the primary bottleneck. This could be due to inefficient query execution, high data transfer overhead, or suboptimal database design. Here's a detailed explanation and potential steps to address this issue:

    Understanding the Issue

    Remote Query Execution:

    When a stored procedure involves querying a remote server, the query is executed on that server, and results are returned to the local server.

    If the remote query is complex or poorly optimized, it can consume significant resources.

    Data Transfer Overhead:

    Fetching large volumes of data over the network can increase execution cost, especially if only a small subset of data is needed.

    Local Processing:

    If the local server performs additional filtering, sorting, or aggregation after receiving the data, this adds to the cost.

    Indexing Issues:

    Missing or inefficient indexes on the remote tables can lead to full table scans, further increasing cost.

    Query Plan Suboptimality:

    Query execution plans may not be optimized for distributed queries, leading to inefficient operations.

  • You've described the scenario, but I don't see much in the way of solutions. Do you have a question? If not, expand this out, provide some solutions, and submit it to Steve as an article. He'll publish it (and you'll get paid a stipend for writing it).

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply