<?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>泛城科技技术博客db &#187; 泛城科技技术博客</title>
	<atom:link href="http://tech.lezi.com/archives/tag/db/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.lezi.com</link>
	<description></description>
	<lastBuildDate>Fri, 04 Jan 2013 09:18:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Twitter架构:数据处理的四大问题</title>
		<link>http://tech.lezi.com/archives/142</link>
		<comments>http://tech.lezi.com/archives/142#comments</comments>
		<pubDate>Tue, 14 Dec 2010 04:55:13 +0000</pubDate>
		<dc:creator>neilxp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[架构]]></category>

		<guid isPermaLink="false">http://tech.lezi.com/?p=142</guid>
		<description><![CDATA[Twitter面对海量数据，是如何解决以下4方面的问题的。讲得比较简明，需要自己领悟。 如何在数亿以记的用户的发言里查找某个用户的发言或者某个ID 将一个用户的所有留言或者他关注用户的留言以时间线的形式查找出来呈现 社会关系（跟随者）的处理：交集，并集，差集等操作，帖子的转发 用户发言的全文检索 Big Data in Real-Time at Twitter View more presentations from nkallen. 您也许会对以下文章感兴趣 在已有MySQL同步数据基础上添加新的同步数据库 (评论：0) 一个不错的MongoDB教程 (评论：2)]]></description>
			<content:encoded><![CDATA[<p>Twitter面对海量数据，是如何解决以下4方面的问题的。讲得比较简明，需要自己领悟。</p>
<ol>
<li>如何在数亿以记的用户的发言里查找某个用户的发言或者某个ID</li>
<li>将一个用户的所有留言或者他关注用户的留言以时间线的形式查找出来呈现</li>
<li>社会关系（跟随者）的处理：交集，并集，差集等操作，帖子的转发</li>
<li>用户发言的全文检索</li>
</ol>
<p><span id="more-142"></span></p>
<div id="__ss_3770885" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Big Data in Real-Time at Twitter" href="http://www.slideshare.net/nkallen/q-con-3770885">Big Data in Real-Time at Twitter</a></strong><object id="__sse3770885" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=qcon-100418224449-phpapp02&amp;rel=0&amp;stripped_title=q-con-3770885&amp;userName=nkallen" /><param name="name" value="__sse3770885" /><param name="allowfullscreen" value="true" /><embed id="__sse3770885" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=qcon-100418224449-phpapp02&amp;rel=0&amp;stripped_title=q-con-3770885&amp;userName=nkallen" name="__sse3770885" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/nkallen">nkallen</a>.</div>
</div>

	<h2>您也许会对以下文章感兴趣</h2>
	<ul class="st-related-posts">
	<li><a href="http://tech.lezi.com/archives/23" title="在已有MySQL同步数据基础上添加新的同步数据库 (十月 27, 2010)">在已有MySQL同步数据基础上添加新的同步数据库</a> (评论：0)</li>
	<li><a href="http://tech.lezi.com/archives/116" title="一个不错的MongoDB教程 (十二月 9, 2010)">一个不错的MongoDB教程</a> (评论：2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://tech.lezi.com/archives/142/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个不错的MongoDB教程</title>
		<link>http://tech.lezi.com/archives/116</link>
		<comments>http://tech.lezi.com/archives/116#comments</comments>
		<pubDate>Thu, 09 Dec 2010 06:06:14 +0000</pubDate>
		<dc:creator>neilxp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://tech.lezi.com/?p=116</guid>
		<description><![CDATA[介绍了MongoDB的设计理念和操作：插入，查找，建立索引，更新等等。 虽然是用Ruby语言阐述，但不懂Ruby的人还是很好理解的。 MongoDB (is) For Rubyists &#8211; Boston Ruby View more presentations from Kyle Banker. 同时推荐一个MongoDB的Windows图形客户端: MongoVUE 您也许会对以下文章感兴趣 在已有MySQL同步数据基础上添加新的同步数据库 (评论：0) Twitter架构:数据处理的四大问题 (评论：0) MongoDB运行状态、性能监控，分析 (评论：2)]]></description>
			<content:encoded><![CDATA[<p>介绍了MongoDB的设计理念和操作：插入，查找，建立索引，更新等等。</p>
<p>虽然是用Ruby语言阐述，但不懂Ruby的人还是很好理解的。</p>
<div id="__ss_2685470" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="MongoDB (is) For Rubyists - Boston Ruby" href="http://www.slideshare.net/kbanker/mongodb-is-for-rubyists-boston-ruby">MongoDB (is) For Rubyists &#8211; Boston Ruby</a></strong><object id="__sse2685470" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=kb-mongodb-for-rubyists-boston-slides-091209151501-phpapp02&amp;rel=0&amp;stripped_title=mongodb-is-for-rubyists-boston-ruby&amp;userName=kbanker" /><param name="name" value="__sse2685470" /><param name="allowfullscreen" value="true" /><embed id="__sse2685470" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=kb-mongodb-for-rubyists-boston-slides-091209151501-phpapp02&amp;rel=0&amp;stripped_title=mongodb-is-for-rubyists-boston-ruby&amp;userName=kbanker" name="__sse2685470" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/kbanker">Kyle Banker</a>.</div>
</div>
<p>同时推荐一个MongoDB的Windows图形客户端: <a title="MongoVUE" href="http://blog.mongovue.com/">MongoVUE</a></p>
<p><a href="http://tech.lezi.com/wp-content/uploads/2010/12/image6.png"><img class="alignnone size-medium wp-image-133" title="image6" src="http://tech.lezi.com/wp-content/uploads/2010/12/image6-300x206.png" alt="" width="300" height="206" /></a></p>

	<h2>您也许会对以下文章感兴趣</h2>
	<ul class="st-related-posts">
	<li><a href="http://tech.lezi.com/archives/23" title="在已有MySQL同步数据基础上添加新的同步数据库 (十月 27, 2010)">在已有MySQL同步数据基础上添加新的同步数据库</a> (评论：0)</li>
	<li><a href="http://tech.lezi.com/archives/142" title="Twitter架构:数据处理的四大问题 (十二月 14, 2010)">Twitter架构:数据处理的四大问题</a> (评论：0)</li>
	<li><a href="http://tech.lezi.com/archives/290" title="MongoDB运行状态、性能监控，分析 (十月 26, 2011)">MongoDB运行状态、性能监控，分析</a> (评论：2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://tech.lezi.com/archives/116/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在已有MySQL同步数据基础上添加新的同步数据库</title>
		<link>http://tech.lezi.com/archives/23</link>
		<comments>http://tech.lezi.com/archives/23#comments</comments>
		<pubDate>Wed, 27 Oct 2010 06:04:36 +0000</pubDate>
		<dc:creator>neilxp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[db]]></category>

		<guid isPermaLink="false">http://tech.lezi.com/?p=23</guid>
		<description><![CDATA[背景 情况如下：机器Master上的MySQL数据库web, webext已经在机器Slave上做了同步(Replicaton)，Master上的数据库cs没有做同步，因为Slave上使用 replicate-wild-do-table=web%.% 配置使得Slave上只同步机器Master的以web开头的数据库。 现在要把cs库同步到Slave上，但又不要破坏现有的web, webext同步机制，使Master停机时间最短。 方案 在Slave上停止同步，使用命令 mysql&#62; stop slave 在Master上取到cs库数据的文件和相应的位置。因为cs库使用MyISAM引擎，使用mysqlhotcopy即可。我的mysqlhotcopy是自己改版的，会在复制锁住表的时候打印show master status的结果，补丁如下： 463a464,465 &#62;     printf "status %s:%s\n", get_row( $dbh, "show master status" ); &#62; 执行命令，记录下输出的mysql binlog的文件名和位置，等会start slave的参数要用到。 [root@localhost ~] mysqlhotcopy -u user -p xxxx --addtodest --noindices -q cs . status mysql-bin.000247:708377668 将数据复制到Slave上，并且启动Slave [root@localhost mysql] tar xzvf cs.tgz [root@localhost mysql] cd cs [root@localhost [...]]]></description>
			<content:encoded><![CDATA[<h3>背景</h3>
<p>情况如下：机器Master上的MySQL数据库web, webext已经在机器Slave上做了同步(Replicaton)，Master上的数据库cs没有做同步，因为Slave上使用</p>
<pre class="brush:bash">replicate-wild-do-table=web%.%</pre>
<p>配置使得Slave上只同步机器Master的以web开头的数据库。<br />
现在要把cs库同步到Slave上，但又不要破坏现有的web, webext同步机制，使Master停机时间最短。<span id="more-23"></span></p>
<h3>方案</h3>
<ol>
<li>在Slave上停止同步，使用命令
<pre class="brush:bash">mysql&gt; stop slave</pre>
</li>
<li>在Master上取到cs库数据的文件和相应的位置。因为cs库使用MyISAM引擎，使用mysqlhotcopy即可。我的mysqlhotcopy是自己改版的，会在复制锁住表的时候打印show master status的结果，补丁如下：
<pre class="brush:diff">463a464,465
&gt;     printf "status %s:%s\n", get_row( $dbh, "show master status" );
&gt;</pre>
<p>执行命令，记录下输出的mysql binlog的文件名和位置，等会start slave的参数要用到。</p>
<pre class="brush:bash">[root@localhost ~] mysqlhotcopy -u user -p xxxx --addtodest --noindices -q cs .
status mysql-bin.000247:708377668</pre>
</li>
<li>将数据复制到Slave上，并且启动Slave
<pre class="brush:bash">[root@localhost mysql] tar xzvf cs.tgz
[root@localhost mysql] cd cs
[root@localhost cs] myisamchk -rq *
[root@localhost cs] cd ..
[root@localhost mysql] chown mysql:mysql -R cs</pre>
<p>进入mysql，执行</p>
<pre class="brush:bash">mysql&gt; start slave until MASTER_LOG_FILE = 'mysql-bin.000247' , MASTER_LOG_POS = 708377668;</pre>
</li>
<li>等slave执行到拷贝cs库的位置后，停止Slave的数据库服务器，加上复制库的名字，再启动之即可</li>
</ol>

	<h2>您也许会对以下文章感兴趣</h2>
	<ul class="st-related-posts">
	<li><a href="http://tech.lezi.com/archives/116" title="一个不错的MongoDB教程 (十二月 9, 2010)">一个不错的MongoDB教程</a> (评论：2)</li>
	<li><a href="http://tech.lezi.com/archives/142" title="Twitter架构:数据处理的四大问题 (十二月 14, 2010)">Twitter架构:数据处理的四大问题</a> (评论：0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://tech.lezi.com/archives/23/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
