Query execution time of 60 seconds exceeded the threshold of 10 seconds warning in CRM 2013.


Query execution time of 60 seconds exceeded the threshold of 10 seconds warning in CRM 2013.

We were getting the below warning in one of our test environment

On analyzing figured out that one of the plugin was using retrieve with ColumnSet(true) option i.e. retrieving all the columns of the entity which was not required in this case.

Fetching only the required columns fixed the warning.

The other option could have been indexing or increate the value for LongQueryThersholdInSeconds column in ServerSetingProperties table of MSCRM_Config.

Helpful posts

http://blog.edgewater.com/2013/01/07/microsoft-dynamics-crm-querying-data-using-late-binding-versus-early-binding/

http://www.dynamicscrmpros.com/mscrmplatform-warning-in-event-viewer-in-microsoft-dynamics-cr-event-id-17972/

Hope it helps..