Advertisements
Home > CRM 2011, Plug-Ins > “Query execution time exceeded the threshold” error in Plugins

“Query execution time exceeded the threshold” error in Plugins

Hi,

In one of my requirement I was accessing SSRS service API from my plugin to render and read the report

When the plugin execute the code, I was neither getting the expected result nor any error.

To troubleshoot the problem I open the event viewer and I got a warning stating below

Query execution time of 30.1 seconds exceeded the threshold of 10 seconds. Thread: 30; Database: orgname_MSCRM

Reason :- 

  • My plugin registered on Post Update of Account
  • In my plugin, I was rendering and reading a report which has dataset with “Select * From Account”
  • So the problem is with DB lock
    • On update of ‘Account’, a lock establish
    • In the Plugin code, when I try to render report it tries to execute “Select” statement on “Account” we get the above error

Fix :-

  • I modified my Select statement in report dataset with “No Lock” statement

             i.e., Select * From Account (nolock)

🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: