SlideShare a Scribd company logo
1 of 62
Download to read offline
Follow the evidence:
Troubleshooting performance issues
T.K. Horeis, salesforce.com, Cloud and Industry Architect
@TKHoreis
Safe harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties
materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results
expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be
deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other
financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any
statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new
functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our
operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any
litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our
relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our
service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to
larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is
included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent
fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor
Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently
available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions
based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these
forward-looking statements.
T.K. Horeis
Cloud and Industry Architect
@TKHoreis
Our customer, let’s call them Brand-X

Tip:
Don’t Rush
To
Judgement

%
9
>

>1
0%
They Were Simply Using Too Much Capacity
Tip:
Don’t Rush
To
Judgement
How Did We Know?
Tip:
it a
Subm To
Case er
i
rem t
P
ppor
Su

• Count
• Long-running
operations
• Total Runtime
• CPU time
• Db CPU time
• Buffer Gets
So We Recommended That They Needed To…
40% – 50%

▪ Reduce combined buffer gets and DB CPU by
20% - 25%

▪ Reduce combined runTime by
20%-25%

▪ Reduce combined App cpuTime by
Here’s What We Knew At The Time
• Capacity usage was proportionally LARGE
• The EU org will be merged into NA
• EU users would use NA business processes only
• Some EMEA users (Ireland) have already been moved over.
And this is
where our
investigation
begins…
Lots Of Evidence At The Scene Of The Crime
Lots Of Evidence At The Scene Of The Crime
Lots Of Evidence At The Scene Of The Crime
RE

ST

S

AP
O
Visual Force Page Loads
So Just What Are They Loading So Many Times?

•
•
•
•
•
•
•
•
•
•

/apex/qbdialer__sid 1814897
/apex/questionpage 6314
/apex/oppinformationrequest 5871
/apex/merchantaddys 5636
/apex/dnralert 5611
/apex/redemptionaddy 5503
/apex/account_geocoder 5080
/apex/pastdeals 4589
/apex/inlineoptions 3986
/apex/accountgoogleanalytics 3444
And When We Dig Further…

Where the median # of calls per day is ~1500.
Were those top 4 users REALLY making hundreds of
thousands of calls per day?
Not Exactly…
An old version of Power Dialer From Inside Sales was
the source of this problem.
•Users that liberally use tabs can magnify browser issues
•

Polling sidebar component created an issue

•Controller ran unnecessary queries
•

Vendor produce a patch

•Browser issues can linger if users don’t restart

Bottom Line: A 64% Reduction in VF loads
Lessons Learned
▪ It’s easier to find the culprit when you isolate the scenario.
▪ Don’t make assumptions. Let the data guide you.
• Just because it’s an AppExchange app, doesn’t mean it’s correct.

▪ Trust, but verify
Reporting
Reporting Usage Is Off The Charts!
•~50% of all db gets come from reports
•Daily Report Stats:
•~4000 reports being run daily
•45K-60K report executions daily
•10B-15B gets from reports
•6 users were using 9-13% of their report gets daily.

So Where Would You Start?
Why 4000 Unique Reports?
Lack of Report Governance
Anyone can create any report they want
Run it as often as they want
Many reports were are the same or almost the same
Lather, Rinse, Repeat Problem with bad reports

➢ Restrict who can create reports
➢ Restrict reporting access to some objects.
➢ Establish process to collect reporting requests
➢ Create in demand reports, so they can be shared.
➢ Use scheduled reports and dynamic dashboards
➢ Training, Training, Training

Bottom Line: A work in progress…
Why 45k-60k Report Executions Per Day?
Six

6 users routinely
executed a set of similar
reports thousands of
times / day.
It turns out they were
using a browser script to
continually refresh.

What Would You Do?
Possible Solutions
Restrict Who Can Run Reports

Customer indicated that they couldn’t do that

Tell users to stop running the script

This was done, but wasn’t immediately effective.

Restrict Login Hours

Customer wasn’t willing to do that just yet.

Improve the report

Done (see improvement in db gets)

Implement workflows

Tip:

Planned

What you see
as the
problem, could
simply be
another
symptom.

Bottom Line: A 34% Reduction in the Execs
Why 10-15B Db Gets Are Coming From Reports?
Problems

Solutions

❑ Hundreds of unselective reports that have
> 1M gets/exec

➢Restrict Who Can Create Reports

❑ Many unselective reports that have 15M35M gets/exec

➢Your job doesn’t stop with implementing, you
need to train them (cheatsheets, index lists,
sample reports).

❑ Two key report profiles contribute ~30% of
overall get count

➢Revisit the project to audit, profile, and optimize.
Document available indexes

Primary keys

• Id
List of Indexed Fields
• Name
• OwnerId
Foreign keys

•
•
•
•

Lookup
Master-detail
CreatedById
LastModifiedById

Audit dates

•
•
•
•

CreatedDate
LastActivityDate
LastModifiedDate
SystemModstamp

Custom fields

• Unique
• External ID
Create your own indexes
Need Additional Indexes?
▪

Salesforce support can create single and two-column custom indexes on most fields (with
the exception of multi-picklists, formula fields that reference other objects, and Long
Text Area/Rich Text Area)

▪

Open a case
➢
➢

Bind Variables

➢

Org ID and user ID
who would run the query

➢

▪

Sample Query

Suggested index – OPTIONAL

If they create an index, then SAVE and DOCUMENT where the index was created
Understand SOQL query optimization
Cheat Sheet: Selectivity Rules
Standard indexes
• Simple predicate targets < 20% of total records or 666K
• AND predicate targets < 20% of total records
• OR predicate targets < 10% or 333K of total records
Custom indexes
• Simple predicate targets < 10% of total records or 333K
• AND predicate targets < 666K of total records
• OR predicate targets < 10% or 333K of total records
LIKE
• Tests first 100K rows for selectivity
Predicates that can lead to full table scans
• NULL

• Not equal
• Contains
• Not In

• Does not contain
• Leading wildcards
• Formula fields
Potential Improvements Identified
❑Key Opportunity Report
•

9-13% of total report gets/day

❑Custom Object Report
•

0-16% of report buffer gets /day

❑Various Account Reports
❑Various Lead Reports
❑Various Opportunity Reports

Can

’t In

dex
WHERE Opportunity.Writeup_Status_del__c =
'Needs Details‘
WHERE Opportunity.Writeup_Status_del__c =
'Needs DQ' • This filter field is a complex formula field.
✓ Create sister field using trigger.
✓ Index sister field.
✓ Modify dependent reports.
Potential Improvements Identified
❑ Key Opportunity Report
•

9-13% of total report gets/day

❑ Custom Object Report
•

0-16% of report buffer gets /day

❑ Various Account Reports
❑ Various Lead Reports
❑ Various Opportunity Reports

WHERE Call_List_Priority__c IS
[NOT] NULL
OR Call_List_Priority__c < '.
00000000000000000201‘
• ‘<‘ and ‘>’ operators can’t optimize text fields
✓ Investigate process that populates this field
✓ Retype field as NUMBER
✓ Modify reports so < operator can be optimized
✓ Index field
Potential Improvements Identified
❑Key Opportunity Report
•

9-13% of total report gets/day

❑Custom Object Report
•

0-16% of report buffer gets /day

❑Various Account Reports
❑Various Lead Reports
❑Various Opportunity Reports

•
•
•
•
•

Using non-selective queries
Customer has wide objects (i.e. Oppty)
Determine appropriate selective field
Index field
Create Skinny Tables

Bottom Line: A 98% Reduction in Db Gets
Lessons Learned
▪ Report on reports to isolate the problem
• Cost of individual reports
• Number of report runs per day
• Non-selective queries
• Problematic queries

▪ Report Governance
• Who is the author of problematic reports?
• Custom Report Types models that the masses can customize

▪ Is it really a reporting problem?
• Data Model
• Workflow, Business process, etc.
Migration
What’s Wrong With Our Migration?
Customer expressed concerns because using bulk
API uploaded insert of 17k accounts and it took 27
minutes with workflows, validations, triggers.

What’s wrong here?
They also requested that we turn
code coverage to zero.

Why?
What We Found
Tip:

Follow Best
Practices. They’
ve been created
for a reason.

We suggested adjusting batch sizes on bulk
loads from the default to a lower number. A
value of 60 was found to be optimal.

DupeBlocker was in use and the vendor, advises
turning off triggers during migrations. They update a
custom object record during account updates / inserts
/ deletes, which can cause significant contention
problems that slow down bulk DML operations.

The request to turn code coverage tests to 0%
was related to poorly constructed tests that
required triggers to be active. This is clearly at
odds with Salesforce Best Practice. The
below was provided as a workaround.

if(custom_setting__c.getInstance().disable_all_triggers__c == true)
return;

Bottom Line: 66% Load Time Improvement
Disable actions that fire on insert
Triggers
Validation Rules

Workflow Rules
Defer sharing calculations

OR …
… load with Public default sharing

Just make
sure you turn
it back on
again!!!
Prep your data to avoid overhead
What We Found

Tip:

Upon further investigation, we
found:

What’s the
concern here?

Trust, but verify.
Lessons Learned
▪ Trust, but verify
• Initial reports of causality may be misleading
• Follow the data to the cause
• Non-selective queries
• Problematic queries

▪ Follow Best Practices
• Prep your data in advance for the best results
• Understand how to structure your bulk operations
• You may need to turn off sharing and other automatic functionality to improve
performance.
Resources
Architect Core Resource page
• Featured content for architects
• Articles, papers, blog posts, events
• Follow us on Twitter
Updated weekly!
http://developer.force.com/architect
Resources
Apex Governor Limits
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm

Best Practices for Deployments with Large Data Volumes
http://www.salesforce.com/us/developer/docs/ldv/salesforce_large_data_volumes_bp.pdf

Loading Large Data Sets with the Force.com Bulk API
http://wiki.developerforce.com/page/Loading_Large_Data_Sets_with_the_Force.com_Bulk_API

Report Performance
https://na1.salesforce.com/help/doc/en/salesforce_reportperformance_cheatsheet.pdf
Additional Resources
Bulk API Developers Guide http://www.salesforce.com/us/developer/docs/api_asynch/api_bulk.pdf
Bulk API Errors http://www.salesforce.
com/us/developer/docs/api_asynch/Content/asynch_api_reference_errors.htm

Batch Apex http://www.salesforce.com/us/developer/docs/apexcode/index_Left.
htm#StartTopic=Content/apex_batch.htm

Failing Safe with Apex Data Loader
http://tedhusted.blogspot.com/2012/04/failing-safe-with-apex-data-loader-for.html

Tools
– Data Loader - http://wiki.developerforce.com/page/Data_Loader
– Dell Boomi - http://www.boomi.com/
– IBM CastIron - http://ibm.co/PO0Qv8
– Informatica - http://bit.ly/OeRcCi
Additional Info
Record Lock Lifecycle
▪ Record Locks = Data Integrity
▪ Salesforce locks a record before executing a DML operation.
-

This is done before the starting the save process.
▪

-

The save process is documented on this page: Triggers and Order of Execution.

Records will remain locked until commit.

▪ Salesforce will wait up to 10 seconds to lock a record before
throwing an UNABLE_TO_LOCK_ROW error.
-

Even if no errors occur, waiting for locks can significantly slow DML operations.
Parent-Child Relationships
▪ Insert of Contact requires locking the parent Account.
▪ Insert or Update of Event requires locking both the parent Contact and
the parent Account.
▪ Insert or Update of Task requires locking both the parent Contact and
parent Account, if the Task is marked as complete.
▪ Insert of Case requires locking the parent Contact and parent Account.
▪ In objects that are part of a master/detail relationship, updating a detail
record requires locking the parent if roll-up summary fields exist.
Multi-threaded Operations
▪ Locking should be taken into consideration for API integrations,
data loads, apex future methods, etc. where requests will be run
in parallel.
▪ Ideally requests that run concurrently should not require the
same locks.
- Different requests can’t update same records
- Different requests can’t update multiple children of the same parent
Prioritize the Data into Tiers

Tier 1 Objects
SFDC
API
Tier 2 Objects

Tier 3: On Premise
SOA

*
Tier 1 : Normal Data
▪ Normal SFDC data
▪ List views, standard reporting, and search
▪ Data set should be ~< 10 Million records
▪ Can include snapshot summary of key data to facilitate query
optimization
Tier 2 : Storage Objects
▪ Custom Objects in a read-only approximation
▪ No standard reporting and search
▪ Use Visualforce pages to make filtered search queries and limit
view to users
▪ Data set should be ~< 50 Million records
Tier 3 : On - Premise Objects
▪ Stored in an on-premise/datawarehouse database
▪ Viewable only through mashups
▪ Integration processes move objects from SFDC to Tier 3, and from
Tier 3 to other Tiers
▪ Part of a larger SOA framework
▪ Data set can be > 50 Million records
Denormalizing Data Increases Performance
▪Select name from contact where Account.
SLA_Serial_Number__c IN :ListOfSerialNums
▪Solution
▪Copy SLA_Serial_Number to a field in Contact (don’t use a formula)
and make the field an External Id
▪OR query for the account IDs with the SLA Serial number first
Batch Apex
▪ Running concurrent Batch Apex jobs on the same record set can
lead to contention.
-

Concurrent jobs will likely perform DML that requires locks on the same records.

▪ One workaround is to parallelize jobs by using an Autonumber field
and a Formula field using the MOD function on the Autonumber
field.
-

This ensures that each job will operate on an entirely different record set.

-

Be careful with records that require locking their parent records.
▪

For example the child in a master-detail relationship.
Batch Apex – Avoid Errors in Bulk DML
global void execute(Database.BatchableContext bc,
List<Account> scope) {
for(Account acc : scope) { /* do something */ }
Database.SaveResult[] results = Database.update(scope,
false);
/* look at results */
}

▪ If an error occurs in this save operation, Salesforce will try to save it
one record at a time.
▪ This performs significantly slower than a bulk save without
errors.
The Key To Good Discovery Questions
▪ Don’t lead the witness.
▪ Confirm answers from multiple sources.
▪ Ask about median, peak, exceptional event volumes.
▪ When you think you’ve got it all, is there anything we’re forgetting?
▪ Don’t just think about the requirements for today. Ask about growth
projections and make some yourself.
▪ Know your governor limits and bulk limits, etc.
Questions To Ask
▪ Stakeholder Expectations

▪ Data Access / Sharing

– What are the performance criteria?

– What is the likely growth in data volumes?

– How long will migration/synchronization take?

– Will the current plan support that growth?

– Are there business-mandated update
windows?

– How can data updates be segmented?

▪ Reporting Requirements
– How many rows are expected in results?
– Do they need to view all results or is paging a
possibility?
– Understand Performance expectations.
– Are Reports Segmented or Filtered?
– Report Samples may drive additional
questions.

– If not, start planning NOW.
– Dig deep on role hierarchy. How many
levels?
– Is there a large number of OR complex
sharing rules?
– How many records are owned by particular
users? (max. vs. median)
– Will they be using Territory Management? If
so, how many levels?
Questions To Ask
▪ Rollback

▪ Data Integration

– What happens if an integration load or synch
fails?

– What data will be native to SFDC vs.
updated from an external master?

– How long will rollback take?

– Will changes be driven from SFDC or the
external system?

– What services are affected during a rollback?
– What is the mitigation plan?

– How frequently will it change? Update
windows or immediately?
– Do you need workflows or triggers?

▪ Purging / Archiving Data
– Is some data transient?

▪ Replication

– What data can be archived?

– Do I need backups for compliance?

– When can it be archived?

– What is my backup strategy?

– What are the restore/recover requirements?

– When and how can I archive the different
types of data in Salesforce?

– What are the Compliance / legal requirements
on access / availability?
Analyzing Performance – Developer Console
▪ Use the Developer Console to analyze server-side performance.
▪ Apex debug logs will be generated for every server request you perform
while the window is open.
▪ Several tools are available in the Developer Console to find performance
hotspots.
Leveraging Bulk API Best Practices
▪ Use Parallel Mode When possible.
–

See FAQ for scenarios when you would serial processing

▪ Organize Batches to Minimize Lock Contention
▪ Be Aware of Operations that Increase Lock Contention
–
–
–
–
–

Creating new Users
Updating ownership of records with private sharing
Updating user roles
Updating territory hierarchies.
SOLUTION: Create separate jobs to process data in serial mode.

▪ Minimize # of Fields
–

Foreign keys, lookup relationships, and summary fields are frequent culprits.

▪ Minimize or better yet Eliminate Workflow Actions.
▪ Minimize or Eliminate Triggers
▪ Optimize Batch Size
–
–
–

▪
▪
▪
▪

any batch that takes more than 10 minutes is suspended and returned to the queue for later processing. The best course of action is
to submit batches that process in less than 10 minutes.
Techniques
Start with 5000 records and adjust the batch size based on processing time. If it takes more than five minutes to process a batch, it
may be beneficial to reduce the batch size. If it takes a few seconds, the batch size should be increased. If you get a timeout error
when processing a batch, split your batch into smaller batches, and try again.

Defer complex sharing rules
Speed of operation; Insert then Update then Upsert (involves implicit query)
Group and sequence data to avoid parent record locking
Remember database statistics calculate overnight, wait to do performance testing
Leveraging Batch Apex Best Practices
▪

Consider setting it to the maximum that the execute can support without running into governor
limits. Default is 200.

▪

If you are operating on large volume of data, limit the Query Locator size and consider running
concurrent Batch Apex jobs.

▪

Chain Batch Apex Jobs:
Using Apex Scheduler
In the finish method of the Batch Apex job, create an Apex Scheduler instance to run just
once and schedule the next Batch Apex job.
• Using Email Services
Create an Apex class that implements Message.InboundEmailHandler interface,
Configure Inbound Email Service Handler,
In the finish method of the Batch Apex job, send an email to the Inbound Email Handler,
In the Inbound Email Handler class, submit the next Batch Apex job.

More Related Content

What's hot

Test Classes in Salesforce
Test Classes in SalesforceTest Classes in Salesforce
Test Classes in SalesforceAtul Gupta(8X)
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexSalesforce Developers
 
Big Objects in Salesforce
Big Objects in SalesforceBig Objects in Salesforce
Big Objects in SalesforceAmit Chaudhary
 
Salesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best PracticesSalesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best Practicespanayaofficial
 
Episode 4 - Introduction to SOQL in Salesforce
Episode 4  - Introduction to SOQL in SalesforceEpisode 4  - Introduction to SOQL in Salesforce
Episode 4 - Introduction to SOQL in SalesforceJitendra Zaa
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelSalesforce Developers
 
Large Data Volume Salesforce experiences
Large Data Volume Salesforce experiencesLarge Data Volume Salesforce experiences
Large Data Volume Salesforce experiencesCidar Mendizabal
 
Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015Samuel De Rycke
 
Extreme Salesforce Data Volumes Webinar
Extreme Salesforce Data Volumes WebinarExtreme Salesforce Data Volumes Webinar
Extreme Salesforce Data Volumes WebinarSalesforce Developers
 
Profiles and permission sets in salesforce
Profiles and permission sets in salesforceProfiles and permission sets in salesforce
Profiles and permission sets in salesforceSunil kumar
 
Simplifying the Complexity of Salesforce CPQ: Tips & Best Practices
Simplifying the Complexity of Salesforce CPQ: Tips & Best PracticesSimplifying the Complexity of Salesforce CPQ: Tips & Best Practices
Simplifying the Complexity of Salesforce CPQ: Tips & Best Practicespanayaofficial
 
All About Test Class in #Salesforce
All About Test Class in #SalesforceAll About Test Class in #Salesforce
All About Test Class in #SalesforceAmit Singh
 
Secure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and SharingSecure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and SharingSalesforce Developers
 
SOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || SalesforceSOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || SalesforceAmit Singh
 
Salesforce Summer 22 Release Webinar
Salesforce Summer 22 Release WebinarSalesforce Summer 22 Release Webinar
Salesforce Summer 22 Release Webinarbrightgenss
 

What's hot (20)

Test Classes in Salesforce
Test Classes in SalesforceTest Classes in Salesforce
Test Classes in Salesforce
 
Performance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and ApexPerformance Tuning for Visualforce and Apex
Performance Tuning for Visualforce and Apex
 
Big Objects in Salesforce
Big Objects in SalesforceBig Objects in Salesforce
Big Objects in Salesforce
 
Exploring the Salesforce REST API
Exploring the Salesforce REST APIExploring the Salesforce REST API
Exploring the Salesforce REST API
 
Salesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best PracticesSalesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best Practices
 
Episode 4 - Introduction to SOQL in Salesforce
Episode 4  - Introduction to SOQL in SalesforceEpisode 4  - Introduction to SOQL in Salesforce
Episode 4 - Introduction to SOQL in Salesforce
 
Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
 
Using Apex for REST Integration
Using Apex for REST IntegrationUsing Apex for REST Integration
Using Apex for REST Integration
 
Introduction to the Salesforce Security Model
Introduction to the Salesforce Security ModelIntroduction to the Salesforce Security Model
Introduction to the Salesforce Security Model
 
Large Data Volume Salesforce experiences
Large Data Volume Salesforce experiencesLarge Data Volume Salesforce experiences
Large Data Volume Salesforce experiences
 
Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015Asynchronous Apex Salesforce World Tour Paris 2015
Asynchronous Apex Salesforce World Tour Paris 2015
 
Extreme Salesforce Data Volumes Webinar
Extreme Salesforce Data Volumes WebinarExtreme Salesforce Data Volumes Webinar
Extreme Salesforce Data Volumes Webinar
 
Profiles and permission sets in salesforce
Profiles and permission sets in salesforceProfiles and permission sets in salesforce
Profiles and permission sets in salesforce
 
Simplifying the Complexity of Salesforce CPQ: Tips & Best Practices
Simplifying the Complexity of Salesforce CPQ: Tips & Best PracticesSimplifying the Complexity of Salesforce CPQ: Tips & Best Practices
Simplifying the Complexity of Salesforce CPQ: Tips & Best Practices
 
Apex Design Patterns
Apex Design PatternsApex Design Patterns
Apex Design Patterns
 
All About Test Class in #Salesforce
All About Test Class in #SalesforceAll About Test Class in #Salesforce
All About Test Class in #Salesforce
 
Secure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and SharingSecure Coding: Field-level Security, CRUD, and Sharing
Secure Coding: Field-level Security, CRUD, and Sharing
 
SOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || SalesforceSOQL in salesforce || Salesforce Object Query Language || Salesforce
SOQL in salesforce || Salesforce Object Query Language || Salesforce
 
Salesforce Summer 22 Release Webinar
Salesforce Summer 22 Release WebinarSalesforce Summer 22 Release Webinar
Salesforce Summer 22 Release Webinar
 
Salesforce asynchronous apex
Salesforce asynchronous apexSalesforce asynchronous apex
Salesforce asynchronous apex
 

Viewers also liked

Salesforce Integration: Talking the Pain out of Data Loading
Salesforce Integration: Talking the Pain out of Data LoadingSalesforce Integration: Talking the Pain out of Data Loading
Salesforce Integration: Talking the Pain out of Data LoadingDarren Cunningham
 
Design Patterns for Asynchronous Apex
Design Patterns for Asynchronous ApexDesign Patterns for Asynchronous Apex
Design Patterns for Asynchronous ApexSalesforce Developers
 
Blurring the Boundaries Between Salesforce Orgs
Blurring the Boundaries Between Salesforce OrgsBlurring the Boundaries Between Salesforce Orgs
Blurring the Boundaries Between Salesforce OrgsSalesforce Developers
 
Event Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and SecurityEvent Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and SecurityDreamforce
 
Salesforce Process builder Vs Workflows
Salesforce Process builder Vs WorkflowsSalesforce Process builder Vs Workflows
Salesforce Process builder Vs WorkflowsPrasanna Deshpande ☁
 
Handling of Large Data by Salesforce
Handling of Large Data by SalesforceHandling of Large Data by Salesforce
Handling of Large Data by SalesforceThinqloud
 
How Splunk connects Salesforce
How Splunk connects SalesforceHow Splunk connects Salesforce
How Splunk connects SalesforceMuleSoft
 
Roadmap Lightning Updates (November 3, 2016)
Roadmap Lightning Updates (November 3, 2016)Roadmap Lightning Updates (November 3, 2016)
Roadmap Lightning Updates (November 3, 2016)Salesforce Partners
 
Performance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce CloudPerformance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce CloudSalesforce Developers
 

Viewers also liked (10)

Salesforce Integration: Talking the Pain out of Data Loading
Salesforce Integration: Talking the Pain out of Data LoadingSalesforce Integration: Talking the Pain out of Data Loading
Salesforce Integration: Talking the Pain out of Data Loading
 
Design Patterns for Asynchronous Apex
Design Patterns for Asynchronous ApexDesign Patterns for Asynchronous Apex
Design Patterns for Asynchronous Apex
 
Blurring the Boundaries Between Salesforce Orgs
Blurring the Boundaries Between Salesforce OrgsBlurring the Boundaries Between Salesforce Orgs
Blurring the Boundaries Between Salesforce Orgs
 
Event Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and SecurityEvent Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and Security
 
Salesforce Process builder Vs Workflows
Salesforce Process builder Vs WorkflowsSalesforce Process builder Vs Workflows
Salesforce Process builder Vs Workflows
 
Handling of Large Data by Salesforce
Handling of Large Data by SalesforceHandling of Large Data by Salesforce
Handling of Large Data by Salesforce
 
How Splunk connects Salesforce
How Splunk connects SalesforceHow Splunk connects Salesforce
How Splunk connects Salesforce
 
Large Data Management Strategies
Large Data Management StrategiesLarge Data Management Strategies
Large Data Management Strategies
 
Roadmap Lightning Updates (November 3, 2016)
Roadmap Lightning Updates (November 3, 2016)Roadmap Lightning Updates (November 3, 2016)
Roadmap Lightning Updates (November 3, 2016)
 
Performance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce CloudPerformance Monitoring and Testing in the Salesforce Cloud
Performance Monitoring and Testing in the Salesforce Cloud
 

Similar to Follow the evidence: Troubleshooting Performance Issues

The Need for Speed: Building Reports That Fly
The Need for Speed: Building Reports That FlyThe Need for Speed: Building Reports That Fly
The Need for Speed: Building Reports That FlySalesforce Developers
 
Process Automation Showdown Session 1
Process Automation Showdown Session 1Process Automation Showdown Session 1
Process Automation Showdown Session 1Michael Gill
 
MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...
MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...
MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...Salesforce Admins
 
Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)Salesforce Partners
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce orgRoy Gilad
 
Shorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for ApexShorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for ApexSalesforce Developers
 
Apex 10 commandments df14
Apex 10 commandments df14Apex 10 commandments df14
Apex 10 commandments df14Kevin Poorman
 
Apex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentApex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentSalesforce Developers
 
A Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and TriggersA Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and TriggersSalesforce Developers
 
Advanced Reporting Tips and Tricks for New Admins
Advanced Reporting Tips and Tricks for New AdminsAdvanced Reporting Tips and Tricks for New Admins
Advanced Reporting Tips and Tricks for New AdminsSalesforce Admins
 
5 Easy Ways to Make Your Org Instantly More User Friendly
5 Easy Ways to Make Your Org Instantly More User Friendly5 Easy Ways to Make Your Org Instantly More User Friendly
5 Easy Ways to Make Your Org Instantly More User FriendlyTraction on Demand
 
A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowSalesforce Admins
 
Enterprise Analytics - Salesforce.com Toronto User Group Presentation
Enterprise Analytics - Salesforce.com Toronto User Group PresentationEnterprise Analytics - Salesforce.com Toronto User Group Presentation
Enterprise Analytics - Salesforce.com Toronto User Group PresentationTorontoSFDC
 
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...Salesforce Admins
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinarJackGuo20
 
Getting to Grips with Process Builder
Getting to Grips with Process BuilderGetting to Grips with Process Builder
Getting to Grips with Process BuilderRichard Clark
 
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature EnvironmentPuppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature EnvironmentPuppet
 
Build You First App in 5 Easy Steps
Build You First App in 5 Easy StepsBuild You First App in 5 Easy Steps
Build You First App in 5 Easy StepsRebecca Saar
 

Similar to Follow the evidence: Troubleshooting Performance Issues (20)

The Need for Speed: Building Reports That Fly
The Need for Speed: Building Reports That FlyThe Need for Speed: Building Reports That Fly
The Need for Speed: Building Reports That Fly
 
Process Automation Showdown Session 1
Process Automation Showdown Session 1Process Automation Showdown Session 1
Process Automation Showdown Session 1
 
MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...
MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...
MVP Process Automation Showdown by Chris Edwards, Jennifer Lee, Michael Gill ...
 
Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)Design Patterns Every ISV Needs to Know (October 15, 2014)
Design Patterns Every ISV Needs to Know (October 15, 2014)
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
 
Shorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for ApexShorten Your Development Time with an Extensible Design for Apex
Shorten Your Development Time with an Extensible Design for Apex
 
Apex 10 commandments df14
Apex 10 commandments df14Apex 10 commandments df14
Apex 10 commandments df14
 
Building Reports That Fly
Building Reports That FlyBuilding Reports That Fly
Building Reports That Fly
 
Monitoring @ Scale in Salesforce
Monitoring @ Scale in SalesforceMonitoring @ Scale in Salesforce
Monitoring @ Scale in Salesforce
 
Apex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com DevelopmentApex Nuances: Transitioning to Force.com Development
Apex Nuances: Transitioning to Force.com Development
 
A Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and TriggersA Pocket Guide to Process Builder, Flows, and Triggers
A Pocket Guide to Process Builder, Flows, and Triggers
 
Advanced Reporting Tips and Tricks for New Admins
Advanced Reporting Tips and Tricks for New AdminsAdvanced Reporting Tips and Tricks for New Admins
Advanced Reporting Tips and Tricks for New Admins
 
5 Easy Ways to Make Your Org Instantly More User Friendly
5 Easy Ways to Make Your Org Instantly More User Friendly5 Easy Ways to Make Your Org Instantly More User Friendly
5 Easy Ways to Make Your Org Instantly More User Friendly
 
A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-Low
 
Enterprise Analytics - Salesforce.com Toronto User Group Presentation
Enterprise Analytics - Salesforce.com Toronto User Group PresentationEnterprise Analytics - Salesforce.com Toronto User Group Presentation
Enterprise Analytics - Salesforce.com Toronto User Group Presentation
 
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinar
 
Getting to Grips with Process Builder
Getting to Grips with Process BuilderGetting to Grips with Process Builder
Getting to Grips with Process Builder
 
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature EnvironmentPuppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
Puppet Camp San Francisco 2015: Puppet Adoption in a Mature Environment
 
Build You First App in 5 Easy Steps
Build You First App in 5 Easy StepsBuild You First App in 5 Easy Steps
Build You First App in 5 Easy Steps
 

More from Salesforce Developers

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSalesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceSalesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base ComponentsSalesforce Developers
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsSalesforce Developers
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaSalesforce Developers
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentSalesforce Developers
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsSalesforce Developers
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsSalesforce Developers
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionSalesforce Developers
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPSalesforce Developers
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceSalesforce Developers
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureSalesforce Developers
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DXSalesforce Developers
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectSalesforce Developers
 

More from Salesforce Developers (20)

Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce DevelopersSample Gallery: Reference Code and Best Practices for Salesforce Developers
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
 
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component PerformanceMaximizing Salesforce Lightning Experience and Lightning Component Performance
Maximizing Salesforce Lightning Experience and Lightning Component Performance
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Why developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX IndiaWhy developers shouldn’t miss TrailheaDX India
Why developers shouldn’t miss TrailheaDX India
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
CodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web ComponentsCodeLive: Converting Aura Components to Lightning Web Components
CodeLive: Converting Aura Components to Lightning Web Components
 
Enterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web ComponentsEnterprise-grade UI with open source Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
 
TrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer HighlightsTrailheaDX and Summer '19: Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
 
Live coding with LWC
Live coding with LWCLive coding with LWC
Live coding with LWC
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Lightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An IntroductionLightning web components - Episode 1 - An Introduction
Lightning web components - Episode 1 - An Introduction
 
Migrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCPMigrating CPQ to Advanced Calculator and JSQCP
Migrating CPQ to Advanced Calculator and JSQCP
 
Scale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in SalesforceScale with Large Data Volumes and Big Objects in Salesforce
Scale with Large Data Volumes and Big Objects in Salesforce
 
Replicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data CaptureReplicate Salesforce Data in Real Time with Change Data Capture
Replicate Salesforce Data in Real Time with Change Data Capture
 
Modern Development with Salesforce DX
Modern Development with Salesforce DXModern Development with Salesforce DX
Modern Development with Salesforce DX
 
Get Into Lightning Flow Development
Get Into Lightning Flow DevelopmentGet Into Lightning Flow Development
Get Into Lightning Flow Development
 
Integrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS ConnectIntegrate CMS Content Into Lightning Communities with CMS Connect
Integrate CMS Content Into Lightning Communities with CMS Connect
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Follow the evidence: Troubleshooting Performance Issues

  • 1. Follow the evidence: Troubleshooting performance issues T.K. Horeis, salesforce.com, Cloud and Industry Architect @TKHoreis
  • 2. Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. T.K. Horeis Cloud and Industry Architect @TKHoreis
  • 4. Our customer, let’s call them Brand-X Tip: Don’t Rush To Judgement % 9 > >1 0%
  • 5. They Were Simply Using Too Much Capacity Tip: Don’t Rush To Judgement
  • 6. How Did We Know? Tip: it a Subm To Case er i rem t P ppor Su • Count • Long-running operations • Total Runtime • CPU time • Db CPU time • Buffer Gets
  • 7. So We Recommended That They Needed To… 40% – 50% ▪ Reduce combined buffer gets and DB CPU by 20% - 25% ▪ Reduce combined runTime by 20%-25% ▪ Reduce combined App cpuTime by
  • 8. Here’s What We Knew At The Time • Capacity usage was proportionally LARGE • The EU org will be merged into NA • EU users would use NA business processes only • Some EMEA users (Ireland) have already been moved over.
  • 9. And this is where our investigation begins…
  • 10. Lots Of Evidence At The Scene Of The Crime
  • 11. Lots Of Evidence At The Scene Of The Crime
  • 12. Lots Of Evidence At The Scene Of The Crime RE ST S AP O
  • 14. So Just What Are They Loading So Many Times? • • • • • • • • • • /apex/qbdialer__sid 1814897 /apex/questionpage 6314 /apex/oppinformationrequest 5871 /apex/merchantaddys 5636 /apex/dnralert 5611 /apex/redemptionaddy 5503 /apex/account_geocoder 5080 /apex/pastdeals 4589 /apex/inlineoptions 3986 /apex/accountgoogleanalytics 3444
  • 15. And When We Dig Further… Where the median # of calls per day is ~1500. Were those top 4 users REALLY making hundreds of thousands of calls per day?
  • 16. Not Exactly… An old version of Power Dialer From Inside Sales was the source of this problem. •Users that liberally use tabs can magnify browser issues • Polling sidebar component created an issue •Controller ran unnecessary queries • Vendor produce a patch •Browser issues can linger if users don’t restart Bottom Line: A 64% Reduction in VF loads
  • 17. Lessons Learned ▪ It’s easier to find the culprit when you isolate the scenario. ▪ Don’t make assumptions. Let the data guide you. • Just because it’s an AppExchange app, doesn’t mean it’s correct. ▪ Trust, but verify
  • 19. Reporting Usage Is Off The Charts! •~50% of all db gets come from reports •Daily Report Stats: •~4000 reports being run daily •45K-60K report executions daily •10B-15B gets from reports •6 users were using 9-13% of their report gets daily. So Where Would You Start?
  • 20. Why 4000 Unique Reports? Lack of Report Governance Anyone can create any report they want Run it as often as they want Many reports were are the same or almost the same Lather, Rinse, Repeat Problem with bad reports ➢ Restrict who can create reports ➢ Restrict reporting access to some objects. ➢ Establish process to collect reporting requests ➢ Create in demand reports, so they can be shared. ➢ Use scheduled reports and dynamic dashboards ➢ Training, Training, Training Bottom Line: A work in progress…
  • 21. Why 45k-60k Report Executions Per Day? Six 6 users routinely executed a set of similar reports thousands of times / day. It turns out they were using a browser script to continually refresh. What Would You Do?
  • 22. Possible Solutions Restrict Who Can Run Reports Customer indicated that they couldn’t do that Tell users to stop running the script This was done, but wasn’t immediately effective. Restrict Login Hours Customer wasn’t willing to do that just yet. Improve the report Done (see improvement in db gets) Implement workflows Tip: Planned What you see as the problem, could simply be another symptom. Bottom Line: A 34% Reduction in the Execs
  • 23. Why 10-15B Db Gets Are Coming From Reports? Problems Solutions ❑ Hundreds of unselective reports that have > 1M gets/exec ➢Restrict Who Can Create Reports ❑ Many unselective reports that have 15M35M gets/exec ➢Your job doesn’t stop with implementing, you need to train them (cheatsheets, index lists, sample reports). ❑ Two key report profiles contribute ~30% of overall get count ➢Revisit the project to audit, profile, and optimize.
  • 24. Document available indexes Primary keys • Id List of Indexed Fields • Name • OwnerId Foreign keys • • • • Lookup Master-detail CreatedById LastModifiedById Audit dates • • • • CreatedDate LastActivityDate LastModifiedDate SystemModstamp Custom fields • Unique • External ID
  • 25. Create your own indexes
  • 26. Need Additional Indexes? ▪ Salesforce support can create single and two-column custom indexes on most fields (with the exception of multi-picklists, formula fields that reference other objects, and Long Text Area/Rich Text Area) ▪ Open a case ➢ ➢ Bind Variables ➢ Org ID and user ID who would run the query ➢ ▪ Sample Query Suggested index – OPTIONAL If they create an index, then SAVE and DOCUMENT where the index was created
  • 27. Understand SOQL query optimization Cheat Sheet: Selectivity Rules Standard indexes • Simple predicate targets < 20% of total records or 666K • AND predicate targets < 20% of total records • OR predicate targets < 10% or 333K of total records Custom indexes • Simple predicate targets < 10% of total records or 333K • AND predicate targets < 666K of total records • OR predicate targets < 10% or 333K of total records LIKE • Tests first 100K rows for selectivity Predicates that can lead to full table scans • NULL • Not equal • Contains • Not In • Does not contain • Leading wildcards • Formula fields
  • 28. Potential Improvements Identified ❑Key Opportunity Report • 9-13% of total report gets/day ❑Custom Object Report • 0-16% of report buffer gets /day ❑Various Account Reports ❑Various Lead Reports ❑Various Opportunity Reports Can ’t In dex WHERE Opportunity.Writeup_Status_del__c = 'Needs Details‘ WHERE Opportunity.Writeup_Status_del__c = 'Needs DQ' • This filter field is a complex formula field. ✓ Create sister field using trigger. ✓ Index sister field. ✓ Modify dependent reports.
  • 29. Potential Improvements Identified ❑ Key Opportunity Report • 9-13% of total report gets/day ❑ Custom Object Report • 0-16% of report buffer gets /day ❑ Various Account Reports ❑ Various Lead Reports ❑ Various Opportunity Reports WHERE Call_List_Priority__c IS [NOT] NULL OR Call_List_Priority__c < '. 00000000000000000201‘ • ‘<‘ and ‘>’ operators can’t optimize text fields ✓ Investigate process that populates this field ✓ Retype field as NUMBER ✓ Modify reports so < operator can be optimized ✓ Index field
  • 30. Potential Improvements Identified ❑Key Opportunity Report • 9-13% of total report gets/day ❑Custom Object Report • 0-16% of report buffer gets /day ❑Various Account Reports ❑Various Lead Reports ❑Various Opportunity Reports • • • • • Using non-selective queries Customer has wide objects (i.e. Oppty) Determine appropriate selective field Index field Create Skinny Tables Bottom Line: A 98% Reduction in Db Gets
  • 31. Lessons Learned ▪ Report on reports to isolate the problem • Cost of individual reports • Number of report runs per day • Non-selective queries • Problematic queries ▪ Report Governance • Who is the author of problematic reports? • Custom Report Types models that the masses can customize ▪ Is it really a reporting problem? • Data Model • Workflow, Business process, etc.
  • 33. What’s Wrong With Our Migration? Customer expressed concerns because using bulk API uploaded insert of 17k accounts and it took 27 minutes with workflows, validations, triggers. What’s wrong here? They also requested that we turn code coverage to zero. Why?
  • 34. What We Found Tip: Follow Best Practices. They’ ve been created for a reason. We suggested adjusting batch sizes on bulk loads from the default to a lower number. A value of 60 was found to be optimal. DupeBlocker was in use and the vendor, advises turning off triggers during migrations. They update a custom object record during account updates / inserts / deletes, which can cause significant contention problems that slow down bulk DML operations. The request to turn code coverage tests to 0% was related to poorly constructed tests that required triggers to be active. This is clearly at odds with Salesforce Best Practice. The below was provided as a workaround. if(custom_setting__c.getInstance().disable_all_triggers__c == true) return; Bottom Line: 66% Load Time Improvement
  • 35. Disable actions that fire on insert Triggers Validation Rules Workflow Rules
  • 36. Defer sharing calculations OR … … load with Public default sharing Just make sure you turn it back on again!!!
  • 37. Prep your data to avoid overhead
  • 38. What We Found Tip: Upon further investigation, we found: What’s the concern here? Trust, but verify.
  • 39. Lessons Learned ▪ Trust, but verify • Initial reports of causality may be misleading • Follow the data to the cause • Non-selective queries • Problematic queries ▪ Follow Best Practices • Prep your data in advance for the best results • Understand how to structure your bulk operations • You may need to turn off sharing and other automatic functionality to improve performance.
  • 41. Architect Core Resource page • Featured content for architects • Articles, papers, blog posts, events • Follow us on Twitter Updated weekly! http://developer.force.com/architect
  • 42. Resources Apex Governor Limits http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm Best Practices for Deployments with Large Data Volumes http://www.salesforce.com/us/developer/docs/ldv/salesforce_large_data_volumes_bp.pdf Loading Large Data Sets with the Force.com Bulk API http://wiki.developerforce.com/page/Loading_Large_Data_Sets_with_the_Force.com_Bulk_API Report Performance https://na1.salesforce.com/help/doc/en/salesforce_reportperformance_cheatsheet.pdf
  • 43. Additional Resources Bulk API Developers Guide http://www.salesforce.com/us/developer/docs/api_asynch/api_bulk.pdf Bulk API Errors http://www.salesforce. com/us/developer/docs/api_asynch/Content/asynch_api_reference_errors.htm Batch Apex http://www.salesforce.com/us/developer/docs/apexcode/index_Left. htm#StartTopic=Content/apex_batch.htm Failing Safe with Apex Data Loader http://tedhusted.blogspot.com/2012/04/failing-safe-with-apex-data-loader-for.html Tools – Data Loader - http://wiki.developerforce.com/page/Data_Loader – Dell Boomi - http://www.boomi.com/ – IBM CastIron - http://ibm.co/PO0Qv8 – Informatica - http://bit.ly/OeRcCi
  • 44.
  • 45.
  • 47. Record Lock Lifecycle ▪ Record Locks = Data Integrity ▪ Salesforce locks a record before executing a DML operation. - This is done before the starting the save process. ▪ - The save process is documented on this page: Triggers and Order of Execution. Records will remain locked until commit. ▪ Salesforce will wait up to 10 seconds to lock a record before throwing an UNABLE_TO_LOCK_ROW error. - Even if no errors occur, waiting for locks can significantly slow DML operations.
  • 48. Parent-Child Relationships ▪ Insert of Contact requires locking the parent Account. ▪ Insert or Update of Event requires locking both the parent Contact and the parent Account. ▪ Insert or Update of Task requires locking both the parent Contact and parent Account, if the Task is marked as complete. ▪ Insert of Case requires locking the parent Contact and parent Account. ▪ In objects that are part of a master/detail relationship, updating a detail record requires locking the parent if roll-up summary fields exist.
  • 49. Multi-threaded Operations ▪ Locking should be taken into consideration for API integrations, data loads, apex future methods, etc. where requests will be run in parallel. ▪ Ideally requests that run concurrently should not require the same locks. - Different requests can’t update same records - Different requests can’t update multiple children of the same parent
  • 50. Prioritize the Data into Tiers Tier 1 Objects SFDC API Tier 2 Objects Tier 3: On Premise SOA *
  • 51. Tier 1 : Normal Data ▪ Normal SFDC data ▪ List views, standard reporting, and search ▪ Data set should be ~< 10 Million records ▪ Can include snapshot summary of key data to facilitate query optimization
  • 52. Tier 2 : Storage Objects ▪ Custom Objects in a read-only approximation ▪ No standard reporting and search ▪ Use Visualforce pages to make filtered search queries and limit view to users ▪ Data set should be ~< 50 Million records
  • 53. Tier 3 : On - Premise Objects ▪ Stored in an on-premise/datawarehouse database ▪ Viewable only through mashups ▪ Integration processes move objects from SFDC to Tier 3, and from Tier 3 to other Tiers ▪ Part of a larger SOA framework ▪ Data set can be > 50 Million records
  • 54. Denormalizing Data Increases Performance ▪Select name from contact where Account. SLA_Serial_Number__c IN :ListOfSerialNums ▪Solution ▪Copy SLA_Serial_Number to a field in Contact (don’t use a formula) and make the field an External Id ▪OR query for the account IDs with the SLA Serial number first
  • 55. Batch Apex ▪ Running concurrent Batch Apex jobs on the same record set can lead to contention. - Concurrent jobs will likely perform DML that requires locks on the same records. ▪ One workaround is to parallelize jobs by using an Autonumber field and a Formula field using the MOD function on the Autonumber field. - This ensures that each job will operate on an entirely different record set. - Be careful with records that require locking their parent records. ▪ For example the child in a master-detail relationship.
  • 56. Batch Apex – Avoid Errors in Bulk DML global void execute(Database.BatchableContext bc, List<Account> scope) { for(Account acc : scope) { /* do something */ } Database.SaveResult[] results = Database.update(scope, false); /* look at results */ } ▪ If an error occurs in this save operation, Salesforce will try to save it one record at a time. ▪ This performs significantly slower than a bulk save without errors.
  • 57. The Key To Good Discovery Questions ▪ Don’t lead the witness. ▪ Confirm answers from multiple sources. ▪ Ask about median, peak, exceptional event volumes. ▪ When you think you’ve got it all, is there anything we’re forgetting? ▪ Don’t just think about the requirements for today. Ask about growth projections and make some yourself. ▪ Know your governor limits and bulk limits, etc.
  • 58. Questions To Ask ▪ Stakeholder Expectations ▪ Data Access / Sharing – What are the performance criteria? – What is the likely growth in data volumes? – How long will migration/synchronization take? – Will the current plan support that growth? – Are there business-mandated update windows? – How can data updates be segmented? ▪ Reporting Requirements – How many rows are expected in results? – Do they need to view all results or is paging a possibility? – Understand Performance expectations. – Are Reports Segmented or Filtered? – Report Samples may drive additional questions. – If not, start planning NOW. – Dig deep on role hierarchy. How many levels? – Is there a large number of OR complex sharing rules? – How many records are owned by particular users? (max. vs. median) – Will they be using Territory Management? If so, how many levels?
  • 59. Questions To Ask ▪ Rollback ▪ Data Integration – What happens if an integration load or synch fails? – What data will be native to SFDC vs. updated from an external master? – How long will rollback take? – Will changes be driven from SFDC or the external system? – What services are affected during a rollback? – What is the mitigation plan? – How frequently will it change? Update windows or immediately? – Do you need workflows or triggers? ▪ Purging / Archiving Data – Is some data transient? ▪ Replication – What data can be archived? – Do I need backups for compliance? – When can it be archived? – What is my backup strategy? – What are the restore/recover requirements? – When and how can I archive the different types of data in Salesforce? – What are the Compliance / legal requirements on access / availability?
  • 60. Analyzing Performance – Developer Console ▪ Use the Developer Console to analyze server-side performance. ▪ Apex debug logs will be generated for every server request you perform while the window is open. ▪ Several tools are available in the Developer Console to find performance hotspots.
  • 61. Leveraging Bulk API Best Practices ▪ Use Parallel Mode When possible. – See FAQ for scenarios when you would serial processing ▪ Organize Batches to Minimize Lock Contention ▪ Be Aware of Operations that Increase Lock Contention – – – – – Creating new Users Updating ownership of records with private sharing Updating user roles Updating territory hierarchies. SOLUTION: Create separate jobs to process data in serial mode. ▪ Minimize # of Fields – Foreign keys, lookup relationships, and summary fields are frequent culprits. ▪ Minimize or better yet Eliminate Workflow Actions. ▪ Minimize or Eliminate Triggers ▪ Optimize Batch Size – – – ▪ ▪ ▪ ▪ any batch that takes more than 10 minutes is suspended and returned to the queue for later processing. The best course of action is to submit batches that process in less than 10 minutes. Techniques Start with 5000 records and adjust the batch size based on processing time. If it takes more than five minutes to process a batch, it may be beneficial to reduce the batch size. If it takes a few seconds, the batch size should be increased. If you get a timeout error when processing a batch, split your batch into smaller batches, and try again. Defer complex sharing rules Speed of operation; Insert then Update then Upsert (involves implicit query) Group and sequence data to avoid parent record locking Remember database statistics calculate overnight, wait to do performance testing
  • 62. Leveraging Batch Apex Best Practices ▪ Consider setting it to the maximum that the execute can support without running into governor limits. Default is 200. ▪ If you are operating on large volume of data, limit the Query Locator size and consider running concurrent Batch Apex jobs. ▪ Chain Batch Apex Jobs: Using Apex Scheduler In the finish method of the Batch Apex job, create an Apex Scheduler instance to run just once and schedule the next Batch Apex job. • Using Email Services Create an Apex class that implements Message.InboundEmailHandler interface, Configure Inbound Email Service Handler, In the finish method of the Batch Apex job, send an email to the Inbound Email Handler, In the Inbound Email Handler class, submit the next Batch Apex job.