<?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>王超 - 博客 BLOG &#187; 数据库 DB</title>
	<atom:link href="http://www.wangchao123.com/category/db/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wangchao123.com</link>
	<description>code player 海盗精神 - 他们向往自由，面对大海胸怀宽广，只拿他们想要的，遵守契约，单纯而且机智。</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:05:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>mongoDB windows安装 (转)</title>
		<link>http://www.wangchao123.com/2011/09/07/719</link>
		<comments>http://www.wangchao123.com/2011/09/07/719#comments</comments>
		<pubDate>Wed, 07 Sep 2011 05:56:47 +0000</pubDate>
		<dc:creator>wangchao</dc:creator>
				<category><![CDATA[数据库 DB]]></category>
		<category><![CDATA[mongodb]]></category>

		<guid isPermaLink="false">http://www.wangchao123.com/?p=719</guid>
		<description><![CDATA[原文地址: http://www.cnblogs.com/lios/archive/2010/11/14/mongoDB.html 1:下载http://www.mongodb.org/display/DOCS/Downloads 选择你要下载的版本 (我下载的是1.6.3版本 Windows 32bit) &#62; 解压软件包，你会看到解压后的文件夹中有个BIN目录，进去之后会看到很多.exe可执行文件，只用关注两个即可(mongod.exe,mongo.exe) mongod.exe //mongodb的服务器端，运行该执行文件可以设置mongodb的端口号，数据文件存储目录等 mongo.exe   //mongodb的客户端，用来连接mongodb并进行相关数据的查询 2.部署，假如我压缩包解压的位置为 d:\program files\mongodb\ &#62; 创建一个存放数据库文件的文件夹 我是放到E盘data文件夹，路径e:\data 设置存放数据库文件的路径 进入 cmd 提示符控制台 cd d:\program files\mongodb\bin&#62; mongod.exe &#8211;dbpath e:\data (这个cmd不要关了！) 3：新打开一个CMD输入：cd d:\mongodb\bin&#62;mongo.exe，如果出现下面提示，恭喜你安装成功了，很简单吧 D:\mongodb\bin&#62;d:\mongodb\bin\mongo.exe MongoDB shell version: 1.6.3 connecting to: test 4：测试 &#62; use test switched to db test &#62; db.foo.save({hello:1,word:2}) &#62; db.foo.find() { "_id" : [...]]]></description>
			<content:encoded><![CDATA[<div style="border: 2px solid #dcdcdc;">
<div style="padding-right: 10px; padding-left: 3px; font-size: 13px; padding-bottom: 5px; padding-top: 10px; line-height: 1.5; margin-left: 5px;">
<div id="cnblogs_post_body">
<div id="blog_text">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">原文地址: <a href="http://www.cnblogs.com/lios/archive/2010/11/14/mongoDB.html">http://www.cnblogs.com/lios/archive/2010/11/14/mongoDB.html</a></p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">1:下载<a style="color: navy; text-decoration: none;" href="http://www.mongodb.org/display/DOCS/Downloads">http://www.mongodb.org/display/DOCS/Downloads</a> 选择你要下载的版本</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">(我下载的是1.6.3版本 Windows 32bit)</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">&gt; 解压软件包，你会看到解压后的文件夹中有个BIN目录，进去之后会看到很多.exe可执行文件，只用关注两个即可(mongod.exe,mongo.exe)</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">mongod.exe //mongodb的服务器端，运行该执行文件可以设置mongodb的端口号，数据文件存储目录等</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">mongo.exe   //mongodb的客户端，用来连接mongodb并进行相关数据的查询</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">2.部署，假如我压缩包解压的位置为 d:\program files\mongodb\</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">&gt; 创建一个存放数据库文件的文件夹 我是放到E盘data文件夹，路径e:\data</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">设置存放数据库文件的路径</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">进入 cmd 提示符控制台</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;"><span style="line-height: 1.5; color: #808080;"> cd d:\program files\mongodb\bin&gt;</span></p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;"><span style="line-height: 1.5; color: #808080;"> mongod.exe &#8211;dbpath e:\data</span></p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">(这个cmd不要关了！)</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">3：新打开一个CMD输入：cd d:\mongodb\bin&gt;mongo.exe，如果出现下面提示，恭喜你安装成功了，很简单吧</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<div style="background-color: #f5f5f5; font-family: 'Courier New'; font-size: 13px; word-break: break-all; overflow-x: auto; overflow-y: auto; padding: 5px; border: 1px solid #cccccc;">
<pre style="margin-top: 0px; margin-bottom: 0px;">
<div><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">D:\mongodb\bin</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">&gt;</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">d:\mongodb\bin\mongo.exe
MongoDB shell version: </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">1.6</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">.</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">3</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">
connecting to: test</span></div>
</pre>
</div>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">4：测试</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<div style="background-color: #f5f5f5; font-family: 'Courier New'; font-size: 13px; word-break: break-all; overflow-x: auto; overflow-y: auto; padding: 5px; border: 1px solid #cccccc;">
<pre style="margin-top: 0px; margin-bottom: 0px;">
<div><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;"><span style="line-height: 1.5; font-family: 'Courier New'; background-color: #f5f5f5;"><span style="line-height: 1.5; font-family: 'Courier New'; background-color: #f5f5f5;">&gt; use test
switched to db test
&gt; db.foo.save({hello:1,word:2})
&gt; db.foo.find()
{ "_id" : ObjectId("4cdf992b7579000000003b3e"), "hello" : 1, "word" : 2 }
</span></span></span></div>
</pre>
</div>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">5：退出测试</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<div style="background-color: #f5f5f5; font-family: 'Courier New'; font-size: 13px; word-break: break-all; overflow-x: auto; overflow-y: auto; padding: 5px; border: 1px solid #cccccc;">
<pre style="margin-top: 0px; margin-bottom: 0px;">
<div><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">&gt; exit (输入exit退出)
<div><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;"><span style="line-height: 1.5; font-family: 'Courier New'; background-color: #f5f5f5;">bye (提示)</span></span></div>

</span></div>
</pre>
</div>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">6：为了平时使用方便，把mongod注册为系统服务，免得以后麻烦，每次要启动</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<div style="background-color: #f5f5f5; font-family: 'Courier New'; font-size: 13px; word-break: break-all; overflow-x: auto; overflow-y: auto; padding: 5px; border: 1px solid #cccccc;">
<pre style="margin-top: 0px; margin-bottom: 0px;">
<div><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">d:\Program Files\mongodb\bin</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">&gt;</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">mongod.exe </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">--</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">logpath d:\data </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">--</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">install
all output going to: d:\data
Creating service MongoDB.
Service creation successful.
Service can be started from the command line via 'net start </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #800000;">"</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #800000;">MongoDB</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #800000;">"</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">'.</span></div>
</pre>
</div>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.5;">7：或者可以编辑批处理文件，每次需要用的时候执行一下。并不关闭命令行窗口</p>
<p style="font-size: 13px; line-height: 1.5;">
<div id="_mcePaste" style="font-size: 13px; line-height: 1.5; position: absolute; left: -10000px; top: 1140px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">@echo off</div>
<div id="_mcePaste" style="font-size: 13px; line-height: 1.5; position: absolute; left: -10000px; top: 1140px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">d:\mongodb_bin\bin\mongod.exe &#8211;dbpath d:\mongodb_data</div>
<div id="_mcePaste" style="font-size: 13px; line-height: 1.5; position: absolute; left: -10000px; top: 1140px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">#exitd</div>
<div id="blog_text" style="font-size: 13px; line-height: 1.5;">@echo off</div>
<div id="blog_text">d:\Program Files\mongodb\bin\mongod.exe &#8211;dbpath d:\data</div>
<div id="blog_text" style="font-size: 13px; line-height: 1.5;">#exitd</div>
<p style="font-size: 13px; line-height: 1.5;">
<p style="font-size: 13px; line-height: 1.5;">mongo 此时即可进行客户端与mongodb的连接了，成功后将自动连接mongodb的test库，如果你想连接指定的库，那就使用命令：mongo 数据库名称，如果你将mongodb部署在服务器上，那就使用命令：mongo 服务器IP/数据库名称，此处是”/”，而非”\”，用错了就无法连接成功。</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">讲完部署，接下来讲讲它的性能如何，mongodb的数据写入与数据读取速度是关系性数据库的很多倍以上，具体多少倍可以去看看老赵的空间，他有进行相关的测试，MONGODB现在已经被国内很多网站用来记录网站的日志。MONGODB也属于内存数据库，它会自动将一些数据缓存到内存中，这个我想也是大家平时自己会去做的事情，毕竟占内存总比占CPU好，MONGODB支持分布式部署，这样我们可以分多台服务器来进行部署。注：MONGODB不建议部署在windows 32的机器上，当数据超过2G的时候会出问题，官方建议安装在windows 64位或linux上。（随着microsoft在全球范围内打击盗版的力度越来越大，加之国外的开源软件都慢慢的转向LINUX平台，我们这些跟着微软走的people也该学着跨跨平台了，为了大家今后更好的发展，可以自学一下python或者是ruby）</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">讲完性能，接下来讲讲它的应用环境，MONGODB有好处，那么自然也有它不足的地方，相对于关系性数据库来说，它的安全性就大打折扣了，所以我们应该有选择性的使用，譬如网站的日志记录，网站访问统计等可以使用MONGODB来进行数据存储。</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">讲完应用，接下来讲讲它的语法:</p>
<p style="font-size: 13px; line-height: 1.4; margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; text-indent: 0px;">
<div style="background-color: #f5f5f5; font-family: 'Courier New'; font-size: 13px; word-break: break-all; overflow-x: auto; overflow-y: auto; padding: 5px; border: 1px solid #cccccc;">
<pre style="margin-top: 0px; margin-bottom: 0px;">
<div style="font-family: 'Courier New'; font-size: 13px; line-height: 1.5;"><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">sql: select </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">*</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;"> from t_user

mongodb: db.t_user.find()

sql: select count(</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">*</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">) from t_user

mongodb: db.t_user.find().count()

sql: select top </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">10</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;"> </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">*</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;"> from t_user where id &lt; (select min(id) from (select top </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">10</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;"> id from t_user order by id desc)) order by id desc </span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">//</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">分页取第11条到第20条的数据

mongodb: db.t_user.find().limit(</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">10</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">).skip(</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">10</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">).sort({})

sql: update t_user set username</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">=</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">'lucky' where id</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">=</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">1</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">

mongodb: db.t_user.update({id:</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">1</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">},{username:</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #800000;">"</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #800000;">lucky</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #800000;">"</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">})

sql: delete t_user where id</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">=</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">1</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">

mongodb: db.t_user.delete({id:</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">1</span><span style="line-height: 1.5; font-family: 'Courier New'; color: #000000;">})

......
</span></div>

<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: x-small;"><span style="line-height: 19px; white-space: normal;">
</span></span></pre>
</div>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.wangchao123.com/2011/09/07/719/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>mysql 常用 sql 语句 &#8212; （不断更新）</title>
		<link>http://www.wangchao123.com/2009/06/19/257</link>
		<comments>http://www.wangchao123.com/2009/06/19/257#comments</comments>
		<pubDate>Fri, 19 Jun 2009 08:19:12 +0000</pubDate>
		<dc:creator>wangchao</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://www.wangchao123.com/?p=257</guid>
		<description><![CDATA[建表   CREATE TABLE `tb_venue` (                                                                              `venueid` int(10) unsigned NOT NULL auto_increment,                                                  `venue_name` varchar(255) NOT NULL default ”,                                                       `venue_name_en` varchar(255) NOT NULL default ”,                                                                                                  KEY `idx_cityid_status_featured_venueid` (`cityid`,`status`,`featured_type`,`venueid`),              KEY `idx_cityid_pinyinfull` (`cityid`,`pinyin_full`)                                               ) ENGINE=InnoDB DEFAULT CHARSET=utf8    插入字段 alter table db_event.tb_event_info, add column `special_tickets` varchar(128) default NULL after flyer_file_name, add column `special_price` [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">建表</span></p>
<p><coolcode lang="sql"> </p>
<p>CREATE TABLE `tb_venue` (                                                                 <br />
            `venueid` int(10) unsigned NOT NULL auto_increment,                                     <br />
            `venue_name` varchar(255) NOT NULL default ”,                                          <br />
            `venue_name_en` varchar(255) NOT NULL default ”,                                                                                     <br />
            KEY `idx_cityid_status_featured_venueid` (`cityid`,`status`,`featured_type`,`venueid`), <br />
            KEY `idx_cityid_pinyinfull` (`cityid`,`pinyin_full`)                                    <br />
          ) ENGINE=InnoDB DEFAULT CHARSET=utf8   </p>
<p></coolcode></p>
<p><span style="color: #ff0000;">插入字段</span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">alter table db_event.tb_event_info, add column `special_tickets` varchar(128) default NULL after flyer_file_name, add column `special_price` varchar(64) default NULL after flyer_file_name;</span></span></p>
<p><span style="color: #ff0000;">更改字段</span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">alter table db_section.tb_section_info modify `info_type` smallint(4) NOT NULL default &#8217;0&#8242;;</span></span></p>
<p><span style="color: #ff0000;">输出执行详情</span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">explain SELECT eventid FROM db_event.tb_event WHERE cityid=1 AND create_type=1 AND `status`=1 AND featured_type &lt; 0 AND end_date &gt;= &#8217;2009-06-12&#8242; ORDER BY featured_type limit 10;</span></span></p>
<p><span style="color: #ff0000;">加索引</span></p>
<p><span style="color: #0000ff;">create index </span>idx_cityid_pinyinfull <span style="color: #0000ff;">on </span>db_venue.tb_venue(cityid, pinyin_full)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wangchao123.com/2009/06/19/257/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

