Do you have a SOQL query or a report that takes a long time to complete because you are querying data from an object that has tens of millions of rows, yet your business requirements won’t allow you to add a selective filter? Read on to learn more about sort optimization, a simple technique that many developers and architects overlook when applying SOQL performance tuning best practices.
Tag Archives: SOQL
Building efficient SOQL queries, reports, and list views depends on selectivity and indexes, especially when your objects have some serious record counts. Previous resources teach you how the Force.com query optimizer makes decisions, including information about selectivity thresholds for filter conditions. But how can you put this knowledge into practice? This post gives you some simple, practical steps for gauging the selectivity of your filter conditions–before you actually use those conditions in your queries.
If you have sales representatives closing opportunities, support representatives working through a list of cases, or even managers running reports, you’ll want to optimize query performance in your Force.com applications. In saleforce.com’s multitenant environment, the Force.com query optimizer does its own kind of optimization, generating the most efficient SQL from your SOQL, reports, and list views. This blog post explains the filter conditions and the Force.com query optimizer thresholds that determine the selectivity of your queries and affect your overall query performance.
Do you use a long list of filters in your reports or SOQL statements to exclude “noisy” data from your query results? Do you wonder why your requests take so long to run, even when they return only a few hundred rows? You might be able to overcome your performance issue with indexed formula fields, which this blog post explains in detail.
If you’ve built an application on the Force.com platform, you want to deliver a great experience to your users. But how can you tell if your applications are performing well and will continue to perform well? Using the Developer Console, you can use “performance profiling” to identify and fix performance hotspots, and ensure that your applications are both fast and scalable.
Best practices for building Salesforce SOQL queries on large data volumes (LDV) included avoiding filtering on fields with nulls, and formula fields. If you’re implementing new queries—or want to clean up some of the workarounds you implemented prior to the Winter ’13 release—consider these updates related to filtering on nulls and formula fields.
In Winter ’13, you can now use the SOQL polymorphism feature via the new TYPEOF clause to do complex queries on polymorphic fields in a single call. Read more to learn how this feature can make your queries more powerful, easier to understand, and easier to manage.
Permission sets make salesforce.com admin’s lives easier by assigning permissions to users with more granularity than what a profile already provides. Using SOQL enables admins to view those permission assignments across their user’s profile and permission sets.
The SOQL Pagination feature is now generally available in Summer ’12. This feature includes the new OFFSET clause used in Salesforce Object Query Language (SOQL) queries. What exactly does OFFSET do, you might be wondering? OFFSET lets you specify a number of rows to skip in the returned data. So, for example if a SOQL […]
The Developer Console is quickly becoming the easiest and most powerful place to work with Apex and Visualforce code. If you haven’t tried it lately, log in to an organization and click Your Name > Developer Console to see how the Developer Console can simplify your work. This video tells the story of how a Force.com developer […]