惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Jina AI
Jina AI
H
Help Net Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
L
LangChain Blog
Recorded Future
Recorded Future
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
GbyAI
GbyAI
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
M
MIT News - Artificial intelligence
爱范儿
爱范儿
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
B
Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
The Cloudflare Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园 - 【当耐特】
T
Troy Hunt's Blog
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog

博客园 - qy1141

Mysql插入Emoji表情出错 spring+mybatis事务不起作用的原因 安卓开发随记 springmvc + spring + ibatis + mysql Eclipse中配置svn J2EE环境配置与工具使用 SqlServer数据库空间使用情况常用命令 数据库备份与还原 windows2008吃尽内存的解决办法 asp.net中http提交数据所遇到的那些坑 在C#中使用消息队列RabbitMQ 重新开博 WCF Security系列(2)--服务器端的安全 WCF Security系列(1)--Security概述 如果为网站生成自签名SSL证书 关于证书 转:最真实的2006年应届毕业生真实薪水 转:如何修复Team Foundation Server Workgroup Edition 不小心删除了所有Team Foundation Licensed Users组内用户问题 转 :TFS(Team Foundation Server)使用经验
关于数据库优化杂技
qy1141 · 2015-09-09 · via 博客园 - qy1141

关于数据库优化杂技

2015-09-09 23:30  qy1141  阅读(182)  评论()    收藏  举报

作为记录,一些最基本的检查:

1、通过管理工具,性能查看器,根据磁盘io,两个重要指标:PhysicalDisk中的Avg.Disk Read Queue Length 和 Avg.Disk Write Queue Length,如果这两个平均值大于0.5,就需要注意磁盘io的性能了;

2、数据库日志文件是否很慢,会拖慢系统速度;如何收缩日志需要注意;

3、tempDb数据库是否很大,会拖慢系统速度;数据库每次重启,会重建tempdb,

4、通过SqlProfiler来跟踪sql语句的查询效率;

解决办法,对提高数据库性能有帮助:

1、给tempdb分配一个初始值较大的空间,如数据文件300m,日志文件50m;

2、数据库事务默认的级别Read Committed,并发性低,可以设置为行版本控制的可提交读:READ_COMMITTED_SNAPSHOT,给每张表增加一个Version字段,手动控制版本,这样既能提高并发性,也避免了读取脏数据;

     ALTER DATABASE dbname SET READ_COMMITTED_SNAPSHOT ON