{"id":1776,"date":"2026-10-05T13:00:00","date_gmt":"2026-10-05T07:30:00","guid":{"rendered":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/"},"modified":"2026-11-15T11:31:12","modified_gmt":"2026-11-15T06:01:12","slug":"salesforce-large-data-volumes","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/","title":{"rendered":"Large Data Volumes in Salesforce: Query Optimization and Indexes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Large Data Volumes in Salesforce means objects with millions of records, where normal queries, reports and sharing start to slow down or fail. At this size, the way you filter data matters more than the code around it. A selective query on an indexed field returns in milliseconds, while a careless one can time out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, you will learn selective queries, standard and custom indexes, the Query Plan tool, data skew and archiving. It builds on <a href=\"https:\/\/swapnilzambare.com\/blog\/soql-where-clause-order-by-limit\/\">SOQL WHERE, ORDER BY and LIMIT<\/a>, <a href=\"https:\/\/swapnilzambare.com\/blog\/apex-governor-limits-explained\/\">Apex governor limits<\/a> and <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-bulk-api-2\/\">Salesforce Bulk API 2.0<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Large Data Volumes?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There is no single magic number, but Salesforce usually talks about Large Data Volumes when an object holds millions of records. At that point, the query optimizer, indexes, sharing calculations and record locks all affect speed. Good design keeps queries selective and data spread evenly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of a huge library. If you ask for &#8220;any blue book&#8221;, staff must walk every shelf. But if you ask for a book by its catalogue number, they go straight to one shelf. Indexes are the catalogue numbers, and selective filters are precise questions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Large Data Volumes Matter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Growth sneaks up on every successful org. Here is why Large Data Volumes matter at Bright Path Tutors.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, the Attendance__c object grows by two million rows a year.<\/li>\n\n<li>Also, a list view filtered on a text field now times out.<\/li>\n\n<li>Next, one &#8220;Unassigned&#8221; account owns 300,000 enrolments.<\/li>\n\n<li>Batch jobs that took minutes now take hours.<\/li>\n\n<li>Finally, triggers fail with non-selective query errors on big objects.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">So planning for volume early avoids painful rewrites later.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Large Data Volumes Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce handles Large Data Volumes through its query optimizer. First, it looks at each filter in your WHERE clause. Next, it checks whether the field has an index. Then it estimates how many records the filter returns and compares that with the selectivity threshold. After that, if a filter is selective, it uses the index instead of scanning the whole table. Finally, the query runs fast, or the optimizer falls back to a slow full scan.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-1-1024x640.png\" alt=\"Large Data Volumes diagram showing filters, index check, estimate, choose and run\" class=\"wp-image-1774\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-1-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-1-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-1-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">How the query optimizer decides to use an index.<\/figcaption><\/figure>\n\n\n<h3 class=\"wp-block-heading\">Standard Indexes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce indexes fields such as Id, Name, OwnerId, CreatedDate, SystemModstamp, lookups and master-detail fields. External ID and unique fields also get indexes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Indexes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Salesforce Support can add a custom index to other fields, when the field type allows it. Fields marked External ID or Unique are indexed automatically.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Selectivity Thresholds<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A standard index is selective under 30% of the first million records and 15% beyond, up to 1 million records. A custom index uses 10% and 5%, up to 333,333 records.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Query Plan Tool<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Developer Console, enable the Query Plan button in Preferences. It shows the cost of each plan, and a cost below 1 means the query is selective.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Data Skew<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Skew happens when one parent or one owner has too many records, often over 10,000. So it causes record locking and slow sharing updates.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Selectivity Thresholds at a Glance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below sums up when an indexed filter counts as selective.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Index type<\/th><th>First million records<\/th><th>Beyond first million<\/th><th>Maximum<\/th><\/tr><\/thead><tbody><tr><td>Standard index<\/td><td>30%<\/td><td>15%<\/td><td>1,000,000 records<\/td><\/tr><tr><td>Custom index<\/td><td>10%<\/td><td>5%<\/td><td>333,333 records<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Selective Query vs Non-Selective Query<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The table below compares the two kinds of query on a large object.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Feature<\/th><th>Selective query<\/th><th>Non-selective query<\/th><\/tr><\/thead><tbody><tr><td>Filter<\/td><td>Indexed field, few matches<\/td><td>Unindexed or broad filter<\/td><\/tr><tr><td>Plan<\/td><td>Index lookup<\/td><td>Full table scan<\/td><\/tr><tr><td>Speed<\/td><td>Milliseconds<\/td><td>Seconds or timeout<\/td><\/tr><tr><td>In triggers on big objects<\/td><td>Works<\/td><td>Can throw an error<\/td><\/tr><tr><td>Example<\/td><td>WHERE External_Id__c = &#8216;A-77&#8217;<\/td><td>WHERE Notes__c LIKE &#8216;%late%&#8217;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When to use which is simple. Always aim for a selective filter on large objects. Rewrite or add an index when the Query Plan shows a table scan.<\/p>\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-2-1024x640.png\" alt=\"Large Data Volumes diagram comparing selective and non-selective queries\" class=\"wp-image-1775\" srcset=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-2-1024x640.png 1024w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-2-300x188.png 300w, https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-diagram-2-768x480.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Selective vs non-selective query.<\/figcaption><\/figure>\n\n\n<h2 class=\"wp-block-heading\">A Real Large Data Volumes Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s fix a slow query on Large Data Volumes at Bright Path Tutors. Attendance__c holds eight million rows, and a nightly job filters by status text.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: The Slow Query<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Non-selective: Status__c has no index and matches millions of rows\nList&lt;Attendance__c&gt; rows = [\n    SELECT Id, Student__c, Session_Date__c\n    FROM Attendance__c\n    WHERE Status__c != 'Present'\n];<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A negative filter on an unindexed field cannot use an index. So the optimizer scans the whole table and the job times out.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: The Selective Version<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Date since = Date.today().addDays(-1);\nfor (List&lt;Attendance__c&gt; chunk : [\n        SELECT Id, Student__c, Session_Date__c\n        FROM Attendance__c\n        WHERE CreatedDate &gt;= :since          \/\/ standard index\n          AND Status__c IN ('Absent', 'Late') \/\/ positive filter\n        WITH USER_MODE]) {\n    AttendanceService.notifyGuardians(chunk);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">CreatedDate has a standard index, and yesterday&#8217;s rows are a small share of the table. Also, a SOQL for loop processes rows in chunks of 200, which keeps heap usage low.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Compare the Plans<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what the Query Plan tool shows, using example figures.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Before: TableScan  cost 2.84  cardinality 7,950,000\nAfter:  Index      cost 0.07  cardinality 21,400  (CreatedDate)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A cost below 1 means the optimizer will use the index. Your own numbers will differ, so always check in your org.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Large Data Volumes and Archiving<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Old data still slows queries and sharing. So archive closed records to Big Objects, an external store or Salesforce Backup, and keep only active data in busy objects. Also, plan deletes with the Bulk API and hard delete where policy allows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Mistakes with Large Data Volumes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Filtering with !=, NOT LIKE or leading % wildcards on big objects.<\/li>\n\n<li>Filtering on non-deterministic formula fields, which cannot be indexed.<\/li>\n\n<li>Letting one account or one owner hold huge numbers of records.<\/li>\n\n<li>Loading data with heavy triggers turned on.<\/li>\n\n<li>Ignoring the Query Plan tool until users complain.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Large Data Volumes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Filter on indexed fields and keep filters positive.<\/li>\n\n<li>Use External ID fields for integration keys.<\/li>\n\n<li>Spread child records across parents to avoid skew.<\/li>\n\n<li>Use SOQL for loops and Batch Apex for big jobs.<\/li>\n\n<li>Ask Support about custom indexes or skinny tables for hot queries.<\/li>\n\n<li>Archive data you no longer need daily.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Practice Task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open the Query Plan tool and compare a filter on Name with a filter on a plain text field. Hint: enable it in Developer Console under Help &gt; Preferences, then click Query Plan.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Most Asked Interview Questions on Large Data Volumes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Performance at scale is a classic senior topic. Here are the 21 questions asked most about Large Data Volumes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Questions on Large Data Volumes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1: What are Large Data Volumes?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Objects with millions of records, where design choices start to affect speed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2: What is a selective query?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A query with at least one indexed filter that returns few enough records.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3: Which fields have standard indexes?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Id, Name, OwnerId, CreatedDate, SystemModstamp, lookups, master-detail, External ID and unique fields.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4: What is the selectivity threshold for a standard index?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">30% of the first million records and 15% beyond, up to 1 million.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5: What is the threshold for a custom index?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">10% of the first million records and 5% beyond, up to 333,333.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q6: How do you get a custom index?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mark a field as External ID or Unique, or ask Salesforce Support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q7: What is the Query Plan tool?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Developer Console tool that shows how the optimizer will run a query.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code and Scenario Questions on Large Data Volumes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q8: Why is WHERE Status__c != &#8216;Closed&#8217; slow?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because negative filters cannot use indexes, so the optimizer scans the table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q9: What does a Query Plan cost below 1 mean?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The query is selective, so the optimizer can use an index.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q10: Why use a SOQL for loop on big results?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It processes rows in chunks of 200, so heap stays low.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q11: What is account data skew?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One account with too many child records, often over 10,000, which causes locking.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q12: What is ownership skew?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One user owning a huge number of records, which slows sharing changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q13: Why avoid leading wildcards in LIKE?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because &#8216;%text&#8217; cannot use an index, so the whole table is scanned.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q14: How do you load millions of records safely?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use Bulk API, turn off non-essential automation and load parents before children.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Questions on Large Data Volumes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q15: What is a skinny table?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Support-created table with selected fields, which avoids joins for faster reads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q16: Can formula fields be indexed?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only deterministic formulas, so ones using functions like TODAY() cannot be.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q17: How do Big Objects help?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">They store billions of rows cheaply, so you archive history there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q18: Why can a trigger throw a non-selective query error?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because trigger queries on objects over 200,000 rows must be selective.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q19: How does sharing affect large volumes?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ownership and role changes recalculate access for many records, so plan them off-hours.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q20: How do you design integrations for large volumes?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use External IDs, upsert, Bulk API and incremental filters on SystemModstamp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q21: How do you prove a query improvement?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compare Query Plan costs and run times before and after the change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=000385218&amp;language=en_US&amp;type=1\" target=\"_blank\" rel=\"noopener noreferrer\">Make Salesforce Platform SOQL Query Selective (Salesforce Help)<\/a><\/li>\n\n<li><a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=000386864&amp;language=en_US&amp;type=1\" target=\"_blank\" rel=\"noopener noreferrer\">Developer Console Query Plan Tool FAQ (Salesforce Help)<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Quick Recap<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Large Data Volumes need selective, indexed filters.<\/li>\n\n<li>Standard and custom indexes have different thresholds.<\/li>\n\n<li>The Query Plan tool shows whether an index is used.<\/li>\n\n<li>Avoid skew, negative filters and leading wildcards.<\/li>\n\n<li>Archive data you no longer need daily.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What&#8217;s Next?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some data is read so often that even fast queries add up. Next, read our guide to <a href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-platform-cache-apex\/\">Salesforce Platform Cache<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Large Data Volumes in Salesforce means objects with millions of records, where normal queries, reports and sharing start to slow down or fail. At&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1773,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_swapz_level":"","_swapz_series_part":0,"_swapz_hide_toc":false,"_swapz_hide_featured":false,"_swapz_description":"","footnotes":""},"categories":[8,96,240],"tags":[68,98,153],"swapz_series":[],"class_list":["post-1776","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-salesforce","category-salesforce-developer","category-soql-data","tag-advanced","tag-apex","tag-performance"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Large Data Volumes in Salesforce: Fast Queries<\/title>\n<meta name=\"description\" content=\"Large Data Volumes in Salesforce explained simply: selective queries, indexes, Query Plan tool, data skew, skinny tables, archiving and 21 interview Q&amp;A.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Large Data Volumes in Salesforce: Fast Queries\" \/>\n<meta property=\"og:description\" content=\"Large Data Volumes in Salesforce explained simply: selective queries, indexes, Query Plan tool, data skew, skinny tables, archiving and 21 interview Q&amp;A.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil Zambare - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-05T07:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T06:01:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil Zambare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil Zambare\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/\"},\"author\":{\"name\":\"Swapnil Zambare\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\"},\"headline\":\"Large Data Volumes in Salesforce: Query Optimization and Indexes\",\"datePublished\":\"2026-10-05T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:01:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/\"},\"wordCount\":1475,\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-large-data-volumes-featured.png\",\"keywords\":[\"Advanced\",\"Apex\",\"Performance\"],\"articleSection\":[\"Salesforce\",\"Salesforce Developer\",\"SOQL and Data\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/\",\"name\":\"Large Data Volumes in Salesforce: Fast Queries\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-large-data-volumes-featured.png\",\"datePublished\":\"2026-10-05T07:30:00+00:00\",\"dateModified\":\"2026-11-15T06:01:12+00:00\",\"description\":\"Large Data Volumes in Salesforce explained simply: selective queries, indexes, Query Plan tool, data skew, skinny tables, archiving and 21 interview Q&A.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-large-data-volumes-featured.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/salesforce-large-data-volumes-featured.png\",\"width\":2400,\"height\":1260,\"caption\":\"Large Data Volumes featured image: title card with an Apex code example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/salesforce-large-data-volumes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Large Data Volumes in Salesforce: Query Optimization and Indexes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"name\":\"Swapnil Zambare - Blog\",\"description\":\"Salesforce &amp; Tech Guides\",\"publisher\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#organization\",\"name\":\"Swapnil Zambare - Blog\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"contentUrl\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/site-icon-512.png\",\"width\":512,\"height\":512,\"caption\":\"Swapnil Zambare - Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/theSwapnilZambare\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/#\\\/schema\\\/person\\\/10b09224c8bcc562716e86789427592a\",\"name\":\"Swapnil Zambare\",\"sameAs\":[\"https:\\\/\\\/swapnilzambare.com\\\/blog\"],\"url\":\"https:\\\/\\\/swapnilzambare.com\\\/blog\\\/author\\\/swapnil-zambare\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Large Data Volumes in Salesforce: Fast Queries","description":"Large Data Volumes in Salesforce explained simply: selective queries, indexes, Query Plan tool, data skew, skinny tables, archiving and 21 interview Q&A.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/","og_locale":"en_US","og_type":"article","og_title":"Large Data Volumes in Salesforce: Fast Queries","og_description":"Large Data Volumes in Salesforce explained simply: selective queries, indexes, Query Plan tool, data skew, skinny tables, archiving and 21 interview Q&A.","og_url":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/","og_site_name":"Swapnil Zambare - Blog","article_published_time":"2026-10-05T07:30:00+00:00","article_modified_time":"2026-11-15T06:01:12+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-featured.png","type":"image\/png"}],"author":"Swapnil Zambare","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Swapnil Zambare","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#article","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/"},"author":{"name":"Swapnil Zambare","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a"},"headline":"Large Data Volumes in Salesforce: Query Optimization and Indexes","datePublished":"2026-10-05T07:30:00+00:00","dateModified":"2026-11-15T06:01:12+00:00","mainEntityOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/"},"wordCount":1475,"publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-featured.png","keywords":["Advanced","Apex","Performance"],"articleSection":["Salesforce","Salesforce Developer","SOQL and Data"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/","url":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/","name":"Large Data Volumes in Salesforce: Fast Queries","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-featured.png","datePublished":"2026-10-05T07:30:00+00:00","dateModified":"2026-11-15T06:01:12+00:00","description":"Large Data Volumes in Salesforce explained simply: selective queries, indexes, Query Plan tool, data skew, skinny tables, archiving and 21 interview Q&A.","breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-featured.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/11\/salesforce-large-data-volumes-featured.png","width":2400,"height":1260,"caption":"Large Data Volumes featured image: title card with an Apex code example"},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/salesforce-large-data-volumes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Large Data Volumes in Salesforce: Query Optimization and Indexes"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil Zambare - Blog","description":"Salesforce &amp; Tech Guides","publisher":{"@id":"https:\/\/swapnilzambare.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/swapnilzambare.com\/blog\/#organization","name":"Swapnil Zambare - Blog","url":"https:\/\/swapnilzambare.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2026\/09\/site-icon-512.png","width":512,"height":512,"caption":"Swapnil Zambare - Blog"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/in\/theSwapnilZambare"]},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/10b09224c8bcc562716e86789427592a","name":"Swapnil Zambare","sameAs":["https:\/\/swapnilzambare.com\/blog"],"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=1776"}],"version-history":[{"count":1,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1776\/revisions"}],"predecessor-version":[{"id":2343,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/1776\/revisions\/2343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/1773"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=1776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=1776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=1776"},{"taxonomy":"swapz_series","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/swapz_series?post=1776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}