What are skinny tables, compound indexes, and selective queries?
Suggested answer
Skinny Tables: Salesforce-maintained internal copies of an object with a subset of frequently queried fields, avoiding expensive joins. Must be requested from Salesforce support. Dramatically improves query performance for large objects. Compound Indexes: Indexes spanning multiple fields. Custom indexes on single fields can be requested; compound indexes are available for specific performance optimisation. Selective Queries: A SOQL query is selective when its WHERE clause filters via an indexed field and reduces the result set to less than: 10% of records (if total < 100,000), or 333,333 records (if total > 1 million). Non-selective queries against large objects cause full table scans and may be blocked or timeout. Indexed fields: Id, Name, OwnerId, fields marked as External ID, custom indexed fields (requested via support), and standard indexed fields (IsDeleted, CreatedDate, SystemModstamp, RecordType).
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.