回到目录

关于官方驱动集成IQueryable之后的一些事,有好事也有坏事,好事就是它会将你的linq语句非常友好的翻译成MongoDB语句,而坏事就是有一些linq语句不会被翻译,不会被翻译的代价就是将整个结果集装到内存,然后进行linq to object的查询,效率自然是非常低的,呵呵。

好事

最新官方驱动中,添加了对IQueryable扩展方法的支持

        public static IMongoQueryable<TDocument> AsQueryable<TDocument>(this IMongoCollection<TDocument> collection);

1 它对Where完成支持

_webManageUsersRepository.GetModel().Where(i => i.LoginName == "zzl");

2 它对group完全支持

 var g = _webManageUsersRepository.GetModel()
.GroupBy(i => i.DepartmentID, (i, v) => new
{
dept = i,
userCount = v.Count()
});

通过断点我们可以看到它所生成的mongodb语句,然后可以把语句放在命令行中去执行看看具体效果

db.WebManageUsers.aggregate([{ "$group" : { "_id" : "$DepartmentID", "userCount" : { "$sum" :  } } }])

上面写法是我比较喜欢的lambda表达式的方法,语法简介,漂亮,而我不太喜欢linq写法,但是,如果是多字段的分组,你就必须使用linq标准写法了,因为到目前为止,mongo官方驱动还不支持多字段分组的lambda写法,如下面的代码,分组结果就是错误的

 var bb = _webManageUsersRepository.GetModel()
.GroupBy(
i => new
{
i.DepartmentID,
i.Status
},
(i, v) => new
{
dept = i.DepartmentID,
status = i.Status,
userCount = v.Count()
});

它不能正确的翻译成Mongo表达式

{aggregate([{ "$group" : { "dept" : "$DepartmentID", "status" : "$Status", "userCount" : { "$sum" :  }, "_id" :  } }])}

而使用传统的linq写法就可以被mongo驱动很好的翻译

  var gg = from a in _webManageUsersRepository.GetModel()
group a by new
{
dept = a.DepartmentID,
status = a.Status
} into g
select new RoleCount
{
dept = g.Key.dept,
status = g.Key.status,
userCount = g.Count()
};

下面生成的代码是正确的

aggregate([{ "$group" : { "_id" : { "dept" : "$DepartmentID", "status" : "$Status" }, "__agg0" : { "$sum" :  } } }, { "$project" : { "dept" : "$_id.dept", "status" : "$_id.status", "userCount" : "$__agg0", "_id" :  } }])}

可以在mongo客户端上看到正确的结果

aaarticlea/png;base64,i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A4ATkEko3AAAAgGOgdAMAAAA4CEo3AAAAgKPYrwAAAAAA7OxXAAAAAAB29isAAAAAADv7FQAAAACAlf8BIdq0b5NcJl4AAAAASUVORK5CYII=" alt="" />

坏事

对count()方法完成不支持,不推荐使用,如果要用到count(),建议使用mongo原生态的,而不是linq的

            Stopwatch sw1 = new Stopwatch();
sw1.Restart();
var a1 = _webManageUsersRepository.Count(i => true);//性能好
sw1.Stop();
var at1 = sw1.ElapsedMilliseconds; Stopwatch sw = new Stopwatch();
sw.Restart();
var a = _webManageUsersRepository.GetModel().Count();//性能差
sw.Stop();
var at = sw.ElapsedMilliseconds;

回到目录

MongoDB学习笔记~关于官方驱动集成IQueryable之后的一些事的更多相关文章

  1. MongoDB学习笔记系列

    回到占占推荐博客索引 该来的总会来的,Ef,Redis,MVC甚至Sqlserver都有了自己的系列,MongoDB没有理由不去整理一下,这个系列都是平时在项目开发时总结出来的,希望可以为各位一些帮助 ...

  2. MongoDB学习笔记系列~目录

    MongoDB学习笔记~环境搭建 (2015-03-30 10:34) MongoDB学习笔记~MongoDBRepository仓储的实现 (2015-04-08 12:00) MongoDB学习笔 ...

  3. MongoDB学习笔记:快速入门

    MongoDB学习笔记:快速入门   一.MongoDB 简介 MongoDB 是由C++语言编写的,是一个基于分布式文件存储的开源数据库系统.在高负载的情况下,添加更多的节点,可以保证服务器性能.M ...

  4. MongoDB学习笔记二- Mongoose

    MongoDB学习笔记二 Mongoose Mongoose 简介 之前我们都是通过shell来完成对数据库的各种操作, 在开发中大部分时候我们都需要通过程序来完成对数据库的操作 而Mongoose就 ...

  5. mongoDB 学习笔记纯干货(mongoose、增删改查、聚合、索引、连接、备份与恢复、监控等等)

    最后更新时间:2017-07-13 11:10:49 原始文章链接:http://www.lovebxm.com/2017/07/13/mongodb_primer/ MongoDB - 简介 官网: ...

  6. MongoDB学习笔记(转)

    MongoDB学习笔记(一) MongoDB介绍及安装MongoDB学习笔记(二) 通过samus驱动实现基本数据操作MongoDB学习笔记(三) 在MVC模式下通过Jqgrid表格操作MongoDB ...

  7. PHP操作MongoDB学习笔记

    <?php/*** PHP操作MongoDB学习笔记*///*************************//**   连接MongoDB数据库  **////*************** ...

  8. Solr学习笔记之2、集成IK中文分词器

    Solr学习笔记之2.集成IK中文分词器 一.下载IK中文分词器 IK中文分词器 此文IK版本:IK Analyer 2012-FF hotfix 1 完整分发包 二.在Solr中集成IK中文分词器 ...

  9. MongoDB 学习笔记(原创)

    MongoDB 学习笔记 mongodb 数据库 nosql 一.数据库的基本概念及操作 SQL术语/概念 MongoDB术语/概念 解释/说明 database database 数据库 table ...

随机推荐

  1. Cesium原理篇:3最长的一帧之地形(2:高度图)

           这一篇,接着上一篇,内容集中在高度图方式构建地球网格的细节方面.        此时,Globe对每一个切片(GlobeSurfaceTile)创建对应的TileTerrain类,用来维 ...

  2. 【JUC】JDK1.8源码分析之CountDownLatch(五)

    一.前言 分析完了CyclicBarrier后,下面分析CountDownLatch,CountDownLatch用于同步一个或多个任务,强制他们等待由其他任务执行的一组操作完成.CountDownL ...

  3. SIFT特征详解

    1.SIFT概述 SIFT的全称是Scale Invariant Feature Transform,尺度不变特征变换,由加拿大教授David G.Lowe提出的.SIFT特征对旋转.尺度缩放.亮度变 ...

  4. HTTP请求方法详解

    HTTP请求方法详解 请求方法:指定了客户端想对指定的资源/服务器作何种操作 下面我们介绍HTTP/1.1中可用的请求方法: [GET:获取资源]     GET方法用来请求已被URI识别的资源.指定 ...

  5. 注册表(C#)

    Windowa注册表是包含Windows安装,用户喜好以及以安装软件和设备的所有配置信息的核心储存库.COM组件必须把它的信息出存在注册表中,才能被客户程序使用.注册表也包含了一些系统配置的信息,这些 ...

  6. 工厂模式,根据ID创建对应的实例类

    工厂模式,根据ID创建对应的实例类 // // main.cpp // TestCPP1 // // Created by bianchx on 15/4/27. // Copyright (c) 2 ...

  7. [无聊的事-连载之连开100个VS] 折腾你的骚机吧,骚年们!!!

    [无聊的事-连载之连开100个VS] 折腾你的骚机吧,骚年们!!! 只有8G内存的,用这个:打开你的CMD命令提示符如果只装了Visual Studio 2010,用这条命令,打开50个VSfor / ...

  8. VS 常用快捷键

    区域代码选择:按Shift选择整(行)块代码,可配合四个方向键(左右键:选择单个字符,上下键:上下行的当前列).Home(当前行首).End(当前行尾).PgUp(当前页首)和PgDn(当前页尾)使用 ...

  9. nginx concat模块配置 页面返回400 bad request

    在1.4.x版本的nginx没有发现这个问题,但是在1.5.x版本就遇到了这个问题 由于Nginx在新版本中,使用了标准的 MIME-Type:application/javascript.而在ngi ...

  10. 更新整理本人所有博文中提供的代码与工具(C++,2013.11)

    为了更方便地管理博文中涉及的各种代码与工具资源,现在把这些资源迁移到 Google Code 中,有兴趣者可前往下载. C++ 1.<通用高性能 Windows Socket 组件 HP-Soc ...