Andy Tran

Skinny Tables in Salesforce

by | Feb 2, 2022 | Salesforce

Skinny Tables in Salesforce

What are Skinny Tables in Salesforce?

A skinny table is a custom table within the Force.com platform that contains a subset of fields from a standard or custom Salesforce object. Force.com has the ability to manage multiple skinny tables if needed and keep them completely transparent.

Salesforce uses skinny tables to contain frequently used fields and to prevent joins. The skinny tables are kept up to date when the source tables are changed. To enable Skinny tables, need to contact Salesforce customer support. When you enable Skinny tables, it automatically creates the tables and uses them. Skinny tables aren’t available for creation, access, or modification. You must contact Salesforce to update your skinny table definition if the report, list view, or query you’re optimizing changes – for example, to add new fields.

How Skinny Tables Can Improve Performance

Salesforce creates separate tables for standard fields and custom fields for each object table. The separation of these fields typically requires a join when a query contains both types of fields. A skinny table contains both kinds of fields but does not contain soft-deleted records.

In this table, there is a view of an Account, a database table corresponding to it, and a skinny table that speeds up Account queries.

Skinny Tables

The read-only operations that reference only fields in skinny tables don’t require an extra join, so they can be faster. Skinny tables are very effective when working with large tables containing millions of records because they speed up read-only operations, such as reports.

Skinny tables can be created on custom objects, and on Account, Contact, Opportunity, Lead, and Case objects. They can enhance performance for reports, list views, and SOQL.

Skinny tables can contain the following types of fields.

1. Checkbox

2. Date

3. Date and time

4. Email

5. Number

6. Phone

7. Picklist (multi-select)

8. Text

9. Text area

10. Percent

11. Text area (long)

12. URL

Example for Skinny table

Instead of using a date range like 01/01/21 to 12/31/21—which entails an expensive, repeated computation to create an annual or year-to-date report—you can use a skinny table to include a Year field and to filter on Year = ‘2021’.

Considerations

  1. A skinny table can contain a maximum of 100 columns.
  2. Skinny tables cannot have fields from other objects.
  3. Skinny tables are copied to Full sandbox orgs, but not to other sandboxes, so to activate that you must contact customer support.

Find the following blogs to know more about Salesforce.

  1. Flows over Process Builder
  2. Scheduled Flow in Salesforce
  3. Lightning Web Components

2 Comments

  1. Hiren

    Good informative page

    Reply
    • Jyothi K

      Thank you, Hiren!!

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.