Skinny tables are custom tables that Salesforce creates on customer’s request to optimize search results and query performance. Skinny tables can be created to contain frequently used fields and to avoid joins. These are kept in sync with their source tables when the source tables are modified.
Why to use Skinny Tables?
We used to stores millions of records of data in Salesforce objects. When we try to create reports on these millions of records, some times we can face performance issues and time outs due to large data volumes. To handle this performance issue we can ask Salesforce to create skinny table which contains frequently used fields.
How Skinny Tables Can Improve Performance?
From the user’s point of view, a Salesforce object is a single table but Salesforce maintains separate tables for standard and custom fields. When query is performed on object table, internally it is creating join of standard and custom table to return the data, which is little overhead if we have the huge amount of records.
A skinny table contains both kinds of fields and also omits soft-deleted records. They can enhance performance for reports, list views, and SOQL.Skinny tables and skinny indexes can also contain encrypted data.
Considerations for Skinny tables
- Skinny tables can contain a maximum of 100 columns.
- Skinny tables can’t contain fields from other objects.
- For Full sandboxes: Skinny tables are copied to our Full sandbox orgs.For other types of sandboxes: Skinny tables aren’t copied to our sandbox organizations.
Enabling Skinny Tables in Salesforce
Skinny table are expensive to manage for Salesforce so they go through each request properly. They review that request is genuine or not. Once request is reviewed then they create it.