<?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>phacai.com</title>
	<atom:link href="http://www.phacai.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phacai.com</link>
	<description>Gigabyte, Terabyte, Petabyte</description>
	<lastBuildDate>Wed, 09 May 2012 22:08:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Some notes about iSCSI</title>
		<link>http://www.phacai.com/some-notes-about-iscsi</link>
		<comments>http://www.phacai.com/some-notes-about-iscsi#comments</comments>
		<pubDate>Wed, 09 May 2012 16:22:47 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Storage]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1342</guid>
		<description><![CDATA[I am new to storage technologies, but the plan is to build a customized SAN (storage area network). The intelligence will be how blocks are managed, such as automatic duplication or deduplication. In order to test out the idea, but without any possession of fibre channel, I will just stick to existing Ethernet infrastructure. Therefore, [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I am new to storage technologies, but the plan is to build a customized SAN (storage area network). The intelligence will be how blocks are managed, such as automatic duplication or deduplication.<br />
<span id="more-1342"></span><br />
In order to test out the idea, but without any possession of fibre channel, I will just stick to existing Ethernet infrastructure. Therefore, the protocol of choice is iSCSI. Fortunately, this is now supported by Linux kernel.</p>
<p>For iSCSI, there are two existences: initiator and target. An initiator sends SCSI requests, which will be wrapped into TCP/IP requests. A target is responsible for serving requests and communicating with block devices. In other words, initiator is like a SCSI adapter that is installed on a client machine, while a target is a storage server instance. Apparently, target does all the heavy lifting.</p>
<p>The current implementation of iSCSI target on linux is called <a href="http://www.linux-iscsi.org/wiki/Target" target="_blank">&#8220;LIO Target&#8221;</a>, developed and open-sourced by RisingTide Systems LLC, featuring <a href="http://www.marcfleischmann.com/" target="_blank">a German CEO/Co-founder</a>. It is in Linux kernel since version 2.6.38. The current kernel version is 3.3.4. So it has been there for a while, which means it&#8217;s getting stable.</p>
<p>LIO Target does not only support iSCSI. It also includes support for Fibre Channel, Infiniband, etc. But I will only need its iSCSI module.</p>
<p>This post will be expanded with more information until I figure out which part of LIO Target should be modified to include new functionality.</p>
<p>1. Setup<br />
(1) Target: According to <a href="http://linux-iscsi.org/wiki/ISCSI" target="_blank">this document</a>, setup of a LIO target is handled by a dedicated tool called <a href="http://linux-iscsi.org/wiki/Targetcli" target="_blank">Targetcli</a>.<br />
(2) Initiator: The initiator from the same company, Rising Tide Systems, is called <a href="http://linux-iscsi.org/wiki/Core-iSCSI" target="_blank">Core-iSCSI</a>.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/some-notes-about-iscsi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20K visits milestone for Phacai.com</title>
		<link>http://www.phacai.com/20k-visits-milestone-for-phacai-com</link>
		<comments>http://www.phacai.com/20k-visits-milestone-for-phacai-com#comments</comments>
		<pubDate>Wed, 18 Apr 2012 15:48:34 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Z_others]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1333</guid>
		<description><![CDATA[In one and a half month, it will be a year since I started to use &#8220;
Related posts:<ol>
<li><a href='http://www.phacai.com/best-multicore-posts-of-2008-on-multicoreinfocom' rel='bookmark' title='Best Multicore Posts of 2008 on MultiCoreInfo.com'>Best Multicore Posts of 2008 on MultiCoreInfo.com</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In one and a half month, it will be a year since I started to use &#8220;<a href="http://www4.clustrmaps.com/counter/maps.php?url=http://www.phacai.com" target=_blank">ClustrMaps</a>&#8221; for site statistics. And &#8220;phacai.com&#8221; has already served more than 20K (20,435 to be specific) visits! That&#8217;s around 80 visits per day.</p>
<p>Hope to double this number in the next year. Following is a screenshot I took a moment ago.</p>
<p><a href="http://www.phacai.com/wp-content/uploads/2012/04/20k.jpg"><img src="http://www.phacai.com/wp-content/uploads/2012/04/20k.jpg" alt="screenshot" title="20k" width="945" class="alignnone size-full wp-image-1335" /></a></p>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/best-multicore-posts-of-2008-on-multicoreinfocom' rel='bookmark' title='Best Multicore Posts of 2008 on MultiCoreInfo.com'>Best Multicore Posts of 2008 on MultiCoreInfo.com</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/20k-visits-milestone-for-phacai-com/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contractor rate for programmer (freelancer)</title>
		<link>http://www.phacai.com/contractor-rate-for-programmer-freelancer</link>
		<comments>http://www.phacai.com/contractor-rate-for-programmer-freelancer#comments</comments>
		<pubDate>Fri, 13 Apr 2012 21:02:18 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1331</guid>
		<description><![CDATA[Just a note. Here is a post that talks about the cost of building an iPhone app. In this post, people (first and second top comments) mentioned some price rates for programming contractors: (1)$150/hr for the Twitterrific app; (2) $100-150/hr for the Barack Obama app. I don&#8217;t know if programmers could at a share of [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Just a note.<br />
<span id="more-1331"></span><br />
Here is a <a href="http://stackoverflow.com/questions/209170/how-much-does-it-cost-to-develop-an-iphone-application" target="_blank">post</a> that talks about the cost of building an iPhone app.</p>
<p>In this post, people (first and second top comments) mentioned some price rates for programming contractors: (1)$150/hr for the Twitterrific app;  (2) $100-150/hr for the Barack Obama app. I don&#8217;t know if programmers could at a share of the app&#8217;s future revenue, which might be a non-trivial amount for a serious app.</p>
<p>A typical big company in Silicon Valley, pays his programmer at $50~100/hr ($8,000~16,000/month), but there will be other benefits such as medical insurance and annual bonus.</p>
<p>The choices on the two sides, freelancer or employee, sound both interesting.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/contractor-rate-for-programmer-freelancer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python code: merge multiple files into one multi-column file</title>
		<link>http://www.phacai.com/python-code-merge-multiple-files-into-one-multi-column-file</link>
		<comments>http://www.phacai.com/python-code-merge-multiple-files-into-one-multi-column-file#comments</comments>
		<pubDate>Mon, 09 Apr 2012 19:09:45 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1328</guid>
		<description><![CDATA[Let&#8217;s begin with an example. Assume two input files, &#8220;cdf1&#8243; and &#8220;cdf2&#8243;: &#8220;cdf1&#8243; 0 0.0009765625 3 0.011474609375 18 0.013916015625 20 0.014404296875 21 0.091552734375 131 0.092041015625 239 0.162841796875 604 0.164306640625 605 0.166748046875 607 0.167724609375 &#8220;cdf2&#8243; 5 0.011474609375 10 0.013916015625 20 0.014404296875 21 0.091552734375 131 0.092041015625 239 0.162841796875 604 0.164306640625 605 0.166748046875 607 0.167724609375 946 0.168212890625 Both [...]
Related posts:<ol>
<li><a href='http://www.phacai.com/calculating-cdf-python-code' rel='bookmark' title='Calculating CDF (Python Code)'>Calculating CDF (Python Code)</a></li>
<li><a href='http://www.phacai.com/split-one-text-file-into-multiple-ones-with-shell-script' rel='bookmark' title='Split one text file into multiple ones, with Shell script'>Split one text file into multiple ones, with Shell script</a></li>
<li><a href='http://www.phacai.com/code-to-compute-sha-1-hash-for-a-file' rel='bookmark' title='Code to compute SHA-1 hash for a file'>Code to compute SHA-1 hash for a file</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s begin with an example. Assume two input files, &#8220;cdf1&#8243; and &#8220;cdf2&#8243;:<br />
<span id="more-1328"></span><br />
&#8220;cdf1&#8243;</p>
<pre>
0 0.0009765625
3 0.011474609375
18 0.013916015625
20 0.014404296875
21 0.091552734375
131 0.092041015625
239 0.162841796875
604 0.164306640625
605 0.166748046875
607 0.167724609375
</pre>
<p>&#8220;cdf2&#8243;</p>
<pre>
5 0.011474609375
10 0.013916015625
20 0.014404296875
21 0.091552734375
131 0.092041015625
239 0.162841796875
604 0.164306640625
605 0.166748046875
607 0.167724609375
946 0.168212890625
</pre>
<p>Both files contain two columns. I want to merge them into the following single file:</p>
<pre>
0 0.0009765625 5 0.011474609375
3 0.011474609375 10 0.013916015625
18 0.013916015625 20 0.014404296875
20 0.014404296875 21 0.091552734375
21 0.091552734375 131 0.092041015625
131 0.092041015625 239 0.162841796875
239 0.162841796875 604 0.164306640625
604 0.164306640625 605 0.166748046875
605 0.166748046875 607 0.167724609375
607 0.167724609375 946 0.168212890625
</pre>
<p>As we can see the output file contains 4 columns, coming from the two input files.</p>
<p>This can be accomplished by the following script. It can handle various number of input files, not just two (refer to USAGE).</p>
<div class="hl-title">Download: <a href="http://www.phacai.com/wp-content/plugins/coolcode/coolcode.php?p=1328&amp;download=merger.py">merger.py</a></div>
<div class="hl-surround">
<ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)">
<li class="hl-firstline"><span style="color: #ffa500;">#!/usr/bin/env python</span></li>
<li><span style="color: Green;">import</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">os</span><span style="color: Gray;">, </span><span style="color: Blue;">sys</span><span style="color: Gray;">, </span><span style="color: Blue;">string</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Teal;">len</span><span style="color: Olive;">(</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">)</span><span style="color: Gray;">&lt;=</span><span style="color: Maroon;">2</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">print</span><span style="color: Gray;">&nbsp;</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">USAGE: ./cdf-merger.py outfile cdf1 cdf2 &#8230;</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">exit</span><span style="color: Olive;">(</span><span style="color: Maroon;">0</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Blue;">outfile</span><span style="color: Gray;">=</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">[</span><span style="color: Maroon;">1</span><span style="color: Olive;">]</span></li>
<li><span style="color: Blue;">fdout</span><span style="color: Gray;">=</span><span style="color: Teal;">open</span><span style="color: Olive;">(</span><span style="color: Blue;">outfile</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">w</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Teal;">len</span><span style="color: Olive;">(</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">)</span><span style="color: Gray;">==</span><span style="color: Maroon;">3</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">cdf1</span><span style="color: Gray;">=</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">[</span><span style="color: Maroon;">2</span><span style="color: Olive;">]</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">os</span><span style="color: Gray;">.</span><span style="color: Blue;">system</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">cp&nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">+</span><span style="color: Blue;">cdf1</span><span style="color: Gray;">+</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">&nbsp;</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">+</span><span style="color: Blue;">outfile</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">exit</span><span style="color: Olive;">(</span><span style="color: Maroon;">0</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Blue;">n_cdfs</span><span style="color: Gray;">=</span><span style="color: Teal;">len</span><span style="color: Olive;">(</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">)</span><span style="color: Gray;">-</span><span style="color: Maroon;">2</span></li>
<li><span style="color: Blue;">fnames</span><span style="color: Gray;">=</span><span style="color: Olive;">[]</span></li>
<li><span style="color: Blue;">fds</span><span style="color: Gray;">=</span><span style="color: Olive;">[]</span></li>
<li><span style="color: Blue;">curstr</span><span style="color: Gray;">=</span><span style="color: Olive;">[]</span></li>
<li><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">i</span><span style="color: Gray;"> </span><span style="color: Green;">in</span><span style="color: Gray;"> </span><span style="color: Teal;">range</span><span style="color: Olive;">(</span><span style="color: Maroon;">2</span><span style="color: Gray;">, </span><span style="color: Maroon;">2</span><span style="color: Gray;">+</span><span style="color: Blue;">n_cdfs</span><span style="color: Olive;">)</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">fnames</span><span style="color: Gray;">.</span><span style="color: Blue;">append</span><span style="color: Olive;">(</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">[</span><span style="color: Blue;">i</span><span style="color: Olive;">])</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">fds</span><span style="color: Gray;">.</span><span style="color: Blue;">append</span><span style="color: Olive;">(</span><span style="color: Teal;">open</span><span style="color: Olive;">(</span><span style="color: Blue;">sys</span><span style="color: Gray;">.</span><span style="color: Blue;">argv</span><span style="color: Olive;">[</span><span style="color: Blue;">i</span><span style="color: Olive;">]</span><span style="color: Gray;">, </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">r</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">))</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">curstr</span><span style="color: Gray;">.</span><span style="color: Blue;">append</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">NULL</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">i</span><span style="color: Gray;"> </span><span style="color: Green;">in</span><span style="color: Gray;"> </span><span style="color: Teal;">range</span><span style="color: Olive;">(</span><span style="color: Maroon;">0</span><span style="color: Gray;">, </span><span style="color: Maroon;">4097</span><span style="color: Olive;">)</span><span style="color: Gray;">: </span><span style="color: #ffa500;">#the final file will contain no more than 4097 lines</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">count</span><span style="color: Gray;">=</span><span style="color: Maroon;">0</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">f</span><span style="color: Gray;"> </span><span style="color: Green;">in</span><span style="color: Gray;"> </span><span style="color: Teal;">range</span><span style="color: Olive;">(</span><span style="color: Teal;">len</span><span style="color: Olive;">(</span><span style="color: Blue;">fds</span><span style="color: Olive;">))</span><span style="color: Gray;">: </span><span style="color: #ffa500;">#read one line from each file</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tmpline</span><span style="color: Gray;"> = </span><span style="color: Blue;">fds</span><span style="color: Olive;">[</span><span style="color: Blue;">f</span><span style="color: Olive;">]</span><span style="color: Gray;">.</span><span style="color: Blue;">readline</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">rstrip</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Navy;">\n</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Teal;">len</span><span style="color: Olive;">(</span><span style="color: Blue;">tmpline</span><span style="color: Olive;">)</span><span style="color: Gray;">&gt;</span><span style="color: Maroon;">0</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">curstr</span><span style="color: Olive;">[</span><span style="color: Blue;">f</span><span style="color: Olive;">]</span><span style="color: Gray;">=</span><span style="color: Blue;">tmpline</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">count</span><span style="color: Gray;">+=</span><span style="color: Maroon;">1</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">count</span><span style="color: Gray;">==</span><span style="color: Blue;">n_cdfs</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">break</span><span style="color: Gray;">&nbsp;</span><span style="color: #ffa500;">#all input files have reached their ends</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Green;">for</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">f</span><span style="color: Gray;"> </span><span style="color: Green;">in</span><span style="color: Gray;"> </span><span style="color: Teal;">range</span><span style="color: Olive;">(</span><span style="color: Teal;">len</span><span style="color: Olive;">(</span><span style="color: Blue;">fds</span><span style="color: Olive;">))</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">f</span><span style="color: Gray;">&gt;</span><span style="color: Maroon;">0</span><span style="color: Gray;">:</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">fdout</span><span style="color: Gray;">.</span><span style="color: Blue;">write</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">&nbsp;</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">fdout</span><span style="color: Gray;">.</span><span style="color: Blue;">write</span><span style="color: Olive;">(</span><span style="color: Blue;">curstr</span><span style="color: Olive;">[</span><span style="color: Blue;">f</span><span style="color: Olive;">])</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">fdout</span><span style="color: Gray;">.</span><span style="color: Blue;">write</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Navy;">\n</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span></li>
<li><span style="color: Blue;">fdout</span><span style="color: Gray;">.</span><span style="color: Blue;">close</span><span style="color: Olive;">()</span></li>
</ol>
</div>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/calculating-cdf-python-code' rel='bookmark' title='Calculating CDF (Python Code)'>Calculating CDF (Python Code)</a></li>
<li><a href='http://www.phacai.com/split-one-text-file-into-multiple-ones-with-shell-script' rel='bookmark' title='Split one text file into multiple ones, with Shell script'>Split one text file into multiple ones, with Shell script</a></li>
<li><a href='http://www.phacai.com/code-to-compute-sha-1-hash-for-a-file' rel='bookmark' title='Code to compute SHA-1 hash for a file'>Code to compute SHA-1 hash for a file</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/python-code-merge-multiple-files-into-one-multi-column-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some performance numbers of PostgresSQL running TPC-H (DBT-3)</title>
		<link>http://www.phacai.com/some-performance-numbers-of-postgressql-running-tpc-h-dbt-3</link>
		<comments>http://www.phacai.com/some-performance-numbers-of-postgressql-running-tpc-h-dbt-3#comments</comments>
		<pubDate>Fri, 02 Mar 2012 02:36:57 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1321</guid>
		<description><![CDATA[Now It&#8217;s hard to find some real performance numbers of PostgreSQL. The original link storing such information does not work anymore: http://developer.osdl.org/markw/postgrescvs/. Try it yourself, you will be redirected. I found an old post on the Internet. But this guy used an ancient PostgreSQL, version 8.1.4, to run TPC-H (DBT-3 implementation). I don&#8217;t know how [...]
Related posts:<ol>
<li><a href='http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql' rel='bookmark' title='Nested loop when running TPC-H on PostgreSQL'>Nested loop when running TPC-H on PostgreSQL</a></li>
<li><a href='http://www.phacai.com/error-when-running-dbt2-cant-locate-testparserdbt2-pm-in-inc' rel='bookmark' title='Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;'>Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;</a></li>
<li><a href='http://www.phacai.com/find-out-the-overhead-size-for-each-tuple-in-a-postgresql-table' rel='bookmark' title='The overhead size for each tuple in a Postgresql table'>The overhead size for each tuple in a Postgresql table</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Now It&#8217;s hard to find some real performance numbers of PostgreSQL. The original link storing such information does not work anymore: <a href="http://developer.osdl.org/markw/postgrescvs/">http://developer.osdl.org/markw/postgrescvs/</a>. Try it yourself, you will be redirected.<br />
<span id="more-1321"></span><br />
I found an old post on the Internet. But this guy used an ancient PostgreSQL, version 8.1.4, to run TPC-H (DBT-3 implementation). I don&#8217;t know how much performance will be improved if we use nowadays&#8217; 9* versions. Anyway, the link is here: <a href="http://ossipedia.ipa.go.jp/en/capacity/CS0612150222EN/">link</a></p>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql' rel='bookmark' title='Nested loop when running TPC-H on PostgreSQL'>Nested loop when running TPC-H on PostgreSQL</a></li>
<li><a href='http://www.phacai.com/error-when-running-dbt2-cant-locate-testparserdbt2-pm-in-inc' rel='bookmark' title='Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;'>Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;</a></li>
<li><a href='http://www.phacai.com/find-out-the-overhead-size-for-each-tuple-in-a-postgresql-table' rel='bookmark' title='The overhead size for each tuple in a Postgresql table'>The overhead size for each tuple in a Postgresql table</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/some-performance-numbers-of-postgressql-running-tpc-h-dbt-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slow queries in throughput test of TPC-H on PostgreSQL</title>
		<link>http://www.phacai.com/slow-queries-in-throughput-test-of-tpc-h-on-postgresql</link>
		<comments>http://www.phacai.com/slow-queries-in-throughput-test-of-tpc-h-on-postgresql#comments</comments>
		<pubDate>Wed, 29 Feb 2012 03:16:46 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1317</guid>
		<description><![CDATA[Queries 9, 18, 21 are extremely slow. Query 18 is quite fast when I run it separately, but slowed down a lot in throughput test. The relative performance numbers are very close to the case of HP DL980. (link2) Related posts: Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221; Nested loop when running TPC-H [...]
Related posts:<ol>
<li><a href='http://www.phacai.com/error-when-running-dbt2-cant-locate-testparserdbt2-pm-in-inc' rel='bookmark' title='Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;'>Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;</a></li>
<li><a href='http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql' rel='bookmark' title='Nested loop when running TPC-H on PostgreSQL'>Nested loop when running TPC-H on PostgreSQL</a></li>
<li><a href='http://www.phacai.com/the-procedure-to-run-dbt2-on-postgresql' rel='bookmark' title='The procedure to run DBT2 on PostgreSQL'>The procedure to run DBT2 on PostgreSQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Queries 9, 18, 21 are extremely slow. Query 18 is quite fast when I run it separately, but slowed down a lot in throughput test.<br />
<span id="more-1317"></span><br />
The relative performance numbers are very close to the case of <a href="http://www.tpc.org/tpch/results/tpch_result_detail.asp?id=111090101">HP DL980</a>. (<a href="http://kevinclosson.wordpress.com/2011/12/06/recent-sparc-t4-4-tpc-h-benchmark-results-proving-bandwidth-but-what-storage/">link2</a>)</p>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/error-when-running-dbt2-cant-locate-testparserdbt2-pm-in-inc' rel='bookmark' title='Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;'>Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;</a></li>
<li><a href='http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql' rel='bookmark' title='Nested loop when running TPC-H on PostgreSQL'>Nested loop when running TPC-H on PostgreSQL</a></li>
<li><a href='http://www.phacai.com/the-procedure-to-run-dbt2-on-postgresql' rel='bookmark' title='The procedure to run DBT2 on PostgreSQL'>The procedure to run DBT2 on PostgreSQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/slow-queries-in-throughput-test-of-tpc-h-on-postgresql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nested loop when running TPC-H on PostgreSQL</title>
		<link>http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql</link>
		<comments>http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql#comments</comments>
		<pubDate>Tue, 28 Feb 2012 01:08:39 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1315</guid>
		<description><![CDATA[I confirmed the observation by David Gruzman that for some queries in TPC-H, PostgreSQL is very slow because too much nested loop join is used. Using hash join instead will greatly improve performance. Here is my configuration Scale Factor: 10 Dataset size: 16GB (7 indexes) DRAM size: 2GB HDD: one Seagate Cheetha 15.7K rpm The [...]
Related posts:<ol>
<li><a href='http://www.phacai.com/some-performance-numbers-of-postgressql-running-tpc-h-dbt-3' rel='bookmark' title='Some performance numbers of PostgresSQL running TPC-H (DBT-3)'>Some performance numbers of PostgresSQL running TPC-H (DBT-3)</a></li>
<li><a href='http://www.phacai.com/slow-queries-in-throughput-test-of-tpc-h-on-postgresql' rel='bookmark' title='Slow queries in throughput test of TPC-H on PostgreSQL'>Slow queries in throughput test of TPC-H on PostgreSQL</a></li>
<li><a href='http://www.phacai.com/error-when-running-dbt2-cant-locate-testparserdbt2-pm-in-inc' rel='bookmark' title='Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;'>Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I confirmed the observation by <a href="http://dbaspects.blogspot.com/2010/03/tpch-on-postgresql.html">David Gruzman</a> that for some queries in TPC-H, PostgreSQL is very slow because too much nested loop join is used. Using hash join instead will greatly improve performance.<br />
<span id="more-1315"></span><br />
Here is my configuration</p>
<pre>
Scale Factor: 10
Dataset size: 16GB (7 indexes)
DRAM size: 2GB
HDD: one Seagate Cheetha 15.7K rpm
</pre>
<p>The indexes were built as specified in one of my previous posts: <a href="http://www.phacai.com/preparations-to-use-tpch-data-on-postgresql">link</a>. My machine is equipped with 8GB of memory, but I used Linux boot option &#8220;mem&#8221; to limit the size available to system.</p>
<p>Among all the 22 queries of TPC-H,  the following used queries used nest loop join</p>
<pre>
2 4 7 8 9 17 20 21
</pre>
<p>When disabling nest loop join, the performance of the following queries were improved. Q9 and Q21 were especially improved.</p>
<pre>
4 8 9 21
</pre>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/some-performance-numbers-of-postgressql-running-tpc-h-dbt-3' rel='bookmark' title='Some performance numbers of PostgresSQL running TPC-H (DBT-3)'>Some performance numbers of PostgresSQL running TPC-H (DBT-3)</a></li>
<li><a href='http://www.phacai.com/slow-queries-in-throughput-test-of-tpc-h-on-postgresql' rel='bookmark' title='Slow queries in throughput test of TPC-H on PostgreSQL'>Slow queries in throughput test of TPC-H on PostgreSQL</a></li>
<li><a href='http://www.phacai.com/error-when-running-dbt2-cant-locate-testparserdbt2-pm-in-inc' rel='bookmark' title='Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;'>Error when running DBT2: &#8220;Can&#8217;t locate Test/Parser/Dbt2.pm in @INC&#8221;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/nested-loop-when-running-tpc-h-on-postgresql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to trim your SSD under linux?</title>
		<link>http://www.phacai.com/how-to-trim-your-ssd-under-linux</link>
		<comments>http://www.phacai.com/how-to-trim-your-ssd-under-linux#comments</comments>
		<pubDate>Thu, 23 Feb 2012 01:30:22 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1306</guid>
		<description><![CDATA[We know in the latest file system EXT4, when a file is deleted, a trim command will be automatically issued so that the underlying device will know which blocks are no longer used. SSDs will benefit from TRIM because the garbage collection overhead can be reduced. Sometimes you may want to trim your SSD manually, [...]
Related posts:<ol>
<li><a href='http://www.phacai.com/show-device-capacity-in-linux' rel='bookmark' title='show device capacity in Linux'>show device capacity in Linux</a></li>
<li><a href='http://www.phacai.com/some-resources-for-studying-linux' rel='bookmark' title='Some Resources for Studying Linux'>Some Resources for Studying Linux</a></li>
<li><a href='http://www.phacai.com/bin-sbin-usrbin-in-linux-filesystem' rel='bookmark' title='/bin, /sbin, /usr/bin in Linux Filesystem'>/bin, /sbin, /usr/bin in Linux Filesystem</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>We know in the latest file system EXT4, when a file is deleted, a trim command will be automatically issued so that the underlying device will know which blocks are no longer used. SSDs will benefit from TRIM because the garbage collection overhead can be reduced.<br />
<span id="more-1306"></span><br />
Sometimes you may want to trim your SSD manually, maybe because your are not running on EXT4. Here is how you can do this. The basic tool is &#8220;hdparm&#8221;. With this tool, we can trim an SSD at the granularity of blocks. First, check your tool by typing</p>
<pre>
hdparm --help
</pre>
<p>Towards the end of the list, you should expect the following two options</p>
<pre>
 --trim-sector-ranges
 --trim-sector-ranges-stdin
</pre>
<p>If you don&#8217;t see them, your tool is outdated. I have two machines, each running a different linux distribution. Fedora Core 13 has the right &#8220;hdparm&#8221; out of the box, but Ubuntu 10.4 does not.</p>
<p>Assume your hdparm is up-to-date. With the first option &#8220;&#8211;trim-sector-ranges&#8221;, you can trim your device like this:</p>
<pre>
hdparm --trim-sector-ranges 1000:4 7894:16 /dev/sdz
</pre>
<p>As you can image, this is simple. In the above command, it will trim two ranges, starting at Sector 1000 and 7894 respectively. In the first region, 4 sectors will be trimmed, and in the second region, 16 sectors will be trimmed. For this command, a sector means 512 bytes.</p>
<p>Although very simple, it will become messy if you want to trim many sectors at once. Sometimes, you may have to specify a very large continuous range as many consecutive ranges. In this case, you will need the second option. Following is a script that shows how to use this option.</p>
<div class="hl-surround">
<ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)">
<li class="hl-firstline">t1mb=`expr 1024 \* 1024 / 512`</li>
<li>t1gb=`expr 1024 \* 1024 \* 1024 / 512`</li>
<li>sizes=&quot;$t1gb&quot;</li>
<li>for sz in $sizes;do</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;echo &quot;# of sectors: $sz;&quot;</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;st=0</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ts1=`date +%s`</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;while [ $st -lt $sz ];do</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo $st:$bstep</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;st=`expr $st + $bstep`</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;done | time hdparm &#8211;please-destroy-my-drive &#8211;trim-sector-ranges-stdin /dev/sdd</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ts2=`date +%s`</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;dur=`expr $ts2 &#8211; $ts1`</li>
<li>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;echo &quot;Total time: $dur seconds;&quot;</li>
<li>done</li>
</ol>
</div>
<p>Note: if your SSD is quite old, such as the Intel 25E, 25M series, they may not support TRIM, which is a relatively new term. If you send trim commands to such devices, you will see error messages such as &#8220;FAILED: Input/Output error&#8221;.</p>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/show-device-capacity-in-linux' rel='bookmark' title='show device capacity in Linux'>show device capacity in Linux</a></li>
<li><a href='http://www.phacai.com/some-resources-for-studying-linux' rel='bookmark' title='Some Resources for Studying Linux'>Some Resources for Studying Linux</a></li>
<li><a href='http://www.phacai.com/bin-sbin-usrbin-in-linux-filesystem' rel='bookmark' title='/bin, /sbin, /usr/bin in Linux Filesystem'>/bin, /sbin, /usr/bin in Linux Filesystem</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/how-to-trim-your-ssd-under-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NAT on a Ubuntu machine</title>
		<link>http://www.phacai.com/nat-on-a-ubuntu-machine</link>
		<comments>http://www.phacai.com/nat-on-a-ubuntu-machine#comments</comments>
		<pubDate>Tue, 14 Feb 2012 21:08:55 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Z_others]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1302</guid>
		<description><![CDATA[My ubuntu machine has two NICs. eth0 connects to the outside world, and eth1 connects to my internal network. To enable Internet access for internal network, follow these steps. su echo 1 &#62; /proc/sys/net/ipv4/ip_forward &#160; /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE /sbin/iptables -A FORWARD -i eth0 -o eth1 -m state &#8211;state RELATED,ESTABLISHED [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>My ubuntu machine has two NICs. eth0 connects to the outside world, and eth1 connects to my internal network. To enable Internet access for internal network, follow these steps.<br />
<span id="more-1302"></span></p>
<div class="hl-surround">
<ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)">
<li class="hl-firstline">su</li>
<li>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</li>
<li>&nbsp;</li>
<li>/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</li>
<li>/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT</li>
<li>/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEP</li>
<li>&nbsp;</li>
<li>/sbin/iptables -A INPUT -p tcp -m tcp &#8211;sport 53 &#8211;dport 1024:65535 -m state &#8211;state ESTABLISHED -j ACCEPT</li>
<li>/sbin/iptables -A INPUT -p udp -m udp &#8211;sport 53 &#8211;dport 1024:65535 -m state &#8211;state ESTABLISHED -j ACCEPT</li>
<li>/sbin/iptables -A OUTPUT -p tcp -m tcp &#8211;sport 1024:65535 &#8211;dport 53 -m state &#8211;state NEW,ESTABLISHED -j ACCEPT</li>
<li>/sbin/iptables -A OUTPUT -p udp -m udp &#8211;sport 1024:65535 &#8211;dport 53 -m state &#8211;state NEW,ESTABLISHED -j ACCEPT</li>
</ol>
</div>
<p>Configure the machines in the internal network, set their gateways to the (internal) IP address of the Ubuntu machine.</p>
<p>To make sure these settings can survive a reboot. </p>
<p>(1) Open /etc/sysctl.conf, assign &#8220;1&#8243; to parameter &#8220;net.ipv4.ip_forward&#8221;;<br />
(2) Open /etc/rc.local, add the rest of the command to this file, at the bottom but before &#8220;exit&#8221;.</p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/nat-on-a-ubuntu-machine/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indexes created by dbt3 (TPC-H)</title>
		<link>http://www.phacai.com/indexes-created-by-dbt3-tpc-h</link>
		<comments>http://www.phacai.com/indexes-created-by-dbt3-tpc-h#comments</comments>
		<pubDate>Tue, 07 Feb 2012 20:25:18 +0000</pubDate>
		<dc:creator>Mr. One</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.phacai.com/?p=1295</guid>
		<description><![CDATA[DBT3 creates many indexes: one primary index on the primary key of each table, and the following secondary indexes: CREATE INDEX i_l_shipdate ON lineitem (l_shipdate); CREATE INDEX i_l_suppkey_partkey ON lineitem (l_partkey, l_suppkey); CREATE INDEX i_l_partkey ON lineitem (l_partkey); CREATE INDEX i_l_suppkey ON lineitem (l_suppkey); CREATE INDEX i_l_receiptdate ON lineitem (l_receiptdate); CREATE INDEX i_l_orderkey ON lineitem [...]
Related posts:<ol>
<li><a href='http://www.phacai.com/error-in-rf2-of-dbt3-tpc-h' rel='bookmark' title='Error in rf2 of DBT3 (TPC-H)'>Error in rf2 of DBT3 (TPC-H)</a></li>
<li><a href='http://www.phacai.com/preparations-to-use-tpch-data-on-postgresql' rel='bookmark' title='Preparations to use TPCH data on Postgresql'>Preparations to use TPCH data on Postgresql</a></li>
<li><a href='http://www.phacai.com/postgresql-how-an-index-is-physically-created-on-disk' rel='bookmark' title='Postgresql: how an index is physically created on disk'>Postgresql: how an index is physically created on disk</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>DBT3 creates many indexes: one primary index on the primary key of each table, and the following secondary indexes:<br />
<span id="more-1295"></span></p>
<pre>
CREATE INDEX i_l_shipdate ON lineitem (l_shipdate);
CREATE INDEX i_l_suppkey_partkey ON lineitem (l_partkey, l_suppkey);
CREATE INDEX i_l_partkey ON lineitem (l_partkey);
CREATE INDEX i_l_suppkey ON lineitem (l_suppkey);
CREATE INDEX i_l_receiptdate ON lineitem (l_receiptdate);
CREATE INDEX i_l_orderkey ON lineitem (l_orderkey);
CREATE INDEX i_l_orderkey_quantity ON lineitem (l_orderkey, l_quantity);
CREATE INDEX i_c_nationkey ON customer (c_nationkey);
CREATE INDEX i_o_orderdate ON orders (o_orderdate);
CREATE INDEX i_o_custkey ON orders (o_custkey);
CREATE INDEX i_s_nationkey ON supplier (s_nationkey);
CREATE INDEX i_ps_partkey ON partsupp (ps_partkey);
CREATE INDEX i_ps_suppkey ON partsupp (ps_suppkey);
CREATE INDEX i_n_regionkey ON nation (n_regionkey);
CREATE INDEX i_l_commitdate ON lineitem (l_commitdate);
</pre>
<p>However, not every index will be used. Generating more than necessary indexes will increase the data set size. I analyzed in my settings, only 14 indexes are used (4 primary and 10 secondary):</p>
<pre>
i_l_orderkey
i_l_partkey
i_l_receiptdate
i_l_shipdate
i_l_suppkey_partkey
i_o_custkey
i_o_orderdate
i_ps_partkey
i_ps_suppkey
i_s_nationkey
pk_customer
pk_orders
pk_part
pk_supplier
</pre>
<p>To create a database of a minimum size, with only (most) necessary indexes created, please refer to a previous post of mine: <a href="http://www.phacai.com/preparations-to-use-tpch-data-on-postgresql">Preparations to use TPCH data on Postgresql</a>.</p>
<p>Related posts:<ol>
<li><a href='http://www.phacai.com/error-in-rf2-of-dbt3-tpc-h' rel='bookmark' title='Error in rf2 of DBT3 (TPC-H)'>Error in rf2 of DBT3 (TPC-H)</a></li>
<li><a href='http://www.phacai.com/preparations-to-use-tpch-data-on-postgresql' rel='bookmark' title='Preparations to use TPCH data on Postgresql'>Preparations to use TPCH data on Postgresql</a></li>
<li><a href='http://www.phacai.com/postgresql-how-an-index-is-physically-created-on-disk' rel='bookmark' title='Postgresql: how an index is physically created on disk'>Postgresql: how an index is physically created on disk</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.phacai.com/indexes-created-by-dbt3-tpc-h/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

