Andy Tran

Skinny Tables in Salesforce

by | 2 Feb, 2022 | Salesforce | 2 comments

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, we 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.

Account view in skinny table

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.

Also Read: Getting Started with Salesforce Flows

Thank you for taking the time to read our entire blog. Looking for a reliable Salesforce partner company? Look no further! Erudite Works offers high-quality, tailored solutions for all your Salesforce needs. With experienced professionals, we provide services such as implementation, customization, integration, and support. Contact us to learn more about our services.

Share this article...

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.