I've got a code, where on lead insert, I also insert 1 record of custom object Demand_Funnel__c. Demand_Funnel__c has no apex triggers, no WF rules, no Processes tied on it. If it's a first lead insertion of the day, Demand_Funnel__c insertion could take up to 6 seconds.

Developer console timeline Logs Debug log levels

All subsequent insertions take 0.1-0.2 secs.

Additional info about enviroment/object: Object has ~1.5 million of records. Object has 260 custom fields and 12 custom relationship fields. Org itself has tens of millions of records.

I've only found this post with similar issue with no answer.

Does anybody know, why simple insertion can take up to 6 seconds on first insertion of the day?

  • Salesforce warms up their cache. Can you check what is happening when you open random record 2 years past on object with coupe millions of records? (spoiler alert -- I have seen environments when it took up to 4 times timeout (120 sec) till record is shown)
    – kurunve
    Commented Jul 5, 2017 at 12:55
  • @kurunve opened a Demand_Funnel__c record for 2013, opened in a second. Tried to open an old lead, open time was usual 2-3 seconds.
    – EvAzi
    Commented Jul 5, 2017 at 13:10


You must log in to answer this question.

Browse other questions tagged .