Summer ’14 Feature Alert: Query Plan Tool

In the Salesforce’s Summer ’14 release, a new feature is being added to the Developer Console that is going to change the way you work on SOQL queries. The Query Plan Tool will give every developer insight on any individual query’s performance metrics. We all know one of the most time consuming activities in programming is interacting with a database, and this tool will give insight in how to make those interactions as fast as possible.

Enable Query Plan Tool

By default, this tool is not enabled. You need to turn it on through Help > Preferences in the Developer Console.

This will open up the Preferences menu. At this point, it is as simple as selecting the checkbox to enable the feature.

Use Query Plan Tool

As soon as you activate the Query Plan Tool, you will notice that the Query Editor now has a new button beside Execute labeled Query Plan.

At this point, it is as simple as using the Query Editor like you typically would, inserting a SOQL query into the designated field. The main difference is when you go to run the tool, instead of hitting Execute, hit Query Plan. In my case I am testing the following query:

SELECT Name FROM Account

As a result, you should get a popup that looks like:

As you can see, all of these results relate directly to the results returned by the Query Resource Feedback Parameter logic that is available through the REST API. Now, I won’t go into too much detail regarding how all of that actually works because it has already been done tremendously well by both Chris Peterson and John Tan. The main idea behind this tool is that it should allow you to gain some insight in how the Force.com Query Optimizer works, thus giving you a better idea of how to optimize your own SOQL queries for better performance. For a detailed, in depth look at how these results will allow you to tweak your SOQL performance, please reference the following:

No comments yet.

Leave a Comment