Best Practices

Optimizations for Salesforce Orgs with Lots of Data (Part 2)

Optimize Salesforce org performance with efficient queries, indices, and selectivity. Part 2 of our 4 part series on handling large data volumes.

In this article, we will delve into the finer details of writing effective queries in Salesforce, making use of Salesforce Object Query Language (SOQL) and Salesforce Object Search Language (SOSL). Through examining specific use cases, pros and cons, and practical tips, you'll gain insights into how to navigate these two Salesforce query languages, along with understanding the importance of indices, selectivity, and the role of features like Skinny Tables and Defer Sharing Calculation.

Here are our 5 key takeaways:

  • SOQL vs. SOSL: SOQL is optimal when you know the objects and fields, while SOSL is ideal for broad text-based searches.
  • SOQL Indexing: Indexing in SOQL is limited; not all fields can be indexed, but it does support primary keys, custom fields, system audit fields, and foreign keys.
  • Defer Sharing Calculation Feature: This feature can help in managing sharing rules during large configuration changes in your organization.
  • Skinny Tables: Skinny tables reduce processing times for frequently accessed fields, though they require manual updates when changes are made.
  • Utilizing Selectivity and Indexes: Make queries selective and specific to improve performance, and consider creating custom indexes with Salesforce's help for optimal results.
Table of Contents
FREE TOOL
Profiles & Permissions Deployer

Easily compare and deploy Profiles, Permission Sets, and Field-Level Security (FLS) between any two Salesforce organizations.

Get Started
Made with love by the Blue Canvas team ❤️
Try bluecanvas now!

Start your 14-day trial!

Get Started
Made with love by the Blue Canvas team ❤️
Try Bluecanvas now!

Start your free 14-day trial

Get Started
Get Started with BlueCanvas
TABLE OF CONTENTS
RECOMmENDED ARTICLES
Force.com Migration Tool: Mastering Salesforce Deployments
Introducing Blue Canvas
Metadata Refreshes and Comparing Salesforce Orgs with Git
Introducing our All-New Profiles & Permission Sets Deployer for Salesforce!
Dynamic Forms: A game changer for Salesforce Page Layouts
You might also like our other posts...
Profiles and Permission Sets
Read more
NEW FEATURE
Harry Williams | May 03, 2019
Deploying Profiles and Permission Sets

Blue Canvas is excited to offer a free tool to the community for deploying Salesforce’s trickiest metadata type.

Flow Chart
Read more
DEV TIPS
Harry Williams | May 26, 2023
Unlock the Power of CPQ Twin Fields in Salesforce

Master CPQ Twin Fields in Salesforce through practical examples and unlock greater flexibility and efficiency in your data management process.

Provar Webinar
Read more
DEV TIPS
Harry Williams | April 02, 2019
Automated Testing for Salesforce with Provar

How you can leverage Blue Canvas CI to run automated tests in the cloud with Provar Testing.