<?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</title>
	<atom:link href="http://www.liguosong.com/tag/mongo/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>
		<item>
		<title>resize a mongodb capped collection 重新设置mongo固定表的大小</title>
		<link>http://www.liguosong.com/2013/12/12/resize-a-mongodb-capped-collection/</link>
		<comments>http://www.liguosong.com/2013/12/12/resize-a-mongodb-capped-collection/#comments</comments>
		<pubDate>Thu, 12 Dec 2013 12:53:23 +0000</pubDate>
		<dc:creator>lgs</dc:creator>
				<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongo]]></category>
		<category><![CDATA[mongo resize capped collection]]></category>

		<guid isPermaLink="false">http://www.liguosong.com/?p=201</guid>
		<description><![CDATA[最近公司需要将一个旧的capped collection重新调整大小最后在google大神的指导下成功找到解决 [...]]]></description>
				<content:encoded><![CDATA[<p>最近公司需要将一个旧的capped collection重新调整大小最后在google大神的指导下成功找到解决方案。记录一下。<br />
道理很简单，相信略懂mongo的程序猿都能看懂。</p>
<pre class="brush:javascript">db.createCollection("new", {capped:true, size:1073741824}); 
db.old.find().forEach(function (d) {db.new.insert(d)});
db.old.renameCollection("bak", true);
db.new.renameCollection("old", true);</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liguosong.com/2013/12/12/resize-a-mongodb-capped-collection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
