Questions tagged [indexing]
The indexing tag has no usage guidance.
43 questions
-1
votes
1
answer
179
views
Adding a new field to the product index
I'm looking to add a new field to the list of indexed fields on the product index so I can use it as a filter. I haven't been able to find this option anywhere. Any help would be appreciated!
5
votes
2
answers
1k
views
How do custom indexes impact performance negatively?
I am trying to understand the negative tradeoffs in creating more custom indexes on an sObject. Yes, they are helpful with query selectivity which speeds up reading data, but at what price. ...
1
vote
0
answers
89
views
Can you index the isDeleted field? If so, how do you calculate the selectivity threshold
Can you index the standard isDeleted field? If so, in terms of calculating the selectivity threshold, would it be considered a unary standard or unary custom index?
I'm working with large data volumes ...
0
votes
1
answer
1k
views
Can we create an indexed field which is not unique
I am extremely new to salesforce. I read that we can mark any custom field as an ExternalID which creates an index over it. I have a use-case where I have multiple Address records which have the same ...
0
votes
1
answer
523
views
Issues with testing a scheduled product index builder class (B2B commerce)
I wrote this schedulable B2B Commerce Product Index Builder class based on documentation from Salesforce and consulting a custom rep.
global class ccScheduledProductIndexBuilder implements ...
1
vote
1
answer
1k
views
Pass Lightning input iteration value by index of String array
I have a lightning component where I dynamically generate some columns and some input fields. I have a String Array as attribute. How do I get the index of the array to pass the value. I tried below ...
0
votes
1
answer
189
views
Duplicates on indexed external fields?
I was performing some data masking on a few fields in the Account object and saw that about 150 records could not be masked due to duplicate values in a field that had an index and was marked as an ...
0
votes
1
answer
821
views
Issue while saving the wrapper data through imperative way of LWC
I am trying to pass the listofWrapper-> (List) data to Apex method for DML operation.
I am not able to figure out how to get Outer loop index ("Oppindex") for any change in the child ...
1
vote
1
answer
2k
views
LWC Nested Iteration Issue
I am facing an issue with the nested iteration,
Suppose I have one button in child loop and i want index of parent and child loop both in onclick function of JS file.
I am only getting index of child ...
0
votes
0
answers
61
views
SOQL vs Reports: Why is server losing connection when I run equivalent SOQL from Query Editor?
I have a Batch process which accepts 300,000 or so records from its query. When I run the query as a standalone in Query Editor or in Workbench, I get errors (discussed in last post Errors for count() ...
0
votes
1
answer
311
views
SOSL Query: Getting different number of records while searching with 1234* and abcd1234*
I have a community page. It has a search box and a list view to display the search result. Below is the Query I'm building: (It will search in 15M total records)
List<List<sObject>> ...
0
votes
3
answers
96
views
Does Salesforce indexes work in the same way as a SQL indexes?
I mean SQL indexes generally speed up retrieving and slow down inserting. Does Salesforce indexes work in the same way as a SQL indexes?
7
votes
1
answer
1k
views
Lightning Component Indexing in VisualStudioCode hogs CPU and memory slowing my PC
I keep seeing "Indexing Lightning Components" in Visual Studio Code, which is a CPU and Memory hogging activity, slowing my PC. Is there a way to make it less CPU intensive?
2
votes
0
answers
225
views
Can Lookup Field be part of Composite Index?
I have an sObject say
student( ..., student_name text,favourite_teacher
lookup,marks integer)
By the documentation , lookup fields (favourite_teacher) will be indexed by default.
Is it possible ...
11
votes
2
answers
1k
views
SOQL query selectivity changes with number of IN clause records
I have a custom object with a Master-Detail relationship to Opportunity. The relationship field to the parent Opportunity is automatically indexed.
There are 200,000 plus of these custom objects in ...
1
vote
1
answer
439
views
SOQL and Indexes
I am trying to understand more about "SOQL Query Performance" topic and I'm reading all the Salesforce docs.
I have a doubt when we have a WHERE clause with an AND condition.
The two docs on this ...
0
votes
1
answer
584
views
Passing iterated variable from Markup to JS Controller
I need a way to keep track of each iterated lightning:inputField so that any changes made to that specific field is reflected by a CSS style change.
Markup
<aura:iteration items="{!v....
2
votes
2
answers
8k
views
Can a formula field be indexed?
I have a formula field called ContactID18__c on the Account object. The formula is CASESAFEID(PersonContact.Id). Can this field be indexed or no because it is a custom field and a formula? Or is ...
1
vote
2
answers
129
views
Case Records not returned in Classic or Console Search - Returned in Query Editor
I create a case, it is case number 123456789.
If I search for case number 123456789, it is not returned Salesforce Classic search, this includes clicking search all. It is also not returned in the ...
1
vote
2
answers
1k
views
How to get first index nr/record in child loop
I have some related records to a parent record. I want to loop trough the child records and set a checkbox on the first record/index to true and all the other records to false.
How do I achieve this? ...
2
votes
2
answers
455
views
Index on History Table Fields
We want to query the Case History table to count how many times the Case Status is changed from Status A to B and B to A.
We have around 10 million Case History records in production. Want to know ...
0
votes
0
answers
183
views
Restrictions with HomePhone ( i.e Standard field ) for indexing?
I am working on a requirement where I need to use phone fields in where clause of the apex code, and I need those fields to be indexed. I contacted support to request they index a set fields, and they ...
0
votes
1
answer
993
views
Deployment error System.ListException: List index out of bounds: 0
I have the following apex code where I do a soql. In my developer sandbox my testclass gives me 100% coverage. When I deploy this to production I get the error:
System.ListException: List index out ...
4
votes
1
answer
1k
views
How do we get Index fields of an Object in Apex?
I want all the index fields of a particular object in apex. I have searched through the Schema describe but couldn't find a way to identify the field as indexed.
0
votes
2
answers
2k
views
Limits on number of fields to be indexed for Salesforce Big Objects
Does Salesforce have any limits on indexing the number of fields on a Big Object?
The example in the latest Big Object guide indexes 3 fields. Does anyone know, whats the governor limit on number of ...
0
votes
1
answer
1k
views
How does SF create indexes on Data Extensions
Does Salesforce add indexes to the data extensions in the backend?
If so what is the criteria for a column to be indexed.
Lately we had a job error out due to timeout. As per SF there was no index on ...
1
vote
1
answer
287
views
Marking field as External Id in managed package patch org
Can we mark a field as External Id in a patch org?
I need this so that the field will be indexed.
-1
votes
2
answers
1k
views
Combine 2 lists and output in a new list with indexes changed
I have a map as below:
Map<Integer, List<String>> iMap = new Map<Integer, List<String>>{
1 => new List<String>{'a','b','c'},
2 => new List<String>{'d'...
1
vote
2
answers
236
views
Indexing software used in salesforce
Which indexing software is used by salesforce to index terms ? Is it lucene, Solr , ElasticSearch or something else ?
5
votes
0
answers
125
views
Using Salesforce indexes
I'm working on an org that will have around 25m opportunities when data migration is complete. I'm trying to anticipate the issues we will face running batch processes against this data volume. We ...
0
votes
1
answer
185
views
List Index out of bound
I have below code which throws List index out of bound error.
I am not getting where i do wrong here.
Code
String Territory= '\''+ (String) p.get('Primary_Territory_vod__c')+'\'';
system....
1
vote
1
answer
342
views
List index out of bounds: 1 Trigger.NoteOnContentDocument: line 9, column 1: []
I All i seem to get stuck with my trigger. I'm very new to triggers i get this error on deployment:
List index out of bounds: 1 Trigger.NoteOnContentDocument: line 9,
column 1: []
Could you ...
5
votes
2
answers
675
views
Bulk data load make the global search unusable
We are migrating data from saleforce org A to org B. While migrating we are processing data out of salesforce and its out of scope of this question. When we load data into target org it breaks the ...
2
votes
1
answer
587
views
System index is not being used when running a SOQL query with DAY_ONLY()
CreateDate is a system index field maintained by Salesforce. I'd like to know when you running a query like this:
Select Id from Account Where Day_Only(CreatedDate) > exampleDate
Does the ...
1
vote
2
answers
375
views
Is a SOQL Query based on ID subject to an indexing delay?
We are using Salesforce with our Drupal site for Registrations and Orders. When someone submits their registrations, we us a SOQL query to lookup Contacts with matching First Name, Last Name, and ...
22
votes
1
answer
1k
views
Records not being indexed or found with global search
I've come across an issue where Salesforce doesn't seem to be indexing records in a custom object that are created through the REST API. When searching for a record name or external ID no results are ...
5
votes
1
answer
940
views
QueryException: Non-selective query against large object type (SOSL)
The following SOSL is in an Account trigger in a managed package:
/* Trigger is on API 27.0 */
String acctsNamesOrd = 'PARKER/VANGUARD MGT';
Map<Integer, String> acctsNames = new Map<...
1
vote
1
answer
2k
views
Why is my report taking forever to run?
When working with a very large dataset of Accounts, e.g., 10's of millions of records, I wanted to create a report to return a subsets of records, i.e., records filtered by country.
I created a ...
2
votes
1
answer
2k
views
Can I create an index on a field to speed up searching?
I have a large table (10's of millions of records), I want to be able to filter reasonable quickly, can I create an index on a field to help speed up fitlering?
3
votes
1
answer
225
views
Customer Portal and SOQL query optimization
We have a customer portal which has sharing set by Account i.e. Record level security by granting access to portal users where their Account matches the Account associated with the record.
I was ...
4
votes
2
answers
1k
views
Query Plan tool in Developer Console showing index plan for custom field which is not indexed
I am trying to evaluate some of our SOQL queries using query plan tool in Developer Console.
Query is on custom object and we don't have any custom index on any of the custom field of this object.
...
6
votes
2
answers
4k
views
How can I find out what custom indexes have been created in my Org?
In orgs with large data volumes, it sometimes becomes necessary to ask Salesforce to create a custom index on a particular field, or combination of fields.
Once Salesforce creates a custom index, is ...
8
votes
2
answers
4k
views
Indexing Fields WITHOUT Salesforce Help (dates, etc)
I am asking this here because I'm having my usual run-around with Salesforce (we do not pay for Premium or "Developer" support if there even is such a thing) and I'd like to know if someone has ...