<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The great grandson of Husnu Sensoy</title>
	<atom:link href="http://husnusensoy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://husnusensoy.wordpress.com</link>
	<description>You never know how long the battles going to be. You have to be ever ready...</description>
	<lastBuildDate>Sun, 08 Jan 2012 13:57:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='husnusensoy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The great grandson of Husnu Sensoy</title>
		<link>http://husnusensoy.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://husnusensoy.wordpress.com/osd.xml" title="The great grandson of Husnu Sensoy" />
	<atom:link rel='hub' href='http://husnusensoy.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Line of Sight (LoS) Analysis: Optimizing the Observers for Best Coverage (Part 4)</title>
		<link>http://husnusensoy.wordpress.com/2011/09/24/line-of-sight-los-analysis-optimizing-the-observers-for-best-coverage-part-4/</link>
		<comments>http://husnusensoy.wordpress.com/2011/09/24/line-of-sight-los-analysis-optimizing-the-observers-for-best-coverage-part-4/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 20:29:24 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Spatial]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1174</guid>
		<description><![CDATA[After my last post on multiple observers, I will discuss another topic related to multiple observers. The question is &#8221;What should be the optimal choice of N observers on terrain such that visible region (as many green points as possible by our convention) is maximized ?&#8221;. We first define a pseudo code in order to find the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1174&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align:left;">After my <a title="Line of Sight (LoS) Analysis: Part 3" href="http://husnusensoy.wordpress.com/2011/09/16/line-of-sight-los-analysis-part-3/">last post</a> on multiple observers, I will discuss another topic related to multiple observers. The question is &#8221;What should be the optimal choice of <em>N</em> observers on terrain such that visible region (as many <em>green</em> points as possible by our convention) is maximized ?&#8221;.</div>
<p>We first define a pseudo code in order to find the optimal (Not guaranteed. Keep in mind that optimization problems are usually NP-complete by their nature) layout of <em>N</em> observers. For simplicity we will assume that all observers have the same height (7 units) which can be relaxed later.</p>
<p>We will implement a constructive way of finding optimal layout for N observers. Here is the pseudo code:</p>
<ol>
<li>Find the optimal layout for 1 observer and compute coverage ratio (best coverage for one observer)</li>
<li>Add another random observer ((<em>uniform(-8,8),<em>uniform(-8,8))</em></em>) and compute the coverage for those two observers (random one and the best observer from Step 1).</li>
<ol>
<li>If the new coverage is better than the coverage in Step 1, use this as the input of optimization solver</li>
<li>Otherwise repeat Step 2 to find a better coverage.</li>
</ol>
<li>For number of observers greater than 2 apply the idea in Step 2 recursively.</li>
</ol>
<p>There are some blur points in this pseudo code. We will define those before moving further with the implementation.</p>
<h3>Coverage</h3>
<p>The very first thing to be defined is the coverage idea. As you will remember from <a title="Line of Sight (LoS) Analysis: Part 2" href="http://husnusensoy.wordpress.com/2011/09/08/line-of-sight-los-analysis-part-2/">second post</a>, we have defined our 3D terrain by evaluating our <em>height</em> function over outer product of <em>x &amp; y</em> values varying over <em>[-8,8]</em> with a step size of <em>0.1</em> units. We have <em>1681</em> different<em> (x,y)</em> tuples. Here is the definition of coverage based on our conventions:</p>
<ul>
<li><strong>Coverage Ratio</strong> is the ratio of points within LoS of a given observer/group of observers (at least one of the observers mark those set of points as <em>green</em>) to the total number of points (1681)</li>
</ul>
<h3>How to Find Optimal Coordinates of Observers ?</h3>
<p>Optimality is a very common word used in place of many different concepts  in real life or engineering. Let me define it once more for our purpose:</p>
<ul>
<li><strong>Optimization</strong> is the process of searching for an <em>N-dimensional vector</em> using a <em>technique</em> to maximize/minimize<em> a function of that N-dimensional vector</em>.</li>
</ul>
<p>Now let&#8217;s substitute three italic words of definition for our problem:</p>
<ul>
<li><strong>N-dimensional vector</strong> in our problem is the vector of first to components of observer dimensions. Such as,<em> (x1,y1,x2,y2,&#8230;,xn,yn).</em></li>
<li><strong>Technique</strong> to be used is the <a title="Nelder &amp; Mead Algorithm" href="http://en.wikipedia.org/wiki/Nelder%E2%80%93Mead_method" target="_blank">Nelder and Mead Technique</a> (A version of it implemented in R).</li>
<li><strong>Function</strong> to be maximized is the coverage function which we have defined for a given set of observers.</li>
</ul>
<h3>Implementation</h3>
<p>Let&#8217;s start by defining the function to be optimized that is <em>coverage</em> of terrain for a given set of observers.</p>
<p><pre class="brush: r;">

targetfunc&lt;-function(observer){
m &lt;- matrix(data=observer,ncol=2,byrow=TRUE)

# Compute merged status of all observers
mergedstatus &lt;- rep(&quot;red&quot;,length(terrain$height))
for(oidx in seq(1:dim(m)[1])){
terrain$dist2observer &lt;- distance(terrain, c(m[oidx,],7))

status &lt;- LoS(terrain,c(m[oidx,],7),maxVisibleDistance)

mergedstatus &lt;- updatestatus(mergedstatus,status)
}

sum(mergedstatus==&quot;green&quot;)/1681
}

</pre></p>
<p><em>matrix</em> routine allows us to create a table of two columns(first two dimensions of observers) and <em>length(observer)/2 </em>rows<em>. </em>We have used the technique discussed in<a title="Line of Sight (LoS) Analysis: Part 3" href="http://husnusensoy.wordpress.com/2011/09/16/line-of-sight-los-analysis-part-3/" target="_blank"> part 3</a> to compute merged status of observers.  <em>sum(mergedstatus==&#8221;green&#8221;)</em> call is used to count number of <em>green</em> points on terrain with respect to observers.</p>
<p>Next is the computation of first input to be given to optimization solver. That&#8217;s because for any optimization technique starting point is critical. Without any formal definition we will use our pseudo code to choose a <em>&#8220;good starting point/vector&#8221;.</em></p>
<p><pre class="brush: r;">

n &lt;- 2
baselineValue &lt;- 0.541344
previousObserver &lt;- c(1.15861411217711, 1.1499851362913)
observers &lt;- c(previousObserver,runif(2,-8,8))
while(targetfunc(observers) &lt;= baselineValue){
observers &lt;- c(previousObserver,runif(2,-8,8))
}
print(observers)

</pre></p>
<p>Above code is an example to initialize <em>observers</em> vector for searching best 2 observer layout. It uses the best coverage ratio for 1 observer case (<em>54.1344%</em>) and adds a new random observer next to best observer found for single observer case.</p>
<p>Final point is the optimization solver which is very simple and totally handled by R</p>
<p><pre class="brush: r;">

optim &lt;- optim(observers, targetfunc,
control=list(fnscale=-1,trace=5,REPORT=1))

</pre></p>
<p>First parameter is the initial value for input vector (prepared by previous code piece). Second parameter is the name of the function to be maximized. <em>optim</em> function is implemented to solve minimization problems by default. Setting <em>fnscale</em> attribute of <em>control</em> parameter turns it to a maximization problem solver.</p>
<p>Now we can combine all to have our final script</p>
<p><pre class="brush: r;">

library(rgl)
##################
# Functions
##################
# 3D Terrain Function
height &lt;- function (point) {
sin(point$x)+0.125*point$y*sin(2*point$x)+sin(point$y)+0.125*point$x*sin(2*point$y)+3
}

# Linear Function
linear &lt;- function (px, observer, target) {
v &lt;- observer - target

y &lt;- ((px - observer[1])/v[1])*v[2]+observer[2]
z &lt;- ((px - observer[1])/v[1])*v[3]+observer[3]

data.frame(x=px,y=y, z=z)
}

# Linear Function
distance &lt;- function (terrain, observer) {
sqrt((terrain$x-observer[1])^2+(terrain$y-observer[2])^2+(terrain$height-observer[3])^2)
}

LoS &lt;- function(terrain, observer, maxVisibleDistance){
status = c()
for (i in seq(1:nrow(terrain))) {
if (observer[1] == terrain$x[i] &amp;&amp; observer[2] == terrain$y[i]){
if(observer[3] &gt;= terrain$height[i]){
if (terrain$dist2observer[i] &gt; maxVisibleDistance){
status &lt;- c(status,&quot;yellow&quot;)
}else{
status &lt;- c(status,&quot;green&quot;)
}
}else{
status &lt;- c(status,&quot;red&quot;)
}
}else{
# All points on line
line &lt;- linear(seq(from=min(observer[1],terrain$x[i]),
to=max(observer[1],terrain$x[i]),
by=0.1),
observer,
c(terrain$x[i],terrain$y[i],terrain$height[i]))
# Terrain Height
h &lt;- height(line)

# LoS Analysis
aboveTerrain &lt;- round((line$z-h),2) &gt;= 0.00

visible &lt;- !is.element(FALSE,aboveTerrain)
if (visible){
# Second Rule
if(terrain$dist2observer[i] &lt;= maxVisibleDistance){
status &lt;- c(status,&quot;green&quot;)
}else{
status &lt;- c(status,&quot;yellow&quot;)
}
}else{
status &lt;- c(status,&quot;red&quot;)
}
}
}

status
}

updatestatus &lt;- function(status1,status2){
mergedstatus&lt;-c()

for(i in seq(length(status1))){
if (status1[i] == &quot;green&quot; || status2[i] == &quot;green&quot;){
mergedstatus &lt;- c(mergedstatus,&quot;green&quot;)
}else if (status1[i] == &quot;yellow&quot; || status2[i] == &quot;yellow&quot;){
mergedstatus &lt;- c(mergedstatus,&quot;yellow&quot;)
}
else{
mergedstatus &lt;- c(mergedstatus,&quot;red&quot;)
}
}

mergedstatus

}

##################
# Input
##################

# Max visible distance
maxVisibleDistance = 8

# Generate points with a step size of 0.1
x &lt;- seq(from=-8,to=8,by=0.4)

xygrid &lt;- expand.grid(x=x,
y=x)

terrain &lt;- data.frame(xygrid,
height=height(xygrid)
)

targetfunc&lt;-function(observer){
#print(observer)
m &lt;- matrix(data=observer,ncol=2,byrow=TRUE)

# Compute merged status of all observers
mergedstatus &lt;- rep(&quot;red&quot;,length(terrain$height))
for(oidx in seq(1:dim(m)[1])){
terrain$dist2observer &lt;- distance(terrain, c(m[oidx,],7))

status &lt;- LoS(terrain,c(m[oidx,],7),maxVisibleDistance)

mergedstatus &lt;- updatestatus(mergedstatus,status)
}

sum(mergedstatus==&quot;green&quot;)/1681
}

n &lt;- 3
baselineValue &lt;- 0.541344
previousObserver &lt;- c(-1.32661956044593, 2.18870625357827)

# List of observers (x1,y1,z1,x2,y2,z2)
observers &lt;- c(previousObserver,runif(2,-8,8))
while(targetfunc(observers) &lt;= baselineValue){
observers &lt;- c(previousObserver,runif(2,-8,8))
}
print(observers)

optim &lt;- optim(observers, targetfunc,
control=list(fnscale=-1,trace=5,REPORT=1))

</pre></p>
<h3>Results</h3>
<p>Here is the coverage ratio for different number of observers after optimization</p>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/coverage.png"><img class="aligncenter size-full wp-image-1183" title="Coverage" src="http://husnusensoy.files.wordpress.com/2011/09/coverage.png" alt="" width="639" height="464" /></a></p>
<p style="text-align:left;">You can test covering more than 98% of whole terrain is not trivial by using only 6 random observers but requires &#8220;careful&#8221; choice of their layout.</p>
<p style="text-align:left;">Finally let&#8217;s check step by step improvement in coverage as we add more optimal observers.</p>
<h2 style="text-align:left;">Single Observer</h2>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-1-observer.png"><img class="aligncenter size-full wp-image-1184" title="Coverage by Single Observer" src="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-1-observer.png" alt="" width="431" height="328" /></a></p>
<h2 style="text-align:left;">Two Observers</h2>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-2-observers.png"><img class="aligncenter size-full wp-image-1185" title="Coverage by 2 Observers" src="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-2-observers.png" alt="" width="429" height="337" /></a></p>
<h2 style="text-align:left;">Three Observers</h2>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-3-observers.png"><img class="aligncenter size-full wp-image-1186" title="Coverage by 3 Observers" src="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-3-observers.png" alt="" width="438" height="334" /></a></p>
<h2 style="text-align:left;">Four Observers</h2>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-4-observers.png"><img class="aligncenter size-full wp-image-1187" title="Coverage by 4 Observers" src="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-4-observers.png" alt="" width="438" height="330" /></a></p>
<h2 style="text-align:left;">Five Observers</h2>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-5-observers.png"><img class="aligncenter size-full wp-image-1188" title="Coverage by 5 Observers" src="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-5-observers.png" alt="" width="435" height="337" /></a></p>
<h2 style="text-align:left;">Six Observers</h2>
<p style="text-align:center;"><a href="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-6-observers.png"><img class="aligncenter size-full wp-image-1189" title="Coverage by 6 Observers" src="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-6-observers.png" alt="" width="440" height="333" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1174&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/09/24/line-of-sight-los-analysis-optimizing-the-observers-for-best-coverage-part-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/coverage.png" medium="image">
			<media:title type="html">Coverage</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-1-observer.png" medium="image">
			<media:title type="html">Coverage by Single Observer</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-2-observers.png" medium="image">
			<media:title type="html">Coverage by 2 Observers</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-3-observers.png" medium="image">
			<media:title type="html">Coverage by 3 Observers</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-4-observers.png" medium="image">
			<media:title type="html">Coverage by 4 Observers</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-5-observers.png" medium="image">
			<media:title type="html">Coverage by 5 Observers</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/visibility-by-6-observers.png" medium="image">
			<media:title type="html">Coverage by 6 Observers</media:title>
		</media:content>
	</item>
		<item>
		<title>Line of Sight (LoS) Analysis: Multiple Observers (Part 3)</title>
		<link>http://husnusensoy.wordpress.com/2011/09/16/line-of-sight-los-analysis-part-3/</link>
		<comments>http://husnusensoy.wordpress.com/2011/09/16/line-of-sight-los-analysis-part-3/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 16:42:54 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Spatial]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1155</guid>
		<description><![CDATA[In this part of my LoS Analysis series, I will try to extend 3D LoS analysis for multiple observers. Assume that you drop multiple observers into a terrain with the aim of covering it perfectly (100% green). We will reuse R codes used in Part 2. However we need to add a simple code piece [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1155&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this part of my LoS Analysis series, I will try to extend 3D LoS analysis for multiple observers. Assume that you drop multiple observers into a terrain with the aim of covering it perfectly (100% <em>green</em>).</p>
<p>We will reuse R codes used in <a title="Line of Sight (LoS) Analysis: Part 2" href="http://husnusensoy.wordpress.com/2011/09/08/line-of-sight-los-analysis-part-2/" target="_blank">Part 2</a>. However we need to add a simple code piece to be used to merge Line of Sight results of multiple observers. If a point on terrain is visible by any of the observers that means point is visible, if the point is visible but far from all observers that means point is out of LoS due to distance (marked with <em>yellow</em>), for all other conditions point on terrain is <em>red</em>. <em>updatestatus</em> function is implemented for this purpose.</p>
<p><pre class="brush: r;">
library(rgl)
##################
# Functions
##################
# 3D Terrain Function
height &lt;- function (point) {
sin(point$x)+0.125*point$y*sin(2*point$x)+sin(point$y)+0.125*point$x*sin(2*point$y)+3
}

# Linear Function
linear &lt;- function (px, observer, target) {
v &lt;- observer - target

y &lt;- ((px - observer[1])/v[1])*v[2]+observer[2]
z &lt;- ((px - observer[1])/v[1])*v[3]+observer[3]

data.frame(x=px,y=y, z=z)
}

# Linear Function
distance &lt;- function (terrain, observer) {
sqrt((terrain$x-observer[1])^2+(terrain$y-observer[2])^2+(terrain$height-observer[3])^2)
}

LoS &lt;- function(terrain, observer, maxVisibleDistance){
status = c()
for (i in seq(1:nrow(terrain))) {
if (observer[1] == terrain$x[i] &amp;&amp; observer[2] == terrain$y[i]){
if(observer[3] &gt;= terrain$height[i]){
if (terrain$dist2observer[i] &gt; maxVisibleDistance){
status &lt;- c(status,&quot;yellow&quot;)
}else{
status &lt;- c(status,&quot;green&quot;)
}
}else{
status &lt;- c(status,&quot;red&quot;)
}
}else{
# All points on line
line &lt;- linear(seq(from=min(observer[1],terrain$x[i]),
to=max(observer[1],terrain$x[i]),
by=0.1),
observer,
c(terrain$x[i],terrain$y[i],terrain$height[i]))
# Terrain Height
h &lt;- height(line)

# LoS Analysis
aboveTerrain &lt;- round((line$z-h),2) &gt;= 0.00

visible &lt;- !is.element(FALSE,aboveTerrain)
if (visible){
# Second Rule
if(terrain$dist2observer[i] &lt;= maxVisibleDistance){
status &lt;- c(status,&quot;green&quot;)
}else{
status &lt;- c(status,&quot;yellow&quot;)
}
}else{
status &lt;- c(status,&quot;red&quot;)
}
}
}

status
}

updatestatus &lt;- function(status1,status2){
mergedstatus&lt;-c()

for(i in seq(length(status1))){
if (status1[i] == &quot;green&quot; || status2[i] == &quot;green&quot;){
mergedstatus &lt;- c(mergedstatus,&quot;green&quot;)
}else if (status1[i] == &quot;yellow&quot; || status2[i] == &quot;yellow&quot;){
mergedstatus &lt;- c(mergedstatus,&quot;yellow&quot;)
}
else{
mergedstatus &lt;- c(mergedstatus,&quot;red&quot;)
}
}

mergedstatus

}

##################
# Input
##################
# Observer location
#observers&lt;-c(0,0, 6,1,1,6)

# Max visible distance
maxVisibleDistance = 8

# Generate points with a step size of 0.1
x &lt;- seq(from=-8,to=8,by=0.4)

xygrid &lt;- expand.grid(x=x,
y=x)

terrain &lt;- data.frame(xygrid,
height=height(xygrid)
)

# List of observers (x1,y1,z1,x2,y2,z2)
observers &lt;- c(runif(2,-8,8),6,runif(2,-8,8),6,
runif(2,-8,8),6,runif(2,-8,8),6,
runif(2,-8,8),6,runif(2,-8,8),6,
runif(2,-8,8),6,runif(2,-8,8),6)
m &lt;- matrix(data=observers,ncol=3,byrow=TRUE)

# Compute merged status of all observers
mergedstatus &lt;- rep(&quot;red&quot;,length(terrain$height))
for(oidx in seq(1:dim(m)[1])){
terrain$dist2observer &lt;- distance(terrain, m[oidx,])

status &lt;- LoS(terrain,m[oidx,],maxVisibleDistance)

mergedstatus &lt;- updatestatus(mergedstatus,status)
}

# Set merged status as the ultimate status
terrain &lt;- data.frame(terrain,status = mergedstatus)

rgl.open()
rgl.surface(x, x,
matrix(data=terrain$height,nrow=length(x),ncol=length(x)),
col=matrix(data=mergedstatus,nrow=length(x),ncol=length(x))
)
bg3d(&quot;gray&quot;)

# Mark all observers
for(oidx in seq(1:dim(m)[1])){
spheres3d(c(m[oidx,1]),
c(m[oidx,3]),
c(m[oidx,2]),
radius=0.25,
color=&quot;white&quot;
)
}

rgl.viewpoint(-60,30)
</pre></p>
<h1>A Few Examples</h1>
<p>Here are a few examples. All those observers are uniformly distributed over terrain using <em>runif</em> function</p>
<h3>Trivial Case: Single Observer</h3>
<div id="attachment_1162" class="wp-caption aligncenter" style="width: 727px"><a href="http://husnusensoy.files.wordpress.com/2011/09/one-observer.png"><img class="size-full wp-image-1162 " title="Trivial  Case with One Observer" src="http://husnusensoy.files.wordpress.com/2011/09/one-observer.png" alt="" width="717" height="403" /></a><p class="wp-caption-text">Trivial Case with One Observer</p></div>
<h3>Two Observers</h3>
<div id="attachment_1163" class="wp-caption aligncenter" style="width: 727px"><a href="http://husnusensoy.files.wordpress.com/2011/09/two-observers.png"><img class="size-full wp-image-1163 " title="Two Observers" src="http://husnusensoy.files.wordpress.com/2011/09/two-observers.png" alt="" width="717" height="403" /></a><p class="wp-caption-text">Two Random Observers</p></div>
<h3>Four Observers</h3>
<div id="attachment_1161" class="wp-caption aligncenter" style="width: 727px"><a href="http://husnusensoy.files.wordpress.com/2011/09/four-observers.png"><img class="size-full wp-image-1161 " title="Four Random Observers" src="http://husnusensoy.files.wordpress.com/2011/09/four-observers.png" alt="" width="717" height="403" /></a><p class="wp-caption-text">Four Random Observers</p></div>
<h3>Eight Observers</h3>
<div id="attachment_1160" class="wp-caption aligncenter" style="width: 727px"><a href="http://husnusensoy.files.wordpress.com/2011/09/eight-observers.png"><img class="size-full wp-image-1160 " title="Eight Random Observers" src="http://husnusensoy.files.wordpress.com/2011/09/eight-observers.png" alt="" width="717" height="403" /></a><p class="wp-caption-text">Eight Random Observers</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1155&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/09/16/line-of-sight-los-analysis-part-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/one-observer.png" medium="image">
			<media:title type="html">Trivial  Case with One Observer</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/two-observers.png" medium="image">
			<media:title type="html">Two Observers</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/four-observers.png" medium="image">
			<media:title type="html">Four Random Observers</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/eight-observers.png" medium="image">
			<media:title type="html">Eight Random Observers</media:title>
		</media:content>
	</item>
		<item>
		<title>Line of Sight (LoS) Analysis: 3D Terrain Analysis (Part 2)</title>
		<link>http://husnusensoy.wordpress.com/2011/09/08/line-of-sight-los-analysis-part-2/</link>
		<comments>http://husnusensoy.wordpress.com/2011/09/08/line-of-sight-los-analysis-part-2/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 22:35:55 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Spatial]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1112</guid>
		<description><![CDATA[In my previous post on LoS Analysis, I have tried to explain briefly the basics of LoS in two dimensional space. Obviously real life problems are based on three dimensional terrains although basic concepts are all the same. In this second part I will try to adapt the same techniques with a few modifications for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1112&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my <a title="Line of Sight (LoS) Analysis" href="http://husnusensoy.wordpress.com/2011/09/02/line-of-sight-los-analysis/" target="_blank">previous post on LoS Analysis</a>, I have tried to explain briefly the basics of LoS in two dimensional space. Obviously real life problems are based on three dimensional terrains although basic concepts are all the same. In this second part I will try to adapt the same techniques with a few modifications for three dimensional terrains.</p>
<h3>3D Terrain Visualization with R</h3>
<p>One of the first differences in 3D LoS analysis is the terrain visualization. We can not use <em>plot</em> function for proper visualization is 3D. Fortunately R has all packages you need for any type of problem. I will use <a title="rgl: 3D visualization device system (OpenGL)" href="http://cran.r-project.org/web/packages/rgl/index.html" target="_blank">rgl</a> package which can be downloaded using <code>install.packages("rgl")</code> command.</p>
<p>Once you have the <em>rgl</em> package, generating pseudo 3D terrains as we did for 2D is a trivial thing.</p>
<div id="attachment_1117" class="wp-caption aligncenter" style="width: 536px"><a href="http://husnusensoy.files.wordpress.com/2011/09/3dterrain.png"><img class="size-full wp-image-1117 " title="3dTerrain" src="http://husnusensoy.files.wordpress.com/2011/09/3dterrain.png" alt="" width="526" height="428" /></a><p class="wp-caption-text">3D Terrain with RGL</p></div>
<p>You can use the following R script to generate your 3D terrains like above.</p>
<p><pre class="brush: r;">
library(rgl)

# 3D Terrain Function
height &lt;- function (x,y) {
  sin(x)+0.125*y*sin(2*x)+sin(y)+0.125*x*sin(2*y)+0.25
}

# Terrain boundaries -8&lt;=x&lt;=8 and -8&lt;=y&lt;=8
boundary &lt;- c(-8,8)

# Terrain grid with a step size of 0.1 units
xy&lt;-seq(from=boundary[1],to=boundary[2],by=0.1)

# Evaluate all heights for all grid points
z&lt;-outer(xy,xy,height)

# A few visualization staff
zlim &lt;- range(z)
zlen &lt;- zlim[2] - zlim[1] + 1
colorlut &lt;- terrain.colors(zlen) # height color lookup table
col &lt;- colorlut[ z-zlim[1]+1 ] # assign colors to heights for each point

# Draw the terrain
rgl.open()
bg3d(&quot;gray&quot;)
rgl.surface(xy, xy, z,
            color=col)
</pre></p>
<p>A new function in this script is <em>outer</em> function which generates the product of a vector and a <em>row-vector</em> to have a matrix (product of a <em>row-vector</em> with a <em>vector/column-vector</em> is obviously a scalar value and named to be <em>dot/inner product</em>). The third parameter of the function provides us the mechanism to apply a given function (<em>height</em> in our case) for each element of this matrix. Obviously you can play with <em>height </em>function to have fancier 3D terrains and to have best visualization you may need <em>viewpoint</em> routine in rgl package .</p>
<h3>LoS in 3D Terrain</h3>
<p>Line of Sight analysis on 3D terrain uses the same principles as it does in 2D. Use the following R script to decide on status of a point (invisible, visible, visible but far away)</p>
<p><pre class="brush: r;">
library(rgl)
##################
# Functions
##################
# 3D Terrain Function
height &lt;- function (x,y) {
  sin(x)+0.125*y*sin(2*x)+sin(y)+0.125*x*sin(2*y)+0.25
}

# Linear Function
linear &lt;- function (x, observer, target) {
  v &lt;- observer - target

  y &lt;- ((x - observer[1])/v[1])*v[2]+observer[2]
  z &lt;- ((x - observer[1])/v[1])*v[3]+observer[3]

  data.frame(x=x,y=y, z=z)
}

# Linear Function
distance &lt;- function (p0,p1) {
  sqrt(sum((p0-p1)^2))
}

##################
# Input
##################
# Observer location
observer&lt;-c(10,10,1)

# Target on terrain
target &lt;- c(5, 5, height(5,5))

# Max visible distance
maxVisibleDistance = 4

# Generate points with a step size of 0.1
x &lt;- seq(from=min(observer[1],target[1]),
         to=max(observer[1],target[1]),
         by=0.1)

# All points on line
line &lt;- linear(x, observer, target)

# Terrain Height
h &lt;- height(line$x,line$y)

# LoS Analysis
aboveTerrain &lt;- round((line$z-h),2) &gt;= 0.1

# First Rule
visible &lt;- !is.element(FALSE,aboveTerrain)
if (visible){
  # Second Rule
  d &lt;- distance(observer, target)
  if(d &lt;= maxVisibleDistance){
    status &lt;- &quot;LoS&quot;
  }else{
    status &lt;- &quot;non-LoS due to Distance&quot;
  }
}else{
  status &lt;- &quot;non-LoS due to Blocking&quot;
}
</pre></p>
<p>Obviously there are a few changes in the script with compared to 2D version.  The first one is <em>linear</em> function(Code Lines 10-18). New version not only evaluates second (<em>y</em>) but also the third dimension (<em>z</em>). Notice that <em>z</em> is our height dimension by convention. We have also utilized <em>data.frame</em> function to concatenate all dimensions to form a table of point dimensions</p>
<p>The second difference is on <em>height</em> function (Code Lines 5-8). It is no longer a mapping from <em>x</em> to <em>y</em> but a mapping from<em> x,y</em> to <em>z.</em></p>
<p>Rest of the 3D version of script is pretty much the same or trivial to discuss more.</p>
<h3>Visualizing LoS on 3D Terrain</h3>
<p>Until this point we have analyzed LoS of a single point on 2D-3D terrains. But usually network analists wish to know LoS map of the terrain with respect to a given observer.  In other words we need to visually understand which regions on 3D terrain are visible by the <em>observer</em>, invisible by the <em>observer</em> due to blocking, or further than the limit from the <em>observer</em>.</p>
<p>Here the LoS map of our pseudo 3D terrain with respect to an observer with a given set of coordinates and maximum service range(<em>green</em> vs <em>yellow</em> regions).</p>
<div id="attachment_1131" class="wp-caption aligncenter" style="width: 594px"><a href="http://husnusensoy.files.wordpress.com/2011/09/3dterrainlos.png"><img class="size-full wp-image-1131 " title="3D LoS Analysis" src="http://husnusensoy.files.wordpress.com/2011/09/3dterrainlos.png" alt="" width="584" height="441" /></a><p class="wp-caption-text">3D LoS Analysis</p></div>
<p>You can obtain this visualization using following R script.</p>
<p><pre class="brush: r;">
library(rgl)
##################
# Functions
##################
# 3D Terrain Function
height &lt;- function (point) {
  sin(point$x)+0.125*point$y*sin(2*point$x)+sin(point$y)+0.125*point$x*sin(2*point$y)+3
}

# Linear Function
linear &lt;- function (px, observer, target) {
  v &lt;- observer - target

  y &lt;- ((px - observer[1])/v[1])*v[2]+observer[2]
  z &lt;- ((px - observer[1])/v[1])*v[3]+observer[3]

  data.frame(x=px,y=y, z=z)
}

# Linear Function
distance &lt;- function (terrain, observer) {
  sqrt((terrain$x-observer[1])^2+(terrain$y-observer[2])^2+(terrain$height-observer[3])^2)
}

LoS &lt;- function(terrain, observer, maxVisibleDistance){
  status = c()
  for (i in seq(1:nrow(terrain))) {
    if (observer[1] == terrain$x[i] &amp;&amp; observer[2] == terrain$y[i]){
      if(observer[3] &gt;= terrain$height[i]){
        if (terrain$dist2observer[i] &gt; maxVisibleDistance){
          status &lt;- c(status,&quot;yellow&quot;)
        }else{
          status &lt;- c(status,&quot;green&quot;)
        }
      }else{
        status &lt;- c(status,&quot;red&quot;)
      }
    }else{
      # All points on line
      line &lt;- linear(seq(from=min(observer[1],terrain$x[i]),
                         to=max(observer[1],terrain$x[i]),
                         by=0.1),
                     observer,
                     c(terrain$x[i],terrain$y[i],terrain$height[i]))
      # Terrain Height
      h &lt;- height(line)

      # LoS Analysis
      aboveTerrain &lt;- round((line$z-h),2) &gt;= 0.00

      visible &lt;- !is.element(FALSE,aboveTerrain)
      if (visible){
        # Second Rule
        if(terrain$dist2observer[i] &lt;= maxVisibleDistance){
          status &lt;- c(status,&quot;green&quot;)
        }else{
          status &lt;- c(status,&quot;yellow&quot;)
        }
      }else{
        status &lt;- c(status,&quot;red&quot;)
      }
    }
  }

  status
}

##################
# Input
##################
# Observer location
observer&lt;-c(0.835597146302462, -1.71025141328573, 6)

# Max visible distance
maxVisibleDistance = 8

# Generate points with a step size of 0.1
x &lt;- seq(from=-8,to=8,by=0.4)

xygrid &lt;- expand.grid(x=x,
                      y=x)

terrain &lt;- data.frame(xygrid,
                      height=height(xygrid)
                      )

terrain &lt;- data.frame(terrain,
                      dist2observer=distance(terrain, observer)
                      )

terrain &lt;- data.frame(terrain,
                      status = LoS(terrain, observer, maxVisibleDistance))

rgl.open()
rgl.surface(x, x,
            matrix(data=terrain$height,nrow=length(x),ncol=length(x)),
            col=matrix(data=terrain$status,nrow=length(x),ncol=length(x))
            )
bg3d(&quot;gray&quot;)
# Mark the observer
spheres3d(c(observer[1]),
          c(observer[3]),
          c(observer[2]),
          radius=0.5,
          color=&quot;white&quot;
          )

rgl.viewpoint(-60,30)
</pre></p>
<p>For a better visualization R allows you to implement spinning 3D terrains using <em>play3d</em> function and record it in gif format using <em>movie3d</em> function as I did below.</p>
<div id="attachment_1133" class="wp-caption aligncenter" style="width: 266px"><a href="http://husnusensoy.files.wordpress.com/2011/09/3dterrainanimated1.gif"><img class="size-full wp-image-1133 " title="3D LoS Analysis 360" src="http://husnusensoy.files.wordpress.com/2011/09/3dterrainanimated1.gif" alt="" width="256" height="256" /></a><p class="wp-caption-text">3D LoS Analysis 360</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1112&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/09/08/line-of-sight-los-analysis-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/3dterrain.png" medium="image">
			<media:title type="html">3dTerrain</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/3dterrainlos.png" medium="image">
			<media:title type="html">3D LoS Analysis</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/3dterrainanimated1.gif" medium="image">
			<media:title type="html">3D LoS Analysis 360</media:title>
		</media:content>
	</item>
		<item>
		<title>Line of Sight (LoS) Analysis: Basics (Part 1)</title>
		<link>http://husnusensoy.wordpress.com/2011/09/02/line-of-sight-los-analysis/</link>
		<comments>http://husnusensoy.wordpress.com/2011/09/02/line-of-sight-los-analysis/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 01:02:38 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Spatial]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1066</guid>
		<description><![CDATA[Introduction Line of Sight analysis is a commonly used technique in telecommunication industry for A/I (Air Interface) equipment planning and allocation. With the simplest terms LoS is the question whether a point on N-dimensional space is visible by an other observer point. The question can be used to answer where to locate a transceiver on terrain [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1066&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p><span style="font-family:Times New Roman;font-size:12pt;"><a title="LoS" href="http://en.wikipedia.org/wiki/Line_of_sight_(gaming)" target="_blank">Line of Sight</a> analysis is a commonly used technique in telecommunication industry for A/I (Air Interface) equipment planning and allocation. With the simplest terms LoS is the question whether a point on N-dimensional space is visible by an other observer point. The question can be used to answer where to locate a transceiver on terrain so that it can serve customers on some region A.<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">Before relatively more complicated problems, let&#8217;s start with an easy example focusing on two dimensional terrains. Throughout the post, we will use <a title="R Language" href="http://cran.r-project.org/doc/manuals/R-intro.html" target="_blank">R</a> </span><span class="Apple-style-span" style="font-family:'Times New Roman';font-size:16px;">for coding which is my favorite option for any mathematical problem (statistics, plotting, linear algebra, optimization, etc.). But you can easily adapt coding material to Mathlab, Python,or your favorite language.</span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">We will start by defining a mathematical function to be used to generate our pseudo terrains. For this purpose trigonometric functions (<em>sin</em>, <em>cos</em>) and polynomial functions are the best ones because of their wavy shapes. Here is an example of trigonometric terrain<br />
</span></p>
<p style="text-align:center;"><img class="aligncenter" src="http://husnusensoy.files.wordpress.com/2011/09/090211_0103_lineofsight12.png?w=562&#038;h=306" alt="" width="562" height="306" /></p>
<p style="text-align:center;"><span style="color:#4f81bd;"><strong><span style="font-size:9pt;">Figure 1 Trigonometric Terrain</span><span style="font-family:Times New Roman;font-size:12pt;"><br />
</span></strong></span></p>
<p>In order to generate this two dimensional one use the following code piece</p>
<p><pre class="brush: r;">
x &lt;- seq(from=4,to=10,by=0.01)
y &lt;- sin(x)+cos(2*x)+sin(3*x)+cos(4*x)+3

windows()
plot(x,y,'l',
      main=&quot;y=sin(x)+cos(2x)+sin(3x)+cos(4x)+3&quot;,
      ylab=&quot;height&quot;,col=&quot;blue&quot;)
</pre></p>
<div>You may choose to use a polynomial terrain also</div>
<p style="text-align:center;"><img src="http://husnusensoy.files.wordpress.com/2011/09/090211_0103_lineofsight22.png" alt="" /></p>
<p style="text-align:center;"><span style="color:#4f81bd;font-size:9pt;"><strong>Figure 2 Polynomial Terrain<br />
</strong></span></p>
<p>To obtain this terrain, use the following R script piece</p>
<p><pre class="brush: r;">
x &lt;- seq(from=0,to=6,by=0.01)
y &lt;- x*(x-1)*(x-2)*(x-3)*(x-4)*(x-5)*(x-6)+100

windows()
plot(x,y,'l',
     main=&quot;y=x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)+100&quot;,
     ylab=&quot;height&quot;,col=&quot;blue&quot;)
</pre></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">Combining polynomial terrain functions with trigonometric ones will give you fancier ones.</span></p>
<h1>What is LoS ?</h1>
<p><span class="Apple-style-span" style="font-family:'Times New Roman';font-size:16px;font-weight:normal;">You can think that we have already answered this question but this was an informal try which is not very useful for solving the problem. In order to solve this problem methodically we need to understand what makes a <em>target</em> visible (within LoS) by the <em>observer</em>.</span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">As you see on <em>Figure 3</em>, <span style="color:#00ff00;"><strong>green</strong></span> point is within line of sight of <em>observer</em> (<span style="color:#0000ff;"><strong>blue</strong></span> point). However there is pseudo hill between <span style="color:#ff0000;"><strong>red</strong></span> point and <em>observer</em>. The difference is that the line connecting <em>observer</em> and <span style="color:#00ff00;"><strong>green</strong></span> point is always greater than the terrain function whereas this is not valid for the line connecting <em>observer</em> and <span style="color:#ff0000;"><strong>red</strong></span> point (for x ε [~2.5, ~3.5] red line is under the terrain curve).<br />
</span></p>
<p style="text-align:center;"><img src="http://husnusensoy.files.wordpress.com/2011/09/090211_0103_lineofsight31.png" alt="" /></p>
<p style="text-align:center;"><span style="color:#4f81bd;font-size:9pt;"><strong>Figure 3 LoS vs non-LoS<br />
</strong></span></p>
<p>This was the first point (blocking) we should define. The second one is an easier one related with maximum Euclidean distance between <em>observer</em> and <em>target</em>. The distance between <em>observer</em> and <em>target</em> may cause a phase shift in signal if the distance is sufficiently long or depending on weather conditions and terrain properties you may observer diffraction problems (actually there might be more than those). In return this will cause signal quality issues or call drops.  On Figure 3, although <em>blocking</em> is not an issue between <em>observer</em> and  <span style="color:#ffff00;"><strong>yellow</strong></span> point, <em>target</em> is out of  visible range (say 8 units) of <em>observer</em>.</p>
<p>You can generate <em>Figure 3</em> using the following R script</p>
<p><pre class="brush: r;">
# Terrain Function
height &lt;- function (x) {
  x*x/3+sin(x)+cos(2*x)+sin(3*x)+cos(4*x)+sin(5*x)+cos(6*x)+3
}

# Observer location
observer&lt;-c(1.5,8.9)

# Generate terrain points with a tolerance of 0.1
x&lt;-seq(from=-0.1,to=6.1,by=0.1)
terrainHeight&lt;-height(x)

windows()
# Draw terrain
plot(x,terrainHeight,type='b',
     xlim=range(x),ylim=range(terrainHeight),
     main=&quot;Line of Sight (LoS)&quot;,
     ylab=&quot;Height&quot;,xlab=&quot;&quot;)

# Not LoS
points(x=c(observer[1],x[41]),
       y=c(observer[2],terrainHeight[41]),
       col=&quot;red&quot;,type='b')

# LoS
points(x=c(observer[1],x[5]),
       y=c(observer[2],terrainHeight[5]),
       col=&quot;green&quot;,type='b')

# LoS but far
points(x=c(observer[1],x[length(x)]),
       y=c(observer[2],terrainHeight[length(x)]),
       col=&quot;yellow&quot;,type='b')

# Draw Observer
points(x=c(observer[1]),
       y=c(observer[2]),
       col=&quot;blue&quot;,pch=10)
</pre></p>
<h1>Method to Decide LoS</h1>
<p>Finally let&#8217;s define a method to find all visible, invisible, and &#8220;far&#8221; points on any terrain. Since it is not &#8220;easy&#8221; to decide analytically whether the line connecting <em>observer</em> and <em>target</em> &#8220;is above&#8221; the terrain for any terrain function, we will use a simple numeric method.</p>
<p>We will define a <em>step</em> size small enough (around <em>Spatial Tolerance</em>) to generate all <em>x</em> values between <em>observer</em> and <em>target</em>. <em>seq</em> function is a good choice for doing this (Code Lines 33-36).  Evaluate these <em>x</em> values for line function connecting <em>observer</em> and <em>target </em>and terrain function. Evaluation is simple for terrain function using <em>height</em> function (Code Lines 4-7). Evaluation of line function is held by function <em>linear</em>  using parametric definition of line function (Code Lines 9-14) . Next step is to search for any <em>x</em> value having a line evaluation less than terrain evaluation (Code Line 44-28). The rest is simple as to evaluate euclidean distance and assigning values to <em>status</em> variable.</p>
<p><pre class="brush: r;">
##################
# Functions
##################
# Terrain Function
height &lt;- function (x) {
  x*x/3+sin(x)+cos(2*x)+sin(3*x)+cos(4*x)+sin(5*x)+cos(6*x)+3
}

# Linear Function
linear &lt;- function (x, observer, target) {
  v &lt;- observer - target

  ((x - observer[1])/v[1])*v[2]+observer[2]
}

# Linear Function
distance &lt;- function (p0,p1) {
  sqrt(sum((p0-p1)^2))
}

##################
# Input
##################
# Observer location
observer&lt;-c(1.5,9)

# Target on terrain
target &lt;- c(5, height(5))

# Max visible distance
maxVisibleDistance = 4

# Generate points with a step size of 0.1
x &lt;- seq(from=min(observer[1],target[1]),
         to=max(observer[1],target[1]),
         by=0.1)

# Terrain Height
h &lt;- height(x)

# y Values
y &lt;- linear(x, observer, target)

# LoS Analysis
aboveTerrain &lt;- round((y-h),2) &gt;= 0.00

# First Rule
visible &lt;- !is.element(FALSE,aboveTerrain)
if (visible){
  # Second Rule
  d &lt;- distance(observer, target)
  if(d &lt;= maxVisibleDistance){
    status &lt;- &quot;LoS&quot;
  }else{
    status &lt;- &quot;non-LoS due to Distance&quot;
  }
}else{
  status &lt;- &quot;non-LoS due to Blocking&quot;
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1066/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1066/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1066/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1066/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1066/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1066/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1066/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1066&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/09/02/line-of-sight-los-analysis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/090211_0103_lineofsight12.png" medium="image" />

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/090211_0103_lineofsight22.png" medium="image" />

		<media:content url="http://husnusensoy.files.wordpress.com/2011/09/090211_0103_lineofsight31.png" medium="image" />
	</item>
		<item>
		<title>Book Review: Oracle Warehouse Builder 11gR2: Getting Started 2011</title>
		<link>http://husnusensoy.wordpress.com/2011/08/16/book-review-oracle-warehouse-builder-11gr2-getting-started-2011/</link>
		<comments>http://husnusensoy.wordpress.com/2011/08/16/book-review-oracle-warehouse-builder-11gr2-getting-started-2011/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 06:07:36 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[11g Release 2]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[owb]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1055</guid>
		<description><![CDATA[As being the embedded option of Oracle relational database engine, OWB is still my favourite ETL (or to correct ELT) tool. In addition, although Oracle positions ODI as their strategic tool for this purpose, they still keep investing on OWB  at least in 11g Release 2. I have recently had the chance to review a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1055&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A<a href="http://husnusensoy.files.wordpress.com/2011/08/oracle-warehouse-builder-11g-r2-getting-started.png"><img class="alignleft size-full wp-image-1056" title="Oracle Warehouse Builder 11g R2 Getting Started" src="http://husnusensoy.files.wordpress.com/2011/08/oracle-warehouse-builder-11g-r2-getting-started.png" alt="" width="192" height="233" /></a>s being the embedded option of Oracle relational database engine, OWB is still my favourite ETL (or to correct ELT) tool. In addition, although Oracle positions ODI as their strategic tool for this purpose, they still keep investing on OWB  at least in 11g Release 2.</p>
<p>I have recently had the chance to review a new book by <a title="Packt Publishing" href="http://www.packtpub.com" target="_blank">Packt Publishing</a>, namely <a title="Book Link" href="https://www.packtpub.com/oracle-warehouse-builder-11g-r2/book" target="_blank">Oracle Warehouse Builder 11gR2: Getting Started 2011</a>. Book is  a good introductory book for newbies willingness to learn more on OWB by playing with it in a playground.</p>
<p>Book is organised to let you build your own OWB environment and work on a toy problem namely ACME Toy and Gizmos. You design and create your source and target structures and implement you ELT.</p>
<p>The book will help those who wish to learn more on OWB and look for a practical guide.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1055/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1055/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1055/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1055/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1055/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1055/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1055/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1055/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1055&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/08/16/book-review-oracle-warehouse-builder-11gr2-getting-started-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/08/oracle-warehouse-builder-11g-r2-getting-started.png" medium="image">
			<media:title type="html">Oracle Warehouse Builder 11g R2 Getting Started</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: Oracle GoldenGate 11g Implementer&#8217;s Guide</title>
		<link>http://husnusensoy.wordpress.com/2011/05/15/book-review-oracle-goldengate-11g-implementers-guide-2/</link>
		<comments>http://husnusensoy.wordpress.com/2011/05/15/book-review-oracle-goldengate-11g-implementers-guide-2/#comments</comments>
		<pubDate>Sun, 15 May 2011 19:48:39 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[CDC]]></category>
		<category><![CDATA[goldengate]]></category>

		<guid isPermaLink="false">https://husnusensoy.wordpress.com/?p=1041</guid>
		<description><![CDATA[As being a consultant in VLDB domain, one of the most popular questions of today is “How can I feed my data warehouse/reporting environment in real-time?” Yet another one is “How can I offload my reporting activity over my OTP environment without generating any time gap between reality and what is being reported?” In addition, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1041&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/Oracle-GoldenGate-11g-Implementers-guide/dp/1849682003/ref=pd_sim_b_5"><img class="alignleft" style="display:inline;border-color:initial;border-style:initial;border-width:0;margin:0 10px 0 0;" title="goldengate" src="http://husnusensoy.files.wordpress.com/2011/05/goldengate_thumb.png?w=221&#038;h=244" alt="goldengate" width="221" height="244" align="left" border="0" /></a></p>
<p>As being a consultant in VLDB domain, one of the most popular questions of today is “How can I feed my data warehouse/reporting environment in real-time?” Yet another one is “How can I offload my reporting activity over my OTP environment without generating any time gap between reality and what is being reported?” In addition, I am a bit depressed to see people taking CDC (Change Data Capture) products as DR (Disaster Recovery) solutions.</p>
<p>It was two years ago in ACED briefing when Thomas Kurain declared that GoldenGate is Oracle’s strategic real-time integration solution. After that, I have spent quite a few time to understand merits and drawbacks of this product. I have talked customers want to use it, already using it, and suffering it. Almost all sites annoyed with the same problems</p>
<ul>
<li>It is very hard to configure GoldenGate</li>
<li>It is very hard to monitor&amp;manage GoldenGate</li>
<li>Oracle documentation is still not sufficient for them.</li>
</ul>
<p>To be honest it is hard to say that they are wrong.</p>
<p>Last week I have read John P. Jeffries’s <a title="Amazon" href="http://www.amazon.com/Oracle-GoldenGate-11g-Implementers-guide/dp/1849682003/ref=pd_sim_b_5">Oracle GoldenGate 11g Implementer’s Guide</a> and I can easily say that it is a nice piece of material built just to make reader a successful GoldenGate implementer. There is no dictionary-based definition of GoldenGate concepts like Extract, Trail File, Data Pump, etc. as it is in Oracle formal documentations. The book is structured in “Let me show what I define above” fashion. The book is full of details to show you the way of implementing up and running GoldenGate systems. However, I will continue to write on my favorite sections.</p>
<p><em>Chapter 6: Configuring Golden Gate for HA</em> is on how to configure GoldenGate on a RAC database. Chapter covers to integrate GoldenGate with clusterware software to enable automatic failover. I have seen customer sites still writing custom scripts for this. Therefore, this chapter is a good how to for RAC implementers.</p>
<p><em>Chapter 8: Managing Oracle GoldenGate</em> is a chapter mainly about reporting performance metrics and errors of functional GoldenGate systems. Chapter explains to report your GoldenGate errors, latency, and throughput and interpret them.</p>
<p><em>Chapter 9: Performance Tuning</em> is on tuning GoldenGate using parallel extracts and replicates and tuning GoldenGate storage and network for best performance.</p>
<p>To sum up, if you are a newbie in GoldenGate but responsible with implementing a new GoldenGate environment or maintaining an existing one, this book might be a good resource for you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1041/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1041/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1041/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1041&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/05/15/book-review-oracle-goldengate-11g-implementers-guide-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/05/goldengate_thumb.png" medium="image">
			<media:title type="html">goldengate</media:title>
		</media:content>
	</item>
		<item>
		<title>An English Man in Istanbul</title>
		<link>http://husnusensoy.wordpress.com/2011/05/01/an-english-man-in-istanbul/</link>
		<comments>http://husnusensoy.wordpress.com/2011/05/01/an-english-man-in-istanbul/#comments</comments>
		<pubDate>Sun, 01 May 2011 20:33:21 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[troug]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1031</guid>
		<description><![CDATA[A gentle man&#8230; An Oracle expert &#8230; An esteemed community figure&#8230; Yes. As the reader of this Oracle focused blog, you should figure out about whom I am talking. Last week (on Thursday), we have achieved to set first Turkey Oracle User Group (TROUG) Day at Bahcesehir University. We have just discussed on the keynote [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1031&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A gentle man&#8230; An Oracle expert &#8230; An esteemed community figure&#8230;<br />
Yes. As the reader of this Oracle focused blog, you should figure out about whom I am talking. Last week (on Thursday), we have achieved to set first Turkey Oracle User Group (TROUG) Day at Bahcesehir University.</p>
<p>We have just discussed on the keynote speaker as the Turkish community members and agreed on one name: <strong>Jonathan Lewis</strong><br />
The problem was that as being such a popular figure in community, it was almost impossible to find a proper gap for our event in Jonathan’s schedule. As I have sent the invitation to him and asked for his attendance on one Sunday afternoon, Jonathan just replied that he would be with us and perform the keynote speech. Almost a month after our mailing, Jonathan was on stage at Bahcesehir University auditorium as our keynote speaker talking <em>&#8220;just about joining two tables&#8221;</em>.<br />
It was amazing that we have finally achieved with this user group day and the man whose books are my Oracle library&#8217;s masterpiece was on stage.<br />
Thank you Jonathan personally and as the founding member of TROUG for honoring us and hope to see you soon again…</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1031/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1031/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1031/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1031/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1031/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1031/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1031/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1031/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1031&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/05/01/an-english-man-in-istanbul/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>
	</item>
		<item>
		<title>The First Oracle Exadata Certified Implementation Specialist of Turkey</title>
		<link>http://husnusensoy.wordpress.com/2011/03/20/the-first-oracle-exadata-certified-implementation-specialist-of-turkey/</link>
		<comments>http://husnusensoy.wordpress.com/2011/03/20/the-first-oracle-exadata-certified-implementation-specialist-of-turkey/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 16:14:46 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[Exadata]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=1024</guid>
		<description><![CDATA[After migrating more than 120 TB of data on Exadata v2 and delivering 4 Exadata Handson Courses in Europe (Germany, Russia, and Belgium), last week my friend Zekeriya Besiroglu told me that they have recently opened up an Exadata certification exam. I have taken the exam last week and pass with 93% score. Just to guide [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1024&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://husnusensoy.files.wordpress.com/2011/03/o_certified-specialist_clr.gif"><img class="alignleft size-full wp-image-1025" title="O_Certified Specialist_clr" src="http://husnusensoy.files.wordpress.com/2011/03/o_certified-specialist_clr.gif" alt="" width="127" height="69" /></a>After migrating more than 120 TB of data on Exadata v2 and delivering 4 Exadata Handson Courses in Europe (Germany, Russia, and Belgium), last week my friend <a title="Zekeriya Besiroglu" href="http://zekeriyabesiroglu.blogspot.com/">Zekeriya Besiroglu</a> told me that they have recently opened up an Exadata certification exam. I have taken the exam last week and pass with 93% score.</p>
<p>Just to guide you guys who will take this exam, it seems that <em>I/O Resource Manager</em> is the most important topic of the exam although this is not true for Exadata customers in my region <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/1024/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/1024/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/1024/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/1024/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/1024/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/1024/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/1024/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/1024/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=1024&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2011/03/20/the-first-oracle-exadata-certified-implementation-specialist-of-turkey/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2011/03/o_certified-specialist_clr.gif" medium="image">
			<media:title type="html">O_Certified Specialist_clr</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Your Own Oracle TPC-H Playground on Linux</title>
		<link>http://husnusensoy.wordpress.com/2010/10/22/create-your-own-oracle-tpc-h-playground-on-linux/</link>
		<comments>http://husnusensoy.wordpress.com/2010/10/22/create-your-own-oracle-tpc-h-playground-on-linux/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 17:48:02 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[external tables]]></category>
		<category><![CDATA[tpc-h]]></category>

		<guid isPermaLink="false">https://husnusensoy.wordpress.com/?p=927</guid>
		<description><![CDATA[I believe sometimes all of us suffer from the limitations of playing with Oracle&#8217;s SH, SCOTT, etc. schemas to generate a sufficiently large playground for our tests. In this post you will find how to create your own TPC-H playground database on Linux. Download TPC-H Data Generator (dbgen) TPC as being the council for TPC-H [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=927&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I believe sometimes all of us suffer from the limitations of playing with Oracle&#8217;s SH, SCOTT, etc. schemas to generate a sufficiently large playground for our tests. In this post you will find how to create your own TPC-H playground database on Linux.</p>
<h3>Download TPC-H Data Generator (dbgen)</h3>
<p>TPC as being the council for TPC-H benchmarks delivers a standardized data generation tool for all benchmarks. You can download this tool from <a href="http://www.tpc.org/tpch/default.asp">http://www.tpc.org/tpch/default.asp</a> (The version I will be using can be downloaded from <a title="http://www.tpc.org/tpch/spec/tpch_2_12_0_b5.zip" href="http://www.tpc.org/tpch/spec/tpch_2_12_0_b5.zip">http://www.tpc.org/tpch/spec/tpch_2_12_0_b5.zip</a>). This bundle contains a bunch of <em>C</em> files to be compiled to form <em>dbgen</em>. Copy the zip file into one of your folders and ensure that your Linux environment has the necessary toolkit to compile <em>C </em>language (gcc, make, etc.)</p>
<p><pre class="brush: bash;">
[oracle@localhost ~]$ mkdir tpch
[oracle@localhost ~]$ mv tpch_2_12_0_b5.zip ./tpch
[oracle@localhost ~]$ cd tpch/
[oracle@localhost tpch]$ unzip tpch_2_12_0_b5.zip
	Archive: tpch_2_12_0_b5.zip
	inflating: build.c
	inflating: driver.c
	inflating: bm_utils.c
	inflating: rnd.c
...
[oracle@localhost tpch]$
</pre></p>
<h3>Build DBGEN</h3>
<p>Next thing you should do is to <em>cp</em> <em>makefile.suite</em> file in <em>tpch </em>directory and  change some parameters in copied file.</p>
<ul>
<li>CC</li>
<li>DATABASE</li>
<li>MACHINE</li>
<li>WORKLOAD</li>
</ul>
<p><pre class="brush: bash;">
[oracle@localhost tpch]$ cp makefile.suite makefile

[oracle@localhost tpch]$ vi make
...
################
## CHANGE NAME OF ANSI COMPILER HERE
################
CC      = gcc
# Current values for DATABASE are: INFORMIX, DB2, TDAT (Teradata)
#                                  SQLSERVER, SYBASE, ORACLE
# Current values for MACHINE are:  ATT, DOS, HP, IBM, ICL, MVS,
#                                  SGI, SUN, U2200, VMS, LINUX, WIN32
# Current values for WORKLOAD are:  TPCH
DATABASE= ORACLE
MACHINE = LINUX
WORKLOAD = TPCH
...
</pre></p>
<p>Now run <em>make </em>command</p>
<p><pre class="brush: bash;">
[oracle@localhost tpch]$ make
chmod 755 update_release.sh
./update_release.sh 2 12 0
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o build.o build.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o driver.o driver.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o bm_utils.o bm_utils.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o rnd.o rnd.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o print.o print.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o load_stub.o load_stub.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o bcd2.o bcd2.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o speed_seed.o speed_seed.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o text.o text.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o permute.o permute.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o rng64.o rng64.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -O -o dbgen build.o driver.o bm_utils.o rnd.o print.o load_stub.o bcd2.o speed_seed.o text.o permute.o rng64.o -lm
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o qgen.o qgen.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -c -o varsub.o varsub.c
gcc -g -DDBNAME=\&quot;dss\&quot; -DLINUX -DORACLE -DTPCH -DRNG_TEST -D_FILE_OFFSET_BITS=64 -O -o qgen build.o bm_utils.o qgen.o rnd.o varsub.o text.o bcd2.o permute.o speed_seed.o rng64.o -lm
</pre></p>
<p>After a successful compilation you should have <em>dbgen </em>executable in your current working director:</p>
<p><pre class="brush: bash;">
[oracle@localhost tpch]$ ./dbgen -h
TPC-H Population Generator (Version 2.12.0 build 5)
Copyright Transaction Processing Performance Council 1994 - 2010
USAGE:
dbgen [-{vf}][-T {pcsoPSOL}]
[-s &lt;scale&gt;][-C &lt;procs&gt;][-S &lt;step&gt;]
dbgen [-v] [-O m] [-s &lt;scale&gt;] [-U &lt;updates&gt;]

Basic Options
===========================
-C &lt;n&gt; -- separate data set into &lt;n&gt; chunks (requires -S, default: 1)
-f     -- force. Overwrite existing files
-h     -- display this message
-q     -- enable QUIET mode
-s &lt;n&gt; -- set Scale Factor (SF) to  &lt;n&gt; (default: 1)
-S &lt;n&gt; -- build the &lt;n&gt;th step of the data/update set (used with -C or -U)
-U &lt;n&gt; -- generate &lt;n&gt; update sets
-v     -- enable VERBOSE mode

Advanced Options
===========================
-b &lt;s&gt; -- load distributions for &lt;s&gt; (default: dists.dss)
-d &lt;n&gt; -- split deletes between &lt;n&gt; files (requires -U)
-i &lt;n&gt; -- split inserts between &lt;n&gt; files (requires -U)
-T c   -- generate cutomers ONLY
-T l   -- generate nation/region ONLY
-T L   -- generate lineitem ONLY
-T n   -- generate nation ONLY
-T o   -- generate orders/lineitem ONLY
-T O   -- generate orders ONLY
-T p   -- generate parts/partsupp ONLY
-T P   -- generate parts ONLY
-T r   -- generate region ONLY
-T s   -- generate suppliers ONLY
-T S   -- generate partsupp ONLY

To generate the SF=1 (1GB), validation database population, use:
       dbgen -vf -s 1

To generate updates for a SF=1 (1GB), use:
       dbgen -v -U 1 -s 1
</pre></p>
<h3>Generate Your Playgroun Data</h3>
<p>Now you are ready to create your playground database. For those of you who are not familiar with TPC-H model, refer to below Relational Model to have an idea of what it looks like.</p>
<div id="attachment_929" class="wp-caption aligncenter" style="width: 760px"><a href="http://husnusensoy.files.wordpress.com/2010/10/tpch1.png"><img class="size-full wp-image-929 " title="tpch.png" src="http://husnusensoy.files.wordpress.com/2010/10/tpch1.png" alt="" width="750" height="720" /></a><p class="wp-caption-text">TPC-H Data Model</p></div>
<p>Use <em>dbgen </em>to generate a 4G of TPC-H benchmark data. In order to be able to load generated files in parallel by using Oracle External tables, we will be using file split feature of <em>dbgen </em>(Remember that this step might take some time and can be parallelized depending on your CPU &amp; I/O capacity):</p>
<p><pre class="brush: bash; highlight: [1,13,27];">
[oracle@localhost tpch]$ ./dbgen -s 4 -S 1 -C 8 -v
TPC-H Population Generator (Version 2.12.0)
Copyright Transaction Processing Performance Council 1994 – 2010
Starting to load stage 1 of 8 for suppliers table…/
Preloading text … 100%
done.
Starting to load stage 1 of 8 for customers table…done.
Starting to load stage 1 of 8 for orders/lineitem tables…done.
Starting to load stage 1 of 8 for part/partsupplier tables…done.
Generating data for nation tabledone.
Generating data for region tabledone.

[oracle@localhost tpch]$ ./dbgen -s 4 -S 2 -C 8 -v
TPC-H Population Generator (Version 2.12.0)
Copyright Transaction Processing Performance Council 1994 – 2010
Starting to load stage 2 of 8 for suppliers table…/
Preloading text … 100%
done.
Starting to load stage 2 of 8 for customers table…done.
Starting to load stage 2 of 8 for orders/lineitem tables…done.
Starting to load stage 2 of 8 for part/partsupplier tables…done.
Generating data for nation tableDo you want to overwrite ./nation.tbl ? [Y/N]: y
done.
Generating data for region tableDo you want to overwrite ./region.tbl ? [Y/N]: y
done.

[oracle@localhost tpch]$ ./dbgen -s 4 -S 8 -C 8 -v
TPC-H Population Generator (Version 2.12.0)
Copyright Transaction Processing Performance Council 1994 – 2010
Starting to load stage 8 of 8 for suppliers table…/
Preloading text … 100%
done.
Starting to load stage 8 of 8 for customers table…done.
Starting to load stage 8 of 8 for orders/lineitem tables…done.
Starting to load stage 8 of 8 for part/partsupplier tables…done.
Generating data for nation tableDo you want to overwrite ./nation.tbl ? [Y/N]: y
done.
Generating data for region tableDo you want to overwrite ./region.tbl ? [Y/N]: y
done.
</pre></p>
<p>When you are done with all 8 executions you will have <em>*tbl*</em> files in your current working directory. Those are pipe separated files which you will be loading into your database.</p>
<h4>DBGEN Options</h4>
<p><em>–s 4</em> specifies that we are using a scale factor of 4 meaning that we are generating approximately 4GB of benchmark data. <em>–S 1 </em>instructs <em>dbgen</em> to generate first of 8 chunks. <em>–C 8 </em>is the total number of files for each large dataset (excluding <em>nation</em> and <em>region</em> tables). <em>–v</em> is setting the verbosity for <em>dbgen</em>.</p>
<h3>DBGEN Output</h3>
<p>In total you will see that all *<em>tbl* </em>files will be approximately 4 GB in size.</p>
<p><pre class="brush: bash;">
[oracle@localhost tpch]$ du -ch *.tbl* | tail -1
4.2G       total
</pre></p>
<p>A good idea is to compress all those files with <em>gzip</em> so that they will consume minimum disk space and optimize read I/O in case of CPU power abundance.</p>
<p><pre class="brush: bash;">
[oracle@localhost tpch]$ gzip -4 -v *.tbl*
customer.tbl.1:     61.4% -- replaced with customer.tbl.1.gz
customer.tbl.2:     61.6% -- replaced with customer.tbl.2.gz
customer.tbl.3:     61.6% -- replaced with customer.tbl.3.gz
…

[oracle@localhost tpch]$ du -hc *.tbl.* | tail -1
1.3G    total
</pre></p>
<p>As you see above I have achieved more than 1:3 compression ratio for all external files on the average.</p>
<h3>Create Database Objects &amp; Load External Files</h3>
<p>Follow the guide lines for creating permanent and auxiliary database objects.</p>
<ol>
<li>Create a TPCH user and give necessary grant to it.</li>
<li> Create an Oracle DIRECTORY (<em>TPCH_DIR</em>) object to point the directory that contains your <em>*.tbl*.gz</em> files.</li>
<li>Create the External tables that you will be using as a read source for your load process
<ul>
<li>See that for the sake of simplicity I have used VARCHAR2 column for DATE columns those will be casted to DATE type during load operation.</li>
<li>Use inline gzip decompression with PREPROCESSOR option.</li>
<li>Create your external tables with proper parallelism to read external files concurrently.</li>
<li>Remember to use APPEND hint for INSERT … SELECT statements.</li>
<li>Don&#8217;t create PK&amp;FK constraints so that you can load in parallel.</li>
</ul>
</li>
<li>Load your data from auxiliary External tables to your permanent heap tables.</li>
<li>Create all necessary constraints on your permanent tables.</li>
<li>Gather a schema statistics to guide CBO correctly.</li>
</ol>
<h4>Start with Auxiliary Loading Objects</h4>
<p>We will start by creating <em>TPCH</em> user and <em>TPCH_DIR</em> directory</p>
<p><pre class="brush: sql;">
create tablespace tpch_ts datafile size 100m autoextend on next 100m nologging;

create user tpch identified by tpch temporary tablespace temp default tablespace tpch_ts ;

grant connect,resource to tpch;

grant create any directory to tpch;

conn tpch/tpch

create directory tpch_dir as '/home/oracle/tpch';

create directory zcat_dir as '/bin';
</pre></p>
<p>Now create your external tables and ensure that all works perfectly:</p>
<p><pre class="brush: sql;">
set timing on

spool load_object.log

drop table region_ext;
drop table nation_ext;
drop table supplier_ext;
drop table customer_ext;
drop table order_ext;
drop table part_ext;
drop table partsupp_ext;
drop table lineitem_ext;

CREATE TABLE region_ext (r_regionkey  NUMBER(10),
                         r_name varchar2(25),
                         r_comment varchar(152))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
       LOCATION ('region.tbl.gz'))
NOPARALLEL
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE nation_ext (n_nationkey  NUMBER(10),
                         n_name varchar2(25),
                         n_regionkey number(10),
                         n_comment varchar(152))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
       LOCATION ('nation.tbl.gz'))
NOPARALLEL
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE supplier_ext (S_SUPPKEY NUMBER(10),
                           S_NAME VARCHAR2(25),
                           S_ADDRESS VARCHAR2(40),
                           S_NATIONKEY NUMBER(10),
                           S_PHONE VARCHAR2(15),
                           S_ACCTBAL NUMBER,
                           S_COMMENT VARCHAR2(101))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
LOCATION ('supplier.tbl.1.gz','supplier.tbl.2.gz','supplier.tbl.3.gz','supplier.tbl.4.gz',
          'supplier.tbl.5.gz','supplier.tbl.6.gz','supplier.tbl.7.gz','supplier.tbl.8.gz') )
PARALLEL 2
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE customer_ext (C_CUSTKEY NUMBER(10),
                           C_NAME VARCHAR2(25),
                           C_ADDRESS VARCHAR2(40),
                           C_NATIONKEY NUMBER(10),
                           C_PHONE VARCHAR2(15),
                           C_ACCTBAL NUMBER,
                           C_MKTSEGMENT VARCHAR2(10),
                           C_COMMENT VARCHAR2(117))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
LOCATION ('customer.tbl.1.gz','customer.tbl.2.gz','customer.tbl.3.gz','customer.tbl.4.gz',
          'customer.tbl.5.gz','customer.tbl.6.gz','customer.tbl.7.gz','customer.tbl.8.gz') )
PARALLEL 2
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE order_ext (O_ORDERKEY NUMBER(10),
                        O_CUSTKEY NUMBER(10),
                        O_ORDERSTATUS CHAR(1),
                        O_TOTALPRICE NUMBER,
                        O_ORDERDATE VARCHAR2(10),
                        O_ORDERPRIORITY VARCHAR2(15),
                        O_CLERK VARCHAR2(15),
                        O_SHIPPRIORITY NUMBER(38),
                        O_COMMENT VARCHAR2(79))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
LOCATION ('orders.tbl.1.gz','orders.tbl.2.gz','orders.tbl.3.gz','orders.tbl.4.gz',
          'orders.tbl.5.gz','orders.tbl.6.gz','orders.tbl.7.gz','orders.tbl.8.gz'))
PARALLEL 2
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE part_ext (P_PARTKEY NUMBER(10),
                       P_NAME VARCHAR2(55),
                       P_MFGR VARCHAR2(25),
                       P_BRAND VARCHAR2(10),
                       P_TYPE VARCHAR2(25),
                       P_SIZE NUMBER(38),
                       P_CONTAINER VARCHAR2(10),
                       P_RETAILPRICE NUMBER,
                       P_COMMENT VARCHAR2(23))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
LOCATION ('part.tbl.1.gz','part.tbl.2.gz','part.tbl.3.gz','part.tbl.4.gz',
          'part.tbl.5.gz','part.tbl.6.gz','part.tbl.7.gz','part.tbl.8.gz') )
PARALLEL 2
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE partsupp_ext (PS_PARTKEY NUMBER(10),
                           PS_SUPPKEY NUMBER(10),
                           PS_AVAILQTY NUMBER(38),
                           PS_SUPPLYCOST NUMBER,
                           PS_COMMENT VARCHAR2(199))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
LOCATION ('partsupp.tbl.1.gz','partsupp.tbl.2.gz','partsupp.tbl.3.gz','partsupp.tbl.4.gz',
          'partsupp.tbl.5.gz','partsupp.tbl.6.gz','partsupp.tbl.7.gz','partsupp.tbl.8.gz'))
PARALLEL 2
REJECT LIMIT 0
NOMONITORING;

CREATE TABLE lineitem_ext (L_ORDERKEY  NUMBER(10),
                           L_PARTKEY NUMBER(10),
                           L_SUPPKEY NUMBER(10),
                           L_LINENUMBER  NUMBER(38),
                           L_QUANTITY NUMBER,
                           L_EXTENDEDPRICE   NUMBER,
                           L_DISCOUNT NUMBER,
                           L_TAX  NUMBER,
                           L_RETURNFLAG  CHAR(1),
                           L_LINESTATUS CHAR(1),
                           L_SHIPDATE  VARCHAR2(10),
                           L_COMMITDATE VARCHAR2(10),
                           L_RECEIPTDATE  VARCHAR2(10),
                           L_SHIPINSTRUCT  VARCHAR2(25),
                           L_SHIPMODE VARCHAR2(10),
                           L_COMMENT VARCHAR2(44))
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY tpch_dir
ACCESS PARAMETERS (
       RECORDS DELIMITED BY NEWLINE
       PREPROCESSOR zcat_dir:'zcat'
       BADFILE 'bad_%a_%p.bad'
       LOGFILE 'log_%a_%p.log'
       FIELDS TERMINATED BY '|'
       MISSING FIELD VALUES ARE NULL)
LOCATION ('lineitem.tbl.1.gz','lineitem.tbl.2.gz','lineitem.tbl.3.gz','lineitem.tbl.4.gz',
          'lineitem.tbl.5.gz','lineitem.tbl.6.gz','lineitem.tbl.7.gz','lineitem.tbl.8.gz'))
PARALLEL 2
REJECT LIMIT 0
NOMONITORING;

-- Count all
-- 5 rows
select count(*) region_count from region_ext;
-- 25 rows
select count(*) nation_count from nation_ext;
-- 40000 rows
select  count(*) supplier_count from supplier_ext;
-- 600000 rows
select count(*) customer_count from customer_ext;
-- 6000000 rows
select count(*) order_count from order_ext;
-- 800000 rows
select count(*) part_count from part_ext;
-- 3200000 rows
select count(*) partsupp_count from partsupp_ext;
--23996604 rows
select count(*) lineitem_count from lineitem_ext;

spool off
</pre></p>
<h4>Continue with Persistent Ones</h4>
<p><span style="font-weight:normal;font-size:13px;">Next step is to create your persistent objects  (heap tables) without PK and FK constraints on them. </span></p>
<p><pre class="brush: sql;">
set timing on
spool heap_objects.log
DROP TABLE H_CUSTOMER CASCADE CONSTRAINTS ;
DROP TABLE H_LINEITEM CASCADE CONSTRAINTS ;
DROP TABLE H_NATION CASCADE CONSTRAINTS ;
DROP TABLE H_ORDER CASCADE CONSTRAINTS ;
DROP TABLE H_PART CASCADE CONSTRAINTS ;
DROP TABLE H_PARTSUPP CASCADE CONSTRAINTS ;
DROP TABLE H_REGION CASCADE CONSTRAINTS ;
DROP TABLE H_SUPPLIER CASCADE CONSTRAINTS ;

CREATE TABLE H_CUSTOMER (c_custkey NUMBER(10) NOT NULL,
                         c_name VARCHAR2(25) NOT NULL,
                         c_address VARCHAR2(40) NOT NULL,
                         c_nationkey NUMBER(10) NOT NULL ,
                         c_phone VARCHAR2(15) NOT NULL,
                         c_acctbal NUMBER NOT NULL,
                         c_mktsegment VARCHAR2(10) NOT NULL,
                         c_comment VARCHAR2(117) NOT NULL)
PARALLEL 2;

CREATE TABLE H_LINEITEM (l_orderkey NUMBER(10) NOT NULL,
                         l_partkey NUMBER(10) NOT NULL,
                         l_suppkey NUMBER(10) NOT NULL ,
                         l_linenumber INTEGER  NOT NULL ,
                         l_quantity NUMBER NOT NULL,
                         l_extendedprice NUMBER NOT NULL,
                         l_discount NUMBER NOT NULL,
                         l_tax NUMBER NOT NULL,
                         l_returnflag CHAR(1) NOT NULL ,
                         l_linestatus CHAR(1) NOT NULL,
                         l_shipdate DATE NOT NULL,
                         l_commitdate DATE NOT NULL,
                         l_receiptdate DATE NOT NULL,
                         l_shipinstruct VARCHAR2(25) NOT NULL,
                         l_shipmode VARCHAR2(10) NOT NULL,
                         l_comment VARCHAR2(44) NOT NULL)
PARALLEL 2;

CREATE TABLE H_NATION (n_nationkey NUMBER(10) NOT NULL,
                       n_name VARCHAR2(25) NOT NULL,
                       n_regionkey NUMBER (10) NOT NULL,
                       n_comment VARCHAR2 (152) NOT NULL)
NOPARALLEL;

CREATE TABLE H_ORDER (o_orderkey NUMBER (10)  NOT NULL,
                      o_custkey NUMBER(10)  NOT NULL,
                      o_orderstatus CHAR(1) NOT NULL,
                      o_totalprice NUMBER NOT NULL,
                      o_orderdate DATE NOT NULL,
                      o_orderpriority VARCHAR2(15) NOT NULL,
                      o_clerk VARCHAR2(15) NOT NULL,
                      o_shippriority INTEGER NOT NULL,
                      o_comment VARCHAR2(79) NOT NULL)
PARALLEL 2;

CREATE TABLE H_PART (p_partkey NUMBER(10)  NOT NULL,
                     p_name VARCHAR2(55) NOT NULL,
                     p_mfgr VARCHAR2(25) NOT NULL,
                     p_brand VARCHAR2(10) NOT NULL,
                     p_type VARCHAR2(25) NOT NULL,
                     p_size INTEGER NOT NULL,
                     p_container VARCHAR2(10) NOT NULL,
                     p_retailprice NUMBER NOT NULL,
                     p_comment VARCHAR2(23) NOT NULL)
PARALLEL 2;
CREATE TABLE H_PARTSUPP (ps_partkey NUMBER (10)  NOT NULL ,
                         ps_suppkey NUMBER (10)  NOT NULL ,
                         ps_availqty INTEGER NOT NULL,
                         ps_supplycost NUMBER NOT NULL,
                         ps_comment VARCHAR2 (199) NOT NULL)
PARALLEL 2;

CREATE TABLE H_REGION (r_regionkey NUMBER (10)  NOT NULL ,
                       r_name VARCHAR2 (25) NOT NULL,
                       r_comment VARCHAR2 (152) NOT NULL)
NOPARALLEL;

CREATE TABLE H_SUPPLIER (s_suppkey NUMBER (10)  NOT NULL ,
                         s_name VARCHAR2 (25) NOT NULL,
                         s_address VARCHAR2 (40) NOT NULL,
                         s_nationkey NUMBER (10)  NOT NULL ,
                         s_phone VARCHAR2 (15) NOT NULL,
                         s_acctbal NUMBER NOT NULL,
                         s_comment VARCHAR2 (101) NOT NULL)
PARALLEL 2;

spool off
</pre></p>
<h4>Load your Data using INSERT &#8230; SELECT</h4>
<p>Now load your data using INSERT &#8230; SELECT statements in parallel from external tables to your heap tables</p>
<p><pre class="brush: sql;">
set timing on
spool load_data.log

truncate table h_lineitem;
truncate table h_order;
truncate table h_part;
truncate table h_customer;
truncate table h_nation;
truncate table h_region;
truncate table h_partsupp;
truncate table h_supplier;
alter session enable parallel dml;
insert /*+append*/into h_lineitem
select L_ORDERKEY,
       L_PARTKEY,
       L_SUPPKEY,
       L_LINENUMBER,
       L_QUANTITY,
       L_EXTENDEDPRICE,
       L_DISCOUNT,
       L_TAX,
       L_RETURNFLAG,
       L_LINESTATUS,
       to_date(L_SHIPDATE, 'YYYY-MM-DD'),
       to_date(L_COMMITDATE, 'YYYY-MM-DD'),
       to_date(L_RECEIPTDATE, 'YYYY-MM-DD'),
       L_SHIPINSTRUCT,
       L_SHIPMODE,
       L_COMMENT
from lineitem_ext;
insert /*+append*/ into h_partsupp  select * from partsupp_ext;
insert /*+append*/ into h_part  select * from part_ext;
insert /*+append*/ into h_order
select o_orderkey,
       o_custkey,
       o_orderstatus,
       o_totalprice,
       to_date(o_orderdate, 'YYYY-MM-DD'),
       O_ORDERPRIORITY,
       o_clerk,
       O_SHIPPRIORITY,
       o_comment
from order_ext;
insert /*+append*/ into h_customer  select * from customer_ext;
insert /*+append*/ into h_supplier  select * from supplier_ext;
insert  /*+append*/ into h_nation  select * from nation_ext;
insert /*+append*/ into h_region  select * from region_ext;
commit;
spool off
</pre></p>
<h4>Build you Constraints</h4>
<p>Next step is to build your Primary &amp; Foreign Key contraints</p>
<p><pre class="brush: sql;">
set timing on
spool constraints.log
-- PK Constraints
ALTER TABLE H_REGION ADD CONSTRAINT REGION_PK PRIMARY KEY (r_regionkey);
ALTER TABLE H_NATION ADD CONSTRAINT NATION_PK PRIMARY KEY (n_nationkey);
ALTER TABLE H_SUPPLIER ADD CONSTRAINT SUPPLIER_PK PRIMARY KEY (s_suppkey);

create unique index partsupp_pk on h_partsupp(ps_partkey,ps_suppkey) parallel 2;
ALTER TABLE H_PARTSUPP ADD CONSTRAINT PARTSUPP_PK PRIMARY KEY(ps_partkey,ps_suppkey) using index PARTSUPP_PK;

create unique index PART_PK on H_PART(p_partkey) parallel 2;
ALTER TABLE H_PART ADD CONSTRAINT PART_PK PRIMARY KEY (p_partkey) using index PART_PK;

create unique index ORDERS_PK on H_ORDER(o_orderkey) parallel 2;
ALTER TABLE H_ORDER ADD CONSTRAINT ORDERS_PK PRIMARY KEY (o_orderkey) using index ORDERS_PK;

create unique index LINEITEM_PK on H_LINEITEM(l_linenumber, l_orderkey) parallel 2;
ALTER TABLE H_LINEITEM ADD CONSTRAINT LINEITEM_PK PRIMARY KEY (l_linenumber, l_orderkey)  using index LINEITEM_PK;

create unique index CUSTOMER_PK on H_CUSTOMER(c_custkey) parallel 2;
ALTER TABLE H_CUSTOMER ADD CONSTRAINT CUSTOMER_PK PRIMARY KEY (c_custkey) using index CUSTOMER_PK;

-- FK Constraints
ALTER TABLE H_LINEITEM
ADD CONSTRAINT LINEITEM_PARTSUPP_FK FOREIGN KEY (l_partkey, l_suppkey)
REFERENCES H_PARTSUPP(ps_partkey, ps_suppkey) NOT DEFERRABLE;

ALTER TABLE H_ORDER
ADD CONSTRAINT ORDER_CUSTOMER_FK FOREIGN KEY (o_custkey)
REFERENCES H_CUSTOMER (c_custkey) NOT DEFERRABLE;

ALTER TABLE H_PARTSUPP
ADD CONSTRAINT PARTSUPP_PART_FK FOREIGN KEY (ps_partkey)
REFERENCES H_PART (p_partkey) NOT DEFERRABLE;

ALTER TABLE H_PARTSUPP
ADD CONSTRAINT PARTSUPP_SUPPLIER_FK FOREIGN KEY (ps_suppkey)
REFERENCES H_SUPPLIER (s_suppkey) NOT DEFERRABLE;

ALTER TABLE H_SUPPLIER
ADD CONSTRAINT SUPPLIER_NATION_FK FOREIGN KEY (s_nationkey)
REFERENCES H_NATION (n_nationkey) NOT DEFERRABLE;

ALTER TABLE H_CUSTOMER
ADD CONSTRAINT CUSTOMER_NATION_FK FOREIGN KEY (c_nationkey)
REFERENCES H_NATION (n_nationkey) NOT DEFERRABLE;

ALTER TABLE H_NATION
ADD CONSTRAINT NATION_REGION_FK FOREIGN KEY (n_regionkey)
REFERENCES H_REGION (r_regionkey) NOT DEFERRABLE;

ALTER TABLE H_LINEITEM
ADD CONSTRAINT LINEITEM_ORDER_FK FOREIGN KEY (l_orderkey)
REFERENCES H_ORDER (o_orderkey) NOT DEFERRABLE;

spool off
</pre></p>
<h4>Gather Statistics</h4>
<p>Final step is to gather CBO statistics so that you will have, hopefully, better execution plans</p>
<p><pre class="brush: sql;">
begin
    dbms_stats.gather_schema_stats(ownname =&gt; 'TPCH',
                                   degree  =&gt; 2,
                                   cascade =&gt;  true);
end;
/
</pre></p>
<h3>Conclusion</h3>
<p>Now you are done you. You can either execute infamous TPC-H queries (you can find in <a title="TPC-H pdf" href="http://www.tpc.org/tpch/spec/tpch2.12.0.pdf" target="_blank">TPC-H documentation</a>) or your own test cases.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/927/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/927/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/927/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/927/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/927/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/927/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/927/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=927&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2010/10/22/create-your-own-oracle-tpc-h-playground-on-linux/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>

		<media:content url="http://husnusensoy.files.wordpress.com/2010/10/tpch1.png" medium="image">
			<media:title type="html">tpch.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Exadata v2 Fast Track Session Slides in RAC SIG Turkey</title>
		<link>http://husnusensoy.wordpress.com/2010/10/16/exadata-v2-fast-track-session-slides-in-rac-sig-turkey/</link>
		<comments>http://husnusensoy.wordpress.com/2010/10/16/exadata-v2-fast-track-session-slides-in-rac-sig-turkey/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 21:37:49 +0000</pubDate>
		<dc:creator>kocakahin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Exadata]]></category>

		<guid isPermaLink="false">http://husnusensoy.wordpress.com/?p=915</guid>
		<description><![CDATA[You can find my Exadata v2 Fast track slides for my 1 hour session in Oracle RAC SIG on last Saturday Oracle Exadata v2 Fast Track<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=915&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can find my Exadata v2 Fast track slides for my 1 hour session in Oracle RAC SIG on last Saturday<br />
<a href="http://husnusensoy.files.wordpress.com/2010/09/oracle-exadata-v2-fast-track.pptx"><a href="http://husnusensoy.files.wordpress.com/2010/10/oracle-exadata-v2-fast-track.pptx">Oracle Exadata v2 Fast Track</a></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/husnusensoy.wordpress.com/915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/husnusensoy.wordpress.com/915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/husnusensoy.wordpress.com/915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/husnusensoy.wordpress.com/915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/husnusensoy.wordpress.com/915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/husnusensoy.wordpress.com/915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/husnusensoy.wordpress.com/915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/husnusensoy.wordpress.com/915/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=husnusensoy.wordpress.com&amp;blog=637659&amp;post=915&amp;subd=husnusensoy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://husnusensoy.wordpress.com/2010/10/16/exadata-v2-fast-track-session-slides-in-rac-sig-turkey/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a336f49473f7ff0add6beba3d42aef17?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kocakahin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
