在SQL Server中存储方式主要分为2大类 缓冲和池。都是用来临时存放数据的,到底有什么不同。一直很恼人。

有幸看到一位大牛的博客,截取了其中讲述cache 和 pool的不同点。

Before we jump into further description of stores I would like to explain a difference between meanings of caches and pools. In SQLOS's world, cache is a mechanism to cache heterogeneous type of data with a given cost for each entry. Usually there is a given state associated with an entry. A cache implements lifetime control of an entry, its visibility, and provide some type of LRU policies. Depending on the type of the data cached each entry could be used by multiple clients at the same time. For example SQL Server procedure cache is a  cache in SQLOS' s terms. A plan's lifetime, visibility and cost is controlled by SQLOS's cache mechanism. Each plan can be used by multiple batches at the same time.

Cache 可以存放不同的数据类型的数据,并且备份存储实体都有一个花费值(cost)。 和状态值,可见度,还有一个生命周期,使用一些LRU算法来维护。每个实体都可以在同时被多个客户端访问。如SQL Server 存储Cache 是基于cache的,一个计划的生命周期,花费(cost)都是又SQLOS 的cache机制控制的。每个计划都可以被多个批处理(batches)同时访问。

In its turn, pool, in SQLOS's terms, is a mechanism for caching homogeneous data. In most cases cached data doesn't have neither state nor cost associated with it. A pool has limited control over lifetime of the entry and its visibility.  Once an entry is taken from the pool it is actually removed from it and pool no longer has any control over the entry until the entry is pushed back to the pool. Only one client can use an entry at the time. An example of a pool is a pool of network buffers: no state, no cost , all  buffers of the same size. Keep in mind SQL Server's Buffer Pool is a cache in SQLOS terms. Currently it doesn't use any of SQLOS's caching mechanism

Pool 用来存放相同的数据类型。在多数情况下存储的数据没有状态和花费(cost)。Pool可以控制存储实体的生命周期和可见度。一旦存储实体被读取,就从pool上面被删除了,除非再存入。pool中的实体同一时间只能又一个用户使用。如:network buffers是一个pool,没有状态,没有花费,所有的buffers大小都是相同的。在SQL Server中有一个 buffer pool,它是cache。但是却没有使用SQLOS的cache机制。

SQL Server中 缓冲和池的不同点相关推荐

  1. sql 闩锁 原因_关于SQL Server中的闩锁

    sql 闩锁 原因 SQL Server locks, discussed in the article All about locking in SQL Server, which is appli ...

  2. 十步优化SQL Server中的数据访问

    故事开篇:你和你的团队经过不懈努力,终于使网站成功上线,刚开始时,注册用户较少,网站性能表现不错,但随着注册用户的增多,访问速度开始变慢,一些用户开始发来邮件表示抗议,事情变得越来越糟,为了留住用户, ...

  3. 深入浅出SQL Server中的死锁

    简介 死锁的本质是一种僵持状态,是多个主体对于资源的争用而导致的.理解死锁首先需要对死锁所涉及的相关观念有一个理解. 一些基础知识 要理解SQL Server中的死锁,更好的方式是通过类比从更大的面理 ...

  4. SQL Server中关于跟踪(Trace)那点事(转载)

    前言 一提到跟踪俩字,很多人想到警匪片中的场景,同样在我们的SQL Server数据库中"跟踪"也是无处不在的,如果我们利用好了跟踪技巧,就可以针对某些特定的场景做定向分析,找出充 ...

  5. 通过 Visual Studio 对 SQL Server 中的存储过程设置断点并进入存储过程对其进行调试...

    通过 Visual Studio 的 Professional 和 Team System 版本,我们可以对 SQL Server 中的存储过程设置断点并进入存储过程对其进行调试,这样我们可以象调试应 ...

  6. sql azure 语法_Azure SQL Server中的CREATE DATABASE语句概述

    sql azure 语法 In this article, we will review CREATE DATABASE statement in the Azure SQL database wit ...

  7. SQL Server中追踪器Trace的介绍和简单使用

    原文:SQL Server中追踪器Trace的介绍和简单使用 一.What is Trace? 对于SQL Profiler这个工具相信大家都不是很陌生,没用过的朋友可以在SQL Server Man ...

  8. SQL Server中Identity标识列

    SQL Server中,经常会用到Identity标识列,这种自增长的字段操作起来的确是比较方便.但它有时还会带来一些麻烦. SQL Server中,经常会用到Identity标识列,这种自增长的字段 ...

  9. predicate 列存储索引扫描_在SQL SERVER中导致索引查找变成索引扫描的问题分析

    SQL Server 中什么情况会导致其执行计划从索引查找(Index Seek)变成索引扫描(Index Scan)呢? 下面从几个方面结合上下文具体场景做了下测试.总结.归纳. 1:隐式转换会导致 ...

最新文章

  1. Win7 下安装VirtualBox 没有Ubuntu 64bit 选项问题
  2. Python面试基础题-2018-12-26
  3. android 输入光标修改颜色_2.2 输入数值与文本
  4. 工业视觉智能实战经验之IVI算法框架2.0
  5. 计算机文本处理竞赛题目,文字处理竞赛题目(word2010).pdf
  6. idea普通java项目引入lombok_IDEA中Lombok的使用
  7. Alpha混合(二)Material Alpha
  8. 人工智能面试题86问,新手找工作必备!
  9. 专业网站设计的实施步骤及有关疑难问题汇编
  10. CPU226怎么与西门子变频器通讯
  11. 在EXCEL中玩扫雷
  12. Cocos2D:塔防游戏制作之旅(十)
  13. vue子组件获取祖先组件值的方法
  14. 电脑上怎么同时录制系统和麦克风声音
  15. Python之 - 使用Scrapy建立一个网站抓取器,网站爬取Scrapy爬虫教程
  16. led灯串怎么摆造型_小串灯怎么挂好看
  17. CentOS 7.2 添加磁盘并创建新区
  18. 安装WampServer后无法打开localhost的问题
  19. 2022.08.10 第三组 高小涵
  20. 办公软件 office

热门文章

  1. python能以文本和二进制方式处理文件_使用Python进行二进制文件读写的简单方法(推荐)...
  2. 关于 GraphQL 快速入门
  3. 安卓10侧边返回_Flyme 8 体验:可能是最好的国产安卓系统
  4. python装第三方库有几种方法_Python安装第三方库的4种方法
  5. solr 高并发_你真的了解并发编程吗?
  6. Python计算数组的n位全排列(permutations的使用)
  7. DFS(深度优先遍历)走迷宫算法
  8. php mime base64,base64_encode — 使用 MIME base64 对数据进行编码
  9. 怎么搭建服务器集成环境配置文件,怎么搭建服务器集成环境配置文件
  10. 20210218:力扣第228周周赛(下)