Hi,
Here we are going to learn about Skinny tables in Salesforce.com
Salesforce can create skinny tables to contain frequently used fields and to avoid joins. This can improve the performance of certain read-only operations. Skinny tables are kept in sync with their source tables when the source tables are modified.
If you want to use skinny tables, contact Salesforce Customer Support. When enabled, skinny tables are created and used automatically where appropriate. You can’t create, access, or modify skinny tables yourself. If the report, list view, or query you’re optimizing changes—for example, to add new fields—you’ll need to contact Salesforce to update your skinny table definition.
How Skinny Tables Can Improve Performance
Read-only operations that reference only fields in a skinny table don’t require an extra join, and can consequently perform better. Skinny tables are most useful with tables containing millions of records to improve the performance of 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.
- Checkbox
- Date
- Date and time
- Number
- Percent
- Phone
- Picklist (multi-select)
- Text
- Text area
- Text area (long)
- URL
Skinny tables and skinny indexes can also contain encrypted data.
Here is an example of how a skinny table can speed up queries. Instead of using a date range like 01/01/11 to 12/31/11—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 = '2011'.
Considerations:
- 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 your Full sandbox orgs.
For other types of sandboxes: Skinny tables aren’t copied to your sandbox organizations. To have production skinny tables activated for sandbox types other than Full sandboxes, contact Salesforce Customer Support.
Note:
Skinny tables aren’t a magic wand to wave at performance problems. There’s overhead in maintaining separate tables that hold copies of live data. Using them in an inappropriate context can lead to performance degradation instead of improvement.
Reference:
https://developer.salesforce.com/docs/atlas.en-us.salesforce_large_data_volumes_bp.meta/salesforce_large_data_volumes_bp/ldv_deployments_infrastructure_skinny_tables.htm