The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
49 views

Custom soql return too many rows

What is my best option to return the results of a query where the soql query by default returns too many rows (>50k)? From my understanding, SELECT COUNT() still cannot return a result >50k, but my ...
0
votes
2answers
18 views

Can I reduce the number of containers and (seemingly) redundant loops when querying parents and grandparents?

tl;dr - I'm retrieving fields on an object, the object's parent, and the parent's parent in a trigger - is there any way to make my code use less than 5 containers and remain bulkified? I have an ...
8
votes
0answers
76 views

Premature optimization is the…cure of all CPU timeouts?

According to Donald Knuth actually "is the root of all evil". But this doesn't seem to hold true on the Force.com platform and its CPU time Limit. After watching Paul Battisson's Faster Loops ...
2
votes
2answers
64 views

Need help optimizing a SOQL query

I am writing a simple trigger to tag lead duplicates based on two different fields, Email and our internal Lead ID (which we keep consisted between our own server DB and salesforce via integration). ...
2
votes
3answers
439 views

Retrieving more than 100.000 records using select statement

I have a custom object called equipment___c with more than 100.000 records, and also related to product object. To get product codes that are in equipment object, i used the following query: select ...
0
votes
0answers
25 views

Any ideas regarding optimization soql taking time to show results?

customreport: public class customreport { public String sortinput { get; set; } public String order { get; set; } public String input1 { get; set; } public String input2 { get; set; } ...
3
votes
1answer
298 views

Optimize Comparison of Records of same object with different record types

I have one object XYZ__c having two record types say A and B. I need to create junction Object JUNC__c(Fields: A__c(Lookup-XYZ__z),B__c(Lookup-XYZ__c)) record if XYZ__c record fields are same. I ...
7
votes
1answer
126 views

Measure (SOAP) API call performances

Is there a way to measure SF server processing time for specific (SOAP) API method call? Example: I am invoking update of 200 objects in one request. I would like to see SF processing time on their ...
11
votes
1answer
1k views

Are formula fields so inefficient?

I'm working with some colleagues on a project which the clients would like optimized, as they feels some things are too slow. One of my colleagues has suggested that we should cut down on the use of ...
2
votes
3answers
5k views

Nested SOQL query?

so, the following query is pretty self explanatory: SELECT p.Accountid, p.Name, (select name FROM Account where id = p.Accountid) FROM Contact p order by accountid' is there any way to do this in a ...
1
vote
3answers
171 views

Optimized way to update parent object

What is the most optimized way to update every parent object inside a list? For example: List<Asset> aList = [ SELECT Account.Name FROM Asset WHERE ...
3
votes
1answer
368 views

Bi-directional Map in Apex or best alternative approach

I am using Apex Map structures for fast one-way mapping of data. This works very well, but I ideally want to map backwards using the same map declaration. The obvious way is to iterate the map, but ...
6
votes
2answers
542 views

Better performance between if-else-else-… vs hardcoded maps

We're doing an integration project where we receive a lot of code values from a webservice.These codes need to be mapped to a user-friendly, translateable text in a visualforce page. We've set up a ...
7
votes
3answers
6k views

String concat vs string format in Apex?

I believe there is a performance benefit for using string format in languages like .NET and Java over concatenating strings. Is this also the case for Apex and force.com ? string s = ...
11
votes
1answer
813 views

Has anyone had issues with initial page load times when injecting a second VF page via AJAX?

I have a few visualforce pages that, together, make up a custom dashboard. The first page or "shell" page is just a HTML form that lets you select a client services rep and an optional client type ...