9

Salesforce doesn't provide a lot of visibility into the inner workings and technologies underpinning their platform. The official engineering and developer relations blogs may provide some insight from time to time, but again, it's not too substantial. In the end, details like these are unimportant to end users like ourselves. Even if we knew which ...


7

As you know, Salesforce has different services and sites. For the Salesforce Platform, as mentioned by @Derek F, and the video he pointed out: Apache Solr (screenshot from the presentation below): For the H&T Portal, Salesforce uses a Coveo Index.


6

Yes, you can request to have indexes created on custom formula fields provided that they are deterministic - generally speaking, that they don't have cross-object references, dependency on the current date, or references to fields that have some special built-in functionality. See Force.com Formula Fields, Indexes, and Performance Gotchas Force.com SOQL ...


6

There is apparently a background process that salesforce runs on a scheduled basis that does some level of analysis of an org's queries and possibly applies custom indexes automatically where it sees a clear advantage to do so. I can't point to any written documentation of this, but I was told it by a member of their R&D organization at one point in the ...


6

Only marking fields as external ids as you pointed out is the only way an end user can have a field indexed. Other fields such as lookups (and master detail relationships) are indexed automatically. For what you are requesting there's really only 2 options. Create a snapshot like sobject / table to have less records you'll need to filter through for ...


4

Sadly, as of August 2014, the only way to find out if a custom index exists is to open a case with Salesforce Support and ask them whether or not a specific field is indexed. Apparently, the Setup UI of the support reps has a "Column Indexed" checkbox on their version of a Field detail page. This is how they are able to check if a particular field has an ...


4

There is the article Salesforce Bulk Data Loads and Full-Text Search Indexes by Salesforce engineering. Strategies for Addressing Lags in Search Indexing So how can you architect acceptable solutions that address inevitable lags in search indexing after data loads? Here are a couple of things to consider. Disable full-text search indexing for ...


4

You can submit a Case through the Salesforce Success Community to have Salesforce index a field. Also, assigning a field as an ExternalId will index it. EDIT: Found the documentation regarding External IDs: Working with Very Large SOQL Queries


4

I would say you should take these steps: Get the maximum length of all lists. Generate a sorted list of map keys. Iterate through integer indices up to this maximum. Iterate through your ordered keys and pull the value if your index is valid. Roughly: public static List<String> interleave(Map<Integer, List<String>> input) { List<...


4

It's not in the describe, but you can query the FieldDefinition via the Tooling API and it has an IsIndexed field. List<FieldDefinition> indexedAccountFields = [ SELECT QualifiedApiName FROM FieldDefinition WHERE IsIndexed = true AND EntityDefinition.QualifiedApiName = 'Account' ];


3

I added the same comment to Saleforce github issues for VS Code Salesforce dx plugin, and it was marked as a bug by SF team. Seems the issue is with Aura Component extension for VS Code by Salesforce. It can be checked at below link https://github.com/forcedotcom/salesforcedx-vscode/issues/1592


3

Firstly, the answer provided by salesforcesas is correct. It's the accumulation of cardinality records for each opportunity Id in the IN clause that is causing the issue. I'd assumed that each Opportunity has 3 related child records that match the SOQL filter. And this was correct, but... I hadn't provided the full story within the question. The actual ...


3

Further analysis done. This is a child object with total cardinality of 3.7 million records which is being filtered based on parent field. Below are the observations: The query cost is directly proportional to the number of records retrieved from database for that particular type of field (parent lookup field in my case). IN operator is virtually OR ...


3

This is the line Due to this you are getting this error if (links.size()>0 && Approval.isLocked(links.get(1).LinkedEntityId)) You need to change this if (links.size()>0 && Approval.isLocked(links.get(0).LinkedEntityId)) or if (links.size()>1 && Approval.isLocked(links.get(1).LinkedEntityId)) Because if size is 1 and ...


3

Found Solution: The approach is load data as slowly as possible. If you load relatively less records (say 5k or less) the global search is available in the matter of seconds (for me, it was less than 30 seconds). So, instead of loading data in bulk we choose to load data in “Trickle Load” fashion. In a way it’s exactly opposite of bulk data loading. In Bulk ...


2

If you have a specific field in mind, you could use the Query Plan tool to verify that it is there. https://help.salesforce.com/apex/HTViewSolution?id=000199003&language=en_US that won't help you browse for arbitrary indexes, but you could definitely use it to verify the existence of an index you expect to be there.


2

So far, 18 days after the fact, the sad truth is: Basic Support is being pushed to the Developer's Community now, even for OTHER requests. Premier Support (we JUST obtained this level of support) suddenly has taken an interest (though I DID have to involve our Account Rep as well, repeatedely). Now suddenly Tier 3 is getting the fields indexed. I have to ...


2

The error was caused by using a non-indexed field in an OR condition. In this case removing PKG__DBA__c in :acctsNames.values() fixed the issue. It's also worth noting that having the above condition as the only criterion in the where-clause causes the same error. It seems having a non-indexed field alone or ORed is not advised when querying large data sets....


2

You can use things like Custom Indexes, Skinny Tables, etc to reduce the time it takes to run a report. There are some limits to the amount of data that can be returned so please look in the below guides for the exact numbers. When dealing with Large Data Volumes (LDV) on the Salesforce Platform you should always ensure that your reports use "Selective ...


2

Analysis Using Developer Console, you can gather the following evidence for yourself when you have this type of question. Long story short, fields will not be optimized via index if they are wrapped in an expression. The plot thickens. You actually can get an index while using an expression if you use Date Literals. The following queries do use an index: ...


2

For most part, yes, since there is no definitive article on this topic and the query execution optimization is abstracted to the end users or internally handled by Salesforce. You can use the Query Plan Tool in Developer Console to explore the details of query plan and its execution details to some extent. If you run an expensive SOQL thru developer ...


2

Is the first document too shallow? No. First document states overall guidance on how to make SOQL query selective and provides few important points. It also provides following materials to fully understand how standard and custom indexes are different, and how they're employed. Working with very large SOQL queries Webinar: Inside the Force.com Query ...


2

The search engine lags behind record creation/edits by some time. It's typically somewhere less than 30 seconds or so, but it can be several minutes or even hours if the search engine is having a problem or is suspended (which they may do for maintenance or to diagnose a problem). However, the search engine also has a local cache of records a user has looked ...


2

You just need a variable to keep track if it's the first record or not: for(Huishouden__c h: [select ... ]) { Integer index = 0; for(Relatie__c rc: h.Relatie_Contacten__r) { rc.First_Record__c = 0 == index++; } } This works because on the first loop, 0 == index will be true, and then the ++ postfix operator will increment index to 1. For each ...


2

Just would like to add some more points, straightforward to questions: Does SOQL indexes generally speed up retrieving? Yes, It does.Salesforce supports indexes (standard and custom) to speed up queries, and you can create custom indexes by contacting Salesforce Customer Support. https://developer.salesforce.com/docs/atlas.en-us....


2

Hard to say for certain unless we get some input from Salesforce themselves, but we can say a few things... Salesforce uses a collection of technologies (lots of Apache Software Foundation stuff) behind the scenes. HBase, Solr, Lucene, Phoenix, and some others if I recall. There was a session I attended at Dreamforce a few years back that went over those ...


1

As of today, the limit for indexes in a bigobject is 5


1

I assume you can't as that would violate the key principle of "while ensuring that subscribers experience no visible changes to the package" that also ensures a patch org can be upgraded to the next non-patch version. Looking in a patch org to confirm, for a custom object field I see the option disabled: External ID - Set this field as the unique ...


1

If you lists are of equal size following should do a job Map<Integer, List<String>> iMap = new Map<Integer, List<String>>{ 1 => new List<String>{'a','b','c'}, 2 => new List<String>{'d','e','f'} }; List<String> returnList = new List<String> (); List<String> List1=iMap.get(1); List&...


1

I do not see a LIMIT statement in the SOQL query, which is usually not a smart thing. And do you iter over the "terr" results? When "terr.size()" would return 0, and you try to get the first record "terr[0]", then you could expect this error. See also: https://help.salesforce.com/articleView?id=000181121&type=1


Only top voted, non community-wiki answers of a minimum length are eligible