function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tom H.Tom H. 

SOQL Performance Tuning

I am looking for a document that explains how to analyze and tune SOQL queries. Does anyone know of a good doc that explains the best approach and describes tools that can help with the analysis?  Also, are there any tools like some that you get with major RDBMS products that can tell me details about query paths, physical disk io, logical disk io,....  Finally, I am looking for information on tactics to help improve performance of a query.  Any help would be appreciated.

 

Thanks

sebcossebcos

Hi Tom,

I have found some good tips on SOQL here:

http://th3silverlining.com/2010/05/10/the-salesforce-handbook/

 

Though, the book is not all about performance you could find some useful information about other aspects of force.com development as well.

From the blog of one of the authors of the book:

http://blog.jeffdouglas.com/2010/10/21/force-com-programming-best-practices/

 

As for tools, with Spring '11 the system log console has been enhanced to include the duration and composition of a request, please search for "system log console" in the online help for details.

Tom H.Tom H.

Thanks for your reply.  You are right, the web console shows me the SOQL query and the duration of the query.  However, what I am looking for is the type of info that Oracle, DB2 or some of the other RDBMS products give.  Is there, for instance, a way to see the query plan (i.e.  information about indexes used), the number of physical IO reads, the number of logical IO reads, table scanning,....

forecast_is_cloudyforecast_is_cloudy

Those kind of metrics/details are not currently made available by Salesforce.