LINQ to SQL 效率问题
2007-07-13 10:06
543 查看
Rico has finally posted some numbers that show you the performance he's seeing with Beta 2 bits (sorry you don't have yours yet, we're working on it.)
A compiled query executing at about 93% efficiency (that's only 7% overhead over raw SqlDataReader.)
I know, I know. I still don't believe it either and I wrote the code!
And that's under explicitly biased conditions to try to magnify the overhead as much as possible. You are almost never going to see this much bias in the wild. That means that using compiled queries will most often reduce the overhead to approximately zero. That's right. I said 'zero.'
And what if you don't use compiled queries? As it turns out, we got a lot better there too. Rico's tests shows his query executing at about 1.8x, (that's about 80% overhead over SqlDataReader.) To tell you the truth, I still don't like that number so I'm going to be working on it some more. :-)
As it turns out most of our lab performance tests don't run in as ideal of conditions as Rico's setup, trying to model more real-world conditions to base our goals on. In those tests, with the database sitting on another box (still dedicated & high-bandwidth), we tend to get numbers more like 1.3x (30% overhead.) Of course, YMMV, since there are so many dials to turn to change operating conditions, etc.
So are you 'chomping at the bit' to download Beta 2? You should be.
A compiled query executing at about 93% efficiency (that's only 7% overhead over raw SqlDataReader.)
I know, I know. I still don't believe it either and I wrote the code!
And that's under explicitly biased conditions to try to magnify the overhead as much as possible. You are almost never going to see this much bias in the wild. That means that using compiled queries will most often reduce the overhead to approximately zero. That's right. I said 'zero.'
And what if you don't use compiled queries? As it turns out, we got a lot better there too. Rico's tests shows his query executing at about 1.8x, (that's about 80% overhead over SqlDataReader.) To tell you the truth, I still don't like that number so I'm going to be working on it some more. :-)
As it turns out most of our lab performance tests don't run in as ideal of conditions as Rico's setup, trying to model more real-world conditions to base our goals on. In those tests, with the database sitting on another box (still dedicated & high-bandwidth), we tend to get numbers more like 1.3x (30% overhead.) Of course, YMMV, since there are so many dials to turn to change operating conditions, etc.
So are you 'chomping at the bit' to download Beta 2? You should be.
相关文章推荐
- Linq to SQL删除或清空表的效率问题
- 测试SqlHelp,linq to SQL,Nhibernate批量处理数据的效率
- 查询大数据表的效率对比:Linq to SQL、Entity Framework、企业库存储过程、ADO.Net
- linq to sql 还没解决的问题
- 数据库中存在nchar类型的列时, 使用Linq to sql的问题
- 是否会成为问题——Linq to Sql的执行可能无法复用查询计划
- LINQ to SQL之Step by Step及新手问题小结
- wcf+linq to sql中关联查询返回数据问题
- 使用LINQ to SQL更新数据库(上):问题重重
- 一起谈.NET技术,使用LINQ to SQL更新数据库(上):问题重重
- linq to sql 中,如何解决多条件查询问题,答案,用表达式树! (下)
- 关于linq to sql调用存储过程,出现"无法枚举查询结果多次"的问题
- linq to sql 中,如何解决多条件查询问题,答案,用表达式树! (下)
- Linq to SQL 文件上传到服务器后未实例化问题
- Linq to SQL 插入数据时的一个问题
- Linq to SQL 插入数据时的一个问题
- [转]LinqToSql的问题 多条件 动态变化查询条件怎样查询
- 关于Linq to sql的一个更新问题
- 是否会成为问题——Linq to Sql的执行可能无法复用查询计划
- 关于使用Linq to sql作为数据交互时的架构问题