<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title> &#187; mongo $or sort</title>
	<atom:link href="http://www.liguosong.com/tag/mongo-or-sort/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liguosong.com</link>
	<description></description>
	<lastBuildDate>Tue, 08 May 2018 01:02:19 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>mongodb $or sort  无法使用索引</title>
		<link>http://www.liguosong.com/2013/12/12/mongodb-or-sort/</link>
		<comments>http://www.liguosong.com/2013/12/12/mongodb-or-sort/#comments</comments>
		<pubDate>Thu, 12 Dec 2013 13:06:18 +0000</pubDate>
		<dc:creator>lgs</dc:creator>
				<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongo]]></category>
		<category><![CDATA[mongo $or sort]]></category>

		<guid isPermaLink="false">http://www.liguosong.com/?p=203</guid>
		<description><![CDATA[最近做项目，发现mongodb的$or与sort一起使用的时候速度很慢。经过分析发现这个根本没有使用索引。每次 [...]]]></description>
				<content:encoded><![CDATA[<p>最近做项目，发现mongodb的$or与sort一起使用的时候速度很慢。经过分析发现这个根本没有使用索引。每次都是全表扫描。经过度娘和大神的查询，大家都说这是一个bug。已经有人在mongodb上提交过，但是还没有解决。<span id="more-203"></span>mongo官网的bug地址：https://jira.mongodb.org/browse/SERVER-1205</p>
<p>这就很头疼了。老板要的的速度，他不管这些。不过发现$or in在一起使用是有索引的，后来加了一些其它条件的限制，才让查询快了很多。看来还是尽量用比较成熟的数据库好些。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liguosong.com/2013/12/12/mongodb-or-sort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
