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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
Jina AI
Jina AI
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
博客园 - 【当耐特】
雷峰网
雷峰网
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
Security Latest
Security Latest
有赞技术团队
有赞技术团队
L
Lohrmann on Cybersecurity
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Hacker News - Newest:
Hacker News - Newest: "LLM"
NISL@THU
NISL@THU
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog RSS Feed
Cyberwarzone
Cyberwarzone
K
Kaspersky official blog
F
Full Disclosure
Martin Fowler
Martin Fowler
Spread Privacy
Spread Privacy
D
Docker
C
Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page

博客园 - yi

Rabbitmq的使用及Web监控工具使用 Fiddler的配置 轻松实现SQL Server与Access、Excel数据表间的导入导出 Sql server性能优化白皮书 索引的优化脚本 查找当前的登录用户 usp_who5脚本,查找当前的进程 锁与索引 一个数据访问层的小工具 转:对XML插入操作 - yi - 博客园 查看当前的连接和锁 对数据的分页再一次思考 关注商业价值 应用程序优化 关于异常处理的一点看法 骂的人多了,也成了真理 样式小记 - yi - 博客园 重命名你的数据库 不浪费自己的时间,同时也不浪费别人的时间 - yi - 博客园
linq to sql的性能和reader相比只是差一点点吗
yi · 2010-06-22 · via 博客园 - yi

     很多人认为linq to sql性能很不错,但我很可惜的告诉你,你错了,不是差一点点,是差非常多,差得让人可怕.

现把结果帖出来:

reader读取结果:

Report name:                  2010-6-22 23:01:24
Run on:                       2010-6-22 23:01:24
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               65919
Requests per Second:          1098.50

linq to sql读取的结果:

Report name:                  2010-6-22 23:03:05
Run on:                       2010-6-22 23:03:05
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               8673
Requests per Second:          144.54

我测试的数据库数据量:七十几W条,读取的数据为0

然后再测试有数据返回,返回记录数为两条,测试结果如下:

reader结果:

Report name:                  2010-6-22 23:17:10
Run on:                       2010-6-22 23:17:10
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               53138
Requests per Second:          885.63

linq to sql结果:

Report name:                  2010-6-22 23:15:50
Run on:                       2010-6-22 23:15:50
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               7161
Requests per Second:          119.35

然后多线程并发:

reader结果:

Report name:                  2010-6-22 23:28:15
Run on:                       2010-6-22 23:28:15
Run length:                   00:01:00

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               86210
Requests per Second:          1436.78

linq to sql结果:

Report name:                  2010-6-22 23:29:30
Run on:                       2010-6-22 23:29:30
Run length:                   00:01:01

Web Application Stress Tool Version:1.1.293.1

Number of test clients:       1

Number of hits:               14444
Requests per Second:          239.09

数据在上面,哥啥都不说了,性能差别大吗?数据在上面,我不想说。

为什么我只测试读取,其它不进行测试呢???读取的频率远高于插入,修改,删除,对于应用程序性能的问题大多数是出在读取,所以插入、修改、删除影响几乎影响不了应用程序性能,除了一些特殊的应用。