在编写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的更多相关文章

  1. HackerRank "Lucky Numbers"

    Great learning for me:https://www.hackerrank.com/rest/contests/master/challenges/lucky-numbers/hacke ...

  2. JavaScript js调用堆栈(一)

    本文主要介绍JavaScript程序内部的执行机制 首先先了解什么是执行上下文 执行上下文就是当前JavaScript代码被解析和执行是所在环境的抽象概念,JavaScript中运行任何的代码都是在执 ...

  3. 转 Oracle 12c: Managing Resources

    http://www.oracle-class.com/?p=3058 1. Introduction: Oracle database 12c comes with several Resource ...

  4. Understanding the ASP.NET MVC Execution Process

    https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/overview/understanding-the-asp ...

  5. Understanding Virtual Memory

    Understanding Virtual Memory by Norm Murray and Neil Horman Introduction Definitions The Life of a P ...

  6. Understanding JVM Internals---不得不转载呀

    http://www.cubrid.org/blog/dev-platform/understanding-jvm-internals/ http://architects.dzone.com/art ...

  7. Life Cycle of Thread – Understanding Thread States in Java

    Life Cycle of Thread – Understanding Thread States in Java 深入理解java线程生命周期. Understanding Life Cycle ...

  8. Understanding, Operating and Monitoring Apache Kafka

    Apache Kafka is an attractive service because it's conceptually simple and powerful. It's easy to un ...

  9. SharePoint Server 2010 & WorkFlow related Limits

    Today, I have come across different workflow related limits for SharePoint Server 2010. Limit Maximu ...

随机推荐

  1. 7.nodejs权威指南--加密与压缩

    1. 加密与压缩 1.1 加密 var crypto = require('crypto'); var text = "12345678"; var hasher = crypto ...

  2. Java for LeetCode 226 Invert Binary Tree

    Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 Trivia: This problem wa ...

  3. log4net使用

    平时项目里一直都有在使用log4net作为日志记录模块,当时一直都没有去理解log4net的配置文件信息.今天抽出了一点时间来看了看配置文件信息. log4net配置文件信息: <log4net ...

  4. VB兼容问题

    window7 64位无法显示打印窗问题 在Windows7 64位和VS2008环境下,PrintDialog.ShowDialog不能显示打印对话框 在VS2008中编写?如下代码: PrintD ...

  5. code vs1506传话(塔尖)+tarjan图文详解

    1506 传话  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 白银 Silver 题解   题目描述 Description 一个朋友网络,如果a认识b,那么如果a第一次收到 ...

  6. CString 操作

    CString Left( int nCount ) const;                   //从左边1开始获取前 nCount 个字符 CString Mid( int nFirst ) ...

  7. mongodb3.x版本用户管理方法

    db.auth() 作用:验证用户到数据库. 语法: db.auth( { user: <username>, pwd: <password>, mechanism: < ...

  8. 忘记Mysql登录密码

    1,使用安全模式跳过验证: 如果 Mysql在运行,Kill掉. 如果mysqld_safe无法启动,可用管理员权限sudo . 2,本地登录: 启动Mysql 3,修改密码: 5.7之后, 更改密码 ...

  9. 比较原声socket 、GCDAsyncSocket

    原声socket NSInputStream 输入流(OC)NSOutputStream 输出流(OC)1:通过c语言的输入输出流CFReadStreamRef/CFWirteStreamRef(输入 ...

  10. poj2492(种类并查集/各种解法)

    题目链接: http://poj.org/problem?id=2492 题意: 有t组测试数据, 对于每组数据,第一行n, m分别表示昆虫的数目和接下来m行x, y, x, y表示教授判断x, y为 ...