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 ...
随机推荐
- POJ 3752
http://poj.org/problem?id=3752 这是一道我觉得还蛮有意思的题目,不难,是个水题,但我也TLE了几次,感到很奇怪,这么简单的循环还TLE,最后一想,肯定是有几个例子我是没有 ...
- ios中的addChildViewController 和 android中的fragment
刚才突然感觉这2个东西的功能特别像,记录一下,待研究!
- pfsense 企业应用实例
从萌生更换公司网关的想法,到选择.测试.部署陆陆续续用时两个月有余.选择的标准是open and free.这期间不断在查阅一些资料,测试了7.8个各开源防火墙产品.这些产品中大多是基于linux,少 ...
- winrt反射
第一步引用扩展类. using System.Reflection.IntrospectionExtensions; 第二步反射. gridView是我定义的GridView控件.ItemClick是 ...
- ubuntu mysql 安装和外网访问配置
1.输入 sudo apt-get install mysql-server 安装过程中会让你输入密码,这个密码是root的密码. 安装完毕后,就可以正常使用了,如果你需要外网用户能够连接继续下面的步 ...
- Effective C++ -----条款30:透彻了解inlining的里里外外
将大多数inlining限制在小型.被频繁调用的函数身上.这可使日后的调试过程和二进制升级(binary upgradability)更容易,也可使潜在的代码膨胀问题最小化,使程序的速度提升机会最大化 ...
- JS点击灯泡变亮(学自W3school)
JS学习笔记1(学自W3school) function changeImage() { element = document.getElementByIdx_x('myimage' ...
- 【XLL API 函数】 xlGetInst
返回正在调用 DLL 的 Excel 实例的实例句柄. 原型 Excel4(xlGetInst, LPXLOPER pxRes, 0); /* returns low part only */ Exc ...
- 添加本地jar到Maven库
转自:http://dk05408.iteye.com/blog/2170986 上传: mvn install:install-file -Dfile=D:/workspace/p2p_server ...
- 浅析 - iOS应用程序的生命周期
1.应用程序的状态 状态如下: Not running 未运行 程序没启动 Inactive 未激活 程序在前台运行,不过没有接收到事件.在没有事件处理情况下程序通 ...