Understanding Execution Governors and Limits
在编写Salesforce后台代码的时候,如果数据量比较大,或者需要与数据库的交互比较频繁的话,那么会抛出一些限制的异常,来提示你让你做进一步的修改。
有这些限制实质上是跟Salesforce是一个云计算平台有关,这个平台同时 host 多个不同的应用共不同的用户使用,那么去限定每个应用所能够访问的最大资源也是有他自身的合理性的。
1): 通过Log可以看到salesforce中的一些设定限制

2): 如何去避免和修改此类异常呢? 最常用的方法就是有如下几种
- 不要在循环中去操作数据库,避免SOQL queries的数量大于100
- 要用数据结构去缓存object的信息,然后一次性的去数据库中将所需要的信息获取出来(这里也要适度,因为还有一个query rows = 50000的限制)
3): 可以到这个链接中查看更加详细的信息 http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm
Understanding Execution Governors and Limits的更多相关文章
- HackerRank "Lucky Numbers"
Great learning for me:https://www.hackerrank.com/rest/contests/master/challenges/lucky-numbers/hacke ...
- JavaScript js调用堆栈(一)
本文主要介绍JavaScript程序内部的执行机制 首先先了解什么是执行上下文 执行上下文就是当前JavaScript代码被解析和执行是所在环境的抽象概念,JavaScript中运行任何的代码都是在执 ...
- 转 Oracle 12c: Managing Resources
http://www.oracle-class.com/?p=3058 1. Introduction: Oracle database 12c comes with several Resource ...
- Understanding the ASP.NET MVC Execution Process
https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/overview/understanding-the-asp ...
- Understanding Virtual Memory
Understanding Virtual Memory by Norm Murray and Neil Horman Introduction Definitions The Life of a P ...
- Understanding JVM Internals---不得不转载呀
http://www.cubrid.org/blog/dev-platform/understanding-jvm-internals/ http://architects.dzone.com/art ...
- Life Cycle of Thread – Understanding Thread States in Java
Life Cycle of Thread – Understanding Thread States in Java 深入理解java线程生命周期. Understanding Life Cycle ...
- Understanding, Operating and Monitoring Apache Kafka
Apache Kafka is an attractive service because it's conceptually simple and powerful. It's easy to un ...
- SharePoint Server 2010 & WorkFlow related Limits
Today, I have come across different workflow related limits for SharePoint Server 2010. Limit Maximu ...
随机推荐
- Binary Tree Longest Consecutive Sequence
Given a binary tree, find the length of the longest consecutive sequence path (连续的路径,不是从小到大). The pa ...
- 【leetcode】Symmetric Tree
Symmetric Tree Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its ...
- Linux设置交换分区swap
参考: http://www.vpser.net/opt/vps-add-swap.html https://www.zntec.cn/archives/vps-swap.html http://yz ...
- DataTemplate应用
在WPF中,决定数据外观的是DataTemplate,即DataTemplate是数据内容的表现形式,一条数据显示成什么样子,是简单的文本还是直观的图形,就是由DataTemplate决定的.下面通过 ...
- Java for LeetCode 223 Rectangle Area
Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined b ...
- json格式
$.post('text.action',{....},function(datas){ var name=datas.data[0].name; }); 如果是多个还可以用循环获取.$.post(' ...
- JQuery 鼠标事件简介
mouseover事件于用户把鼠标从一个元素移动到另外一个元素上时触发,mouseout事件于用户把鼠标移出一个元素时触发. 下面为你详细介绍下jquery中的鼠标事件: (1):click事件:cl ...
- oracle定时器,调用存储过程,定时从n张表中取值新增到本地一张表中
--创建新增本地数据库的存储过程create or replaceprocedure pro_electric_record as begin insert into electric_met ...
- 【轮子】发现一个效果丰富酷炫的Android动画库
没有什么比发现一个好轮子更让人开心的了. 这个库分分钟提高交互体验 :AndroidViewAnimations 一张图说明一切 配置和使用也相当简单 GitHub地址
- springMVC创建基础变量
在springMVC中有一些变量是基础变量,可以在全局多个地方使用,在修改规则的时候,这样只用修改一个地方就好了,而且可以避免很多不必要的bug出现下面就来总结一下在我的项目中如何去创建一个全局基础变 ...