search
HomeBackend DevelopmentPHP TutorialAbout the problem of MSSQL occupying too much memory_PHP tutorial

I often see people ask, MSSQL takes up too much memory, and it keeps growing; or it has been set up to use memory, but it does not use that much. What is going on?
First, let’s take a look at how MSSQL uses memory.
The biggest overhead is generally used for data caching. If the memory is enough, it will throw all the used data and the data it thinks you will use into the memory. It will not cache the data with a low hit rate until the memory is insufficient. Clear the data. So generally when we look at statistics io, the physics reads we see are all 0.
The second is the cost of query. Generally speaking, hash join will bring relatively large memory overhead, while the cost of merge join and nested loop is relatively small, and sorting, intermediate tables, and cursors will also be relatively large. of expenses.
So the columns used for association and sorting generally need to have indexes.
The next step is the storage of execution plans and system data, which are relatively small.

Let’s first look at the impact of data caching on performance. If there are no other applications in the system to compete for memory, the more data caches, the better. Sometimes we will even forcibly pin some data in the cache. middle. But if there are other applications, although MSSQL will release memory when needed, thread switching and IO waiting will also take time, so performance will be reduced. This way we have to set the maximum memory usage of MSSQL. Configuring the maximum memory usage can be found in the SQL Server properties (Memory tab), or it can be done using sp_configure. If there are no other applications, then do not limit MSSQL's memory usage.
Then let’s look at the query overhead. The lower the overhead, the better, because we can’t benefit from it. On the contrary, using more memory probably means a decrease in query speed. Therefore, we generally want to avoid the use of intermediate tables and cursors, and create indexes on columns that are frequently associated and sorted.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631123.htmlTechArticleI often see people asking that MSSQL takes up too much memory and keeps growing; or that it has been set up Use memory, but it doesn't use that much, what's going on? ...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
1t内存等于多少GB1t内存等于多少GBFeb 22, 2023 pm 04:55 PM

1t内存等于1024GB。1t内存是指内存的存储容量为“1TB”,而1TB等于1024GB。但这只是计算机原理中理论上的数值,一般在系统显示可用存储空间中会偏少;因为硬盘制造商对硬盘的定义与计算机对硬盘容量的算法不同,导致硬盘标识容量和操作系统中显示的实际容量存在误差。

gear1和gear2内存模式是什么gear1和gear2内存模式是什么Sep 14, 2022 am 11:15 AM

gear1和gear2内存模式指的是CPU的内存控制器与内存频率的比例关系;gear1表示内存控制器频率和内存工作频率之比是“1:1”,而gear2表示内存控制器频率和内存工作频率之比是“1:2”,可减轻内存控制器压力,让内存更容易得到更高的频率。

pagefile.sys占用太大怎么办pagefile.sys占用太大怎么办Feb 20, 2024 am 09:01 AM

pagefile.sys占用太大怎么办在使用电脑的过程中,我们经常会遇到内存不足的情况。为了解决这个问题,操作系统会将部分内存中的数据转移到磁盘上的一个特殊文件中,这个文件就是pagefile.sys。但有时候,我们会发现pagefile.sys文件的大小很大,占用了太多的磁盘空间。那么,我们该如何解决这个问题呢?首先,我们需要明确pagefile.sys文

php怎么连接mssql数据库php怎么连接mssql数据库Oct 23, 2023 pm 12:02 PM

php连接mssql数据库的方法有使用PHP的MSSQL扩展、使用PDO等。详细介绍:1、使用PHP的MSSQL扩展方法,确保PHP安装了MSSQL扩展。可以在PHP配置文件(php.ini)中检查是否启用了mssql扩展;2、使用PDO方法,确保PHP安装了PDO扩展。可以在PHP配置文件(php.ini)中检查是否启用了pdo_sqlsrv扩展。

板载内存是什么意思板载内存是什么意思Jan 30, 2023 pm 03:21 PM

板载内存是指主板上本身集成的内存,是直接焊接在了电脑的主板上无法更换的。板载有“集成”的意思,是指整合于主板芯片中的功能或硬件,主要有板载显卡、声卡、网卡、RAID等。一般板载硬件功能都较简单,不能完全取代独立硬件;但是购买可以控制购买成本。

Ubuntu安装PHP并配置MSSQL连接的详细指南Ubuntu安装PHP并配置MSSQL连接的详细指南Feb 29, 2024 am 11:15 AM

Ubuntu是一款流行的开源操作系统,常用于服务器运行。在Ubuntu上安装PHP并配置MSSQL连接是许多开发者和系统管理员经常需要做的操作之一。本文将为读者提供一份详细的指南,步骤包含安装PHP、设置Apache、安装MSSQLServer等内容,并附上具体的代码示例。第一步:安装PHP及相关扩展首先,我们需要安装PHP及其相关扩展,以便支持PHP连接

1tb是多少g内存1tb是多少g内存Nov 30, 2022 am 10:23 AM

1tb理论上是等于1024g;其中T是TB的缩写,G是GB的缩写,但是一般内存不会有1TB的,TB级别的是硬盘;TB表示太字节,是一种信息计量单位,现今通常在标示硬盘总容量、或具有大容量的储存介质之储存容量时使用。

内存或磁盘不足,word无法显示请求字体怎么办内存或磁盘不足,word无法显示请求字体怎么办Nov 06, 2022 am 10:47 AM

内存或磁盘不足,word无法显示请求字体的解决办法:1、打开Word,点击【剪切板】,然后点击【全部清空】;2、在【高级系统设置】中取消勾选“自动管理所有驱动器的分页文件大小”的选项,然后选中需要设置的磁盘盘符,输入合适的大小即可。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)