Differences between buffer and pool in SQL Server

Source: Internet
Author: User

In SQL Server, there are two storage methods: Buffer and pool. They are all used to temporarily store data. What is the difference. It's always annoying.

I am lucky to see a blog of Daniel, which intercepts the differences between cache and pool.

Before we jump into further description of stores I wocould 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 cocould 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 life time, visibility and cost is controlled by sqlos's cache mechanism. each plan can be used by multiple batches at the same time.

 

The cache can store different data types, and the backup storage entity has a cost value (cost ). And status value, visibility, and a lifecycle, which is maintained using some LRU algorithms. Each entity can be accessed by multiple clients at the same time. For example, SQL server stores cache based on the cache. A planned life cycle and cost (cost) are all controlled by sqlos's cache mechanism. Each plan can be accessed by multiple batches simultaneously.

 

In its turn, pool, in sqlos's terms, is a mechanic 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 mechanisms

 

The pool is used to store the same data type. In most cases, the stored data has no status or cost (cost ). A pool can control the lifecycle and visibility of a storage object. Once the storage entity is read, it is deleted from the pool unless it is saved again. The entity in the pool can only be used by another user at the same time. For example, network buffers is a pool with no status, no cost, and all buffers have the same size. There is a buffer pool in SQL Server, which is a cache. However, sqlos's cache mechanism is not used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.