<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">

    <title type="text">IEE Wiki</title>
    <subtitle type="text">IEE Wiki</subtitle>
    <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/" />
    <link rel="self" type="application/atom+xml" href="http://www.infobright.com/Wiki/IEE_Wiki/Special:Recentchanges_Atom" />
    <updated>2012-06-15T18:10:32Z</updated>
    <rights>Copyright (c) 2008, do-not-reply@infobright.com</rights>
    <generator uri="http://expressionengine.com/" version="1.6.7">ExpressionEngine</generator>
    <id>tag:infobright.com,2012:06:15:wiki</id>


    <entry>
      <title>Platform Requirements</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Platform_Requirements/" />
      <id>tag:infobright.com,2012:wiki:Platform Requirements/118.790</id>
      <published>2012-06-15T18:10:32Z</published>
      <updated>2012-06-15T18:10:32Z</updated>
      <author>
            <name>Susan Davis</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Platform Support</b></p>

	<p><span class="caps">IEE</span> is available on the following platforms for 64-bit Intel or <span class="caps">AMD</span>:</p>

	<ul>
		<li>Windows Server 2003,2008</li>
		<li>Solaris 10</li>
		<li>Red Hat Enterprise Linux 5, 6.1</li>
		<li>Debian 5 &#8220;Lenny&#8221;,6 &#8220;Squeeze&#8221;</li>
		<li>CentOS 5.4, 6.1</li>
		<li>Novell <span class="caps">SUSE</span> Linux Enterprise 10, 11</li>
	</ul>

	<p><span class="caps">IEE</span> is available on the following platforms for 32-bit Intel or <span class="caps">AMD</span></p>

	<ul>
		<li>Windows Server 2003</li>
	</ul>

	<p><b>Please Note:</b> Due to accessible memory restrictions, the Windows 32-bit version should only be used for staging and application testing, or limited concurrent/single user deployments)</p>

	<p><b>System Requirements</b></p>

	<p><i>For Multi-User Evaluation or Production Deployment:</i></p>

	<p><span class="caps">CPU</span> Speed</p>

	<ul>
		<li>64-bit:</li>
	</ul>

	<p style="padding-left:2em;">2.0GHz minimum<br />
2.0GHz or faster dual or quad core recommended</p>

	<p>Memory </p>

	<ul>
		<li>64-bit:</li>
	</ul>

	<p style="padding-left:2em;">8GB minimun<br />
32GB or more recommended (and at least 2GB per core)</p>

	<p><i>For Personal Evaluation, or Single/Limited User Deployments:</i></p>

	<p><span class="caps">CPU</span> Speed</p>

	<ul>
		<li>32-bit:</li>
	</ul>

	<p style="padding-left:2em;">1.6GHz minimum<br />
2.0GHz or faster dual or quad core recommended</p>

	<ul>
		<li>64-bit:</li>
	</ul>

	<p style="padding-left:2em;">1.8GHz minimum<br />
2.0GHz or faster dual or quad core recommended</p>

	<p>Memory   </p>

	<ul>
		<li>32-bit:</li>
	</ul>

	<p style="padding-left:2em;">1GB minimum<br />
2GB or more recommended</p>

	<ul>
		<li>64-bit:</li>
	</ul>

	<p style="padding-left:2em;">2GB minimum<br />
4GB or more recommended</p>
      ]]></content>
    </entry>

    <entry>
      <title>Query Execution Log</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Query_Execution_Log/" />
      <id>tag:infobright.com,2012:wiki:Query Execution Log/128.676</id>
      <published>2012-02-15T19:42:53Z</published>
      <updated>2012-02-15T19:42:53Z</updated>
      <author>
            <name>dobrien</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Control Messages</b></p>

	<p><b>(Description valid for <span class="caps">ICE</span>/IEE 4.0.4)</b></p>

	<p>Infobright currently does not support the MySQL <span class="caps">EXPLAIN</span> command. As a columnar database, the Infobright engine generates an execution plan which is not easily convertible to MySQL-like <span class="caps">EXPLAIN</span> notions. Moreover, the actual execution plan is generated dynamically, based on Knowledge Nodes and previous execution steps, thus it is not possible to generate it without the actual execution of a query.</p>

	<p>Instead, the Query Execution Log is used to track the execution plan, provide rough statistics, and provide insights into performance bottlenecks.</p>

	<p>The query execution log is located:
	<ul>
		<li>in <i>bh.err</i> file in your database directory (configurable as log-error value in the &#8212;<i>config</i> file provided at installation, /etc/my-ib.cnf by default),</li>
		<li>on console, if the server is run with &#8212;<i>console</i> option</li>
	</ul></p>

	<p><b>ControlMessages parameter &#8211; switching the log on</b></p>

	<p>The parameter (set in <i>brighthouse.ini</i>) is used to define the level of details displayed in Query Execution Log, at the start of every line. Note that the more details are displayed, the larger (and potentially less clear) log is created. Restart the Infobright server to execute the change of ControlMessages parameter.</p>

	<p>The execution log for a query may be quite large (several KBs), and the bh.err log may grow substantially. For a server executing a lot of small queries it is recommended either to switch the logging off (ControlMessages = 0), or to implement an automatic backup scheme. A shell script (Unix) which copies the error log to a backup file and re-initializes the <i>bh.err</i> file is available here: <a href="http://www.infobright.org/Downloads/Contributed-Software/">http://www.infobright.org/Downloads/Contributed-Software/</a>.</p>

	<p><b>ControlMessages = 0</b></p>

	<p>Query Execution Log is disabled. Only startup information is logged in <i>bh.err</i>.</p>

	<p><b>ControlMessages = 1</b></p>

	<p>Logging of actions without timestamps etc.</p>

	<p><b>ControlMessages = 2</b></p>

	<p>This setting will add the timestamp and a session number in square brackets. The session number is maintained by a querying tool – some tools use different numbers for each subsequent query, some other will keep the number for the next queries. The number in the log is useful to determine which message is generated by which query (running in parallel). For example:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2009</span><span style="color: #007700">-</span><span style="color: #0000BB">05</span><span style="color: #007700">-</span><span style="color: #0000BB">11&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">30</span><span style="color: #007700">:</span><span style="color: #0000BB">10&nbsp;&#91;6&#93;&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">t0</span><span style="color: #007700">):&nbsp;</span><span style="color: #0000BB">25&nbsp;all&nbsp;packrows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">25&nbsp;to&nbsp;open&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">including&nbsp;25&nbsp;full</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2009</span><span style="color: #007700">-</span><span style="color: #0000BB">05</span><span style="color: #007700">-</span><span style="color: #0000BB">11&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">30</span><span style="color: #007700">:</span><span style="color: #0000BB">11&nbsp;&#91;2&#93;&nbsp;Displaying&nbsp;result</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">1000&nbsp;rows</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>These two log messages are connected to two different queries (session 6 and 2) and should not be understood as a sequence of events.</p>

	<p><b>ControlMessages = 3</b> (Added on 3.4.0 svn rev 7877)</p>

	<p>This setting will add the following four values:</p>

	<p><b>[ Total Mem/Free Mem (M), Total <span class="caps">CPU</span> cores/Free <span class="caps">CPU</span> cores ]</b></p>

	<p>Example:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">04</span><span style="color: #007700">-</span><span style="color: #0000BB">08&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">02</span><span style="color: #007700">:</span><span style="color: #0000BB">01&nbsp;&#91;&nbsp;3894M</span><span style="color: #007700">/</span><span style="color: #0000BB">2467M</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">/</span><span style="color: #0000BB">0.44&nbsp;&#93;&nbsp;Total&nbsp;data&nbsp;packs&nbsp;actually&nbsp;loaded&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">approx</span><span style="color: #007700">.):&nbsp;</span><span style="color: #0000BB">0&nbsp;</span>
</span>
</code></div>

	<p>Total Mem = total memory in system &#40;3894M&#41;,<br />
Free Mem = <span class="caps">RES</span> + system cache (2467M),<br />
Total <span class="caps">CPU</span> cores (4),<br />
Free <span class="caps">CPU</span> cores = Free <span class="caps">CPU</span> over last minute.</p>

	<p>If user specifies query throttle parameters in the .infobright file, then it will add more logs such as:</p>

	<p><b>[ Total/Free Mem(M), Total/Free <span class="caps">CPU</span> coress, Waiting queries/Running queries/Throttle/Average query wait time in queue ]</b></p>

	<p>.infobright can have:</p>

	<p>&lt;brighthouse&gt;<br />
&#8230;<br />
&lt;throttle&gt;<br />
&lt;limit &gt; 4 &lt;/limit&gt;<br />
&lt;/throttle&gt;<br />
&lt;/brighthouse&gt;</p>

	<p>Example:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">04</span><span style="color: #007700">-</span><span style="color: #0000BB">08&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">02</span><span style="color: #007700">:</span><span style="color: #0000BB">01&nbsp;&#91;&nbsp;3894M</span><span style="color: #007700">/</span><span style="color: #0000BB">2467M</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">/</span><span style="color: #0000BB">0.44</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">/</span><span style="color: #0000BB">1</span><span style="color: #007700">/</span><span style="color: #0000BB">4</span><span style="color: #007700">/</span><span style="color: #0000BB">0.00&nbsp;&#93;&nbsp;Total&nbsp;data&nbsp;packs&nbsp;actually&nbsp;loaded&nbsp;<br /></span><span style="color: #007700">(</span><span style="color: #0000BB">approx</span><span style="color: #007700">.):&nbsp;</span><span style="color: #0000BB">0&nbsp;</span>
</span>
</code></div>

	<p>Note that for a large number of short queries (i.e. generating many log lines based on system info) a slowdown may be noticed for ControlMessages 3 and higher.</p>

	<p><b>ControlMessages = 4</b> (added on 3.4.2)</p>

	<p>The same as 3, additionally outputs .infobright configuration to the brighthouse.log file.</p>

	<p><b>Query compilation</b></p>

	<p>When a query starts, its compiled version is displayed in the log, as a sequence of internal Infobright execution steps:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">03&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">16</span><span style="color: #007700">:</span><span style="color: #0000BB">50&nbsp;&#91;1&#93;&nbsp;T</span><span style="color: #007700">:-</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">TABLE_ALIAS</span><span style="color: #007700">(</span><span style="color: #0000BB">T</span><span style="color: #007700">:</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"dim_dates"</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">T</span><span style="color: #007700">:-</span><span style="color: #0000BB">2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">TMP_TABLE</span><span style="color: #007700">(</span><span style="color: #0000BB">T</span><span style="color: #007700">:-</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">A</span><span style="color: #007700">:-</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">T</span><span style="color: #007700">:-</span><span style="color: #0000BB">2.ADD_COLUMN</span><span style="color: #007700">(&lt;</span><span style="color: #0000BB">null</span><span style="color: #007700">&gt;,</span><span style="color: #0000BB">COUNT</span><span style="color: #007700">,</span><span style="color: #DD0000">"count(*)"</span><span style="color: #007700">,</span><span style="color: #DD0000">"ALL"</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">RESULT</span><span style="color: #007700">(</span><span style="color: #0000BB">T</span><span style="color: #007700">:-</span><span style="color: #0000BB">2</span><span style="color: #007700">)&nbsp;</span>
</span>
</code></div>

	<p>The compilation steps may be helpful for resolving real table names (as above: table t0 is &#8220;dim_dates&#8221;). Expressions, constants and column names in the query are transformed into internal Virtual Column objects, which definition may be found in the query compilation log. <span class="caps">ADD</span>_COLUMN is used to define and name (alias) output columns.</p>

	<p><b>Query execution steps</b></p>

	<p>The query log is a useful tool for identifying bottlenecks and pinpointing errors. The following messages may indicate problems:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">Table&nbsp;</span><span style="color: #007700">./</span><span style="color: #0000BB">mydb</span><span style="color: #007700">/</span><span style="color: #0000BB">clients&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">41</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">accessed&nbsp;by&nbsp;MySQL&nbsp;engine</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>The Infobright table was accessed by MySQL engine, instead of Infobright one. Possible reasons:
	<ul>
		<li>Unsupported syntax is used.</li>
		<li>Join with non-Infobright table is performed.</li>
		<li>MySQL format is used in export, instead of Infobright text format.</li>
		<li>MySQL is gathering statistics of Infobright tables either for <span class="caps">ETL</span> tool, or to optimize query (e.g. outer joins) before sending it back to Infobright engine.</li>
	</ul></p>

	<p>All cases except the last one mean that the query will be very slow.</p>

	<p>If the query is not switched to MySQL, then every part of it (<span class="caps">WHERE</span> part, aggregations etc.) will produce specific logs.</p>

	<p><b><span class="caps">WHERE</span> conditions</b></p>

	<p>The first phase of query execution is calculating <span class="caps">WHERE</span> conditions (except joins, i.e. conditions mixing columns from different tables). The following example comes from <span class="caps">TPC</span>-H benchmark database:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;count</span><span style="color: #007700">(*)&nbsp;</span><span style="color: #0000BB">from&nbsp;lineitem&nbsp;join&nbsp;orders&nbsp;on&nbsp;l_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">o_orderkey<br />where&nbsp;o_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3004704&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">l_tax&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">0.02&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">o_orderpriority&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'3-MEDIUM'&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">l_tax&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Merging&nbsp;conditions</span><span style="color: #007700">...<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Initial&nbsp;execution&nbsp;plan&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">non</span><span style="color: #007700">-</span><span style="color: #0000BB">join</span><span style="color: #007700">):<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">0</span><span style="color: #007700">(</span><span style="color: #0000BB">t1a0</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">BET</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">8</span><span style="color: #007700">(</span><span style="color: #0000BB">3004704</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">9</span><span style="color: #007700">(</span><span style="color: #0000BB">3004704</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">0</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">7</span><span style="color: #007700">(</span><span style="color: #0000BB">t0a0</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">BET</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">21</span><span style="color: #007700">(</span><span style="color: #0000BB">3004704</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">22</span><span style="color: #007700">(</span><span style="color: #0000BB">3004704</span><span style="color: #007700">)&nbsp;&nbsp;(</span><span style="color: #0000BB">0</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">4</span><span style="color: #007700">(</span><span style="color: #0000BB">t1a5</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">BET</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">17.21</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">2</span><span style="color: #007700">(</span><span style="color: #0000BB">t0a7</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">BET</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">10</span><span style="color: #007700">(</span><span style="color: #0000BB">0.03</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">11</span><span style="color: #007700">(+</span><span style="color: #0000BB">inf</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">19.8</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Packs</span><span style="color: #007700">/</span><span style="color: #0000BB">packrows&nbsp;after&nbsp;KN&nbsp;evaluation</span><span style="color: #007700">:<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">t0</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">Pckrows</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">9156</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">susp</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">9155&nbsp;</span><span style="color: #007700">empty&nbsp;</span><span style="color: #0000BB">0&nbsp;full</span><span style="color: #007700">).&nbsp;</span><span style="color: #0000BB">Conditions</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">2<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">t1</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">Pckrows</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">2289</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">susp</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">2288&nbsp;</span><span style="color: #007700">empty&nbsp;</span><span style="color: #0000BB">0&nbsp;full</span><span style="color: #007700">).&nbsp;</span><span style="color: #0000BB">Conditions</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">2<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Packrows&nbsp;after&nbsp;exact&nbsp;evaluation&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">WHERE</span><span style="color: #007700">):<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">t0</span><span style="color: #007700">):&nbsp;</span><span style="color: #0000BB">9156&nbsp;all&nbsp;packrows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1&nbsp;to&nbsp;open&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">including&nbsp;0&nbsp;full</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">t1</span><span style="color: #007700">):&nbsp;</span><span style="color: #0000BB">2289&nbsp;all&nbsp;packrows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1&nbsp;to&nbsp;open&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">including&nbsp;0&nbsp;full</span><span style="color: #007700">)&nbsp;</span>
</span>
</code></div>

	<p>The log reflects main phases of one-dimensional (non-join) condition evaluation.</p>

	<p><b>Merging conditions</b> is a message indicating nontrivial transformations of conditions before execution. Nearly all conditions are somehow transformed (e.g. encoded to an internal value representation), but in this case two steps are important for performance:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">join&nbsp;</span><span style="color: #007700">...&nbsp;</span><span style="color: #0000BB">on&nbsp;l_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">o_orderkey&nbsp;where&nbsp;o_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3004704<br />&nbsp;&nbsp;&nbsp;&nbsp;TRANSFORMED&nbsp;TO</span><span style="color: #007700">:<br /></span><span style="color: #0000BB">&#91;no&nbsp;join&nbsp;condition&#93;&nbsp;where&nbsp;o_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3004704&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">l_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3004704&nbsp;</span>
</span>
</code></div>

	<p>One-dimensional conditions are usually much faster than joins, so we are trying to make such transformation whenever possible. Additionally, one of the remaining conditions is superfluous:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">l_tax&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">0.02&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">l_tax&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">0<br />&nbsp;&nbsp;&nbsp;&nbsp;TRANSFORMED&nbsp;TO</span><span style="color: #007700">:<br /></span><span style="color: #0000BB">l_tax&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">0.02&nbsp;</span>
</span>
</code></div>

	<p>Other transformations include changing all equalities and inequalities into unified <span class="caps">BETWEEN</span> form, and changing a text condition into a numerical one, as the column was declared as <span class="caps">LOOKUP</span>. We can inspect all the changes by analyzing the final list of transformed conditions (<b>Initial execution plan</b> section of log). The list of conditions contain indication of virtual columns used. VC:n means a virtual column number <i>n</i> (defined in the query compilation section), and its short description is given in the parentheses. E.g. t1a0 means column 0 of table 1 (numbers start with 0), the number of table reflects table order in the <span class="caps">FROM</span> part of query; column number reflects column order in table definition. Constants (like 3004704 above) are also defined as virtual columns. Each condition is augmented with its <b>weight</b> (calculated basing on table sizes and Knowledge Nodes), and the conditions with smaller weight are scheduled to be calculated first.</p>

	<p><b>Rough phase</b> of conditions execution starts just after the plan is displayed and finishes with &#8220;Packs/packrows after KN evaluation&#8221; message. This part of log summarizes the result of rough evaluation (based on Knowledge Grid) of conditions, table by table. E.g.:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">18&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">t0</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">Pckrows</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">9156</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">susp</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">9155&nbsp;</span><span style="color: #007700">empty&nbsp;</span><span style="color: #0000BB">0&nbsp;full</span><span style="color: #007700">).&nbsp;</span><span style="color: #0000BB">Conditions</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">2&nbsp;</span>
</span>
</code></div>

	<p>This summary for table t0 contains the following information:
	<ul>
		<li>9156 &#8211; the total size of table (in data packs), which gives about 600 mln rows,</li>
		<li>susp. 1 &#8211; the number of <b>suspected</b> packs, i.e. data packs for which we have to uncompress data and check conditions,</li>
		<li>9155 empty &#8211; all these data packs were excluded basing on Knowledge Grid statistics,</li>
		<li>0 full &#8211; these data packs are resolved as fully relevant, i.e. we does not need to uncompress them and check conditions (as they will be met), but we may need the packs for some columns to create output,</li>
		<li>Conditions: 2 &#8211; a number of non-join conditions for the given table.</li>
	</ul></p>

	<p><b>Exact execution</b> will actually open data packs (the suspected ones) and check conditions. Sometimes the number of opened data packs may be lower than expected; e.g. if we manage to exclude the whole data pack with one condition, then we don&#8217;t need to open it for the other column. The summary message in &#8220;Packrows after exact evaluation&#8221; part is constructed in the way similar to the rough part.</p>

	<p>In <span class="caps">IEE</span> a mechanism of parallel execution of conditions is available. The number of used threads depends on data size, server load and <span class="caps">IEE</span> settings. When the parallel execution of a given condition is actually used, a message is displayed:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">09</span><span style="color: #007700">:</span><span style="color: #0000BB">01&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">on&nbsp;8&nbsp;threads&nbsp;</span>
</span>
</code></div>

	<p><b>Joins</b></p>

	<p>Joining conditions are organized in groups regarding the same pairs of tables, and each group is executed by one of the following join algorithms:
	<ul>
		<li><b>Hash join</b> (hash block algorithm). There are two sides of join: the traversed one (which is cached in a memory hash buffer part by part &#8211; usually this is the smaller table) and the matched one (which is then matched against the cached values as a whole, for every contents of the hash buffer). This algorithm is used in cases when at least one join condition is an equality of columns from different tables, or functions of them (e.g. <i>f(t1.a) = g(t2.b)</i>). Several equality conditions can be combined into one for hashing.</li>
		<li><b>Map join</b>. It is a fast algorithm designed for easy, numerical (equality condition) cases. A smaller table is scanned and a mapping formula (piecewise linear function represented by offsets) is found between a key value and row number. Then this formula is used to transform the key values of the larger table into join result (output tuples).</li>
		<li><b>Sorter join</b>. In this algorithm two sorters are created and then values are matched in the order of key values. Inequality conditions (like <i>t1.a &lt; t2.b</i>, but except <i>not equal</i> operator) are executed this way.</li>
		<li><b>Joiner loop</b> is the least efficient joining algorithm in Infobright. It is a quadratic loop through all pairs of rows, for each pair the condition is checked out. This type of join is used when none of the other algorithms can be used, e.g. for an implicit join conditions (e.g. <i>f(t1.a, t2.b) = const</i>).</li>
		<li>If there is more than one condition for the same pair of tables (a conjunction), the algorithm will try to find all equality conditions and execute hash join; if not possible, an inequality will be localized to use sorter join, otherwise all conditions will be executed by loop join. All conditions not executed by the main algorithm (e.g. the second inequality in <i>t1.a between t2.b and t2.c</i>) will be checked against output tuples of the algorithm, and no additional passes are needed.</li>
	</ul></p>

	<p>The messages produced during the join execution depend on the algorithm used.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">47</span><span style="color: #007700">:</span><span style="color: #0000BB">01&nbsp;&#91;1&#93;&nbsp;Join&nbsp;execution&nbsp;plan</span><span style="color: #007700">:<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">47</span><span style="color: #007700">:</span><span style="color: #0000BB">01&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">2</span><span style="color: #007700">(</span><span style="color: #0000BB">t0a0</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">3</span><span style="color: #007700">(</span><span style="color: #0000BB">t1a0</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">34.2</span><span style="color: #007700">)&nbsp;</span>
</span>
</code></div>

	<p>These messages indicate the <b>beginning of joining</b> phase. A list of all join conditions, ordered by theirs weight (a number in parentheses, approximated by table sizes and Knowledge Grid statistics) is displayed. Names of tables joined in each step may be inferred from their numbers (t0, t1 in the example above); they are numbered in order of appearance in query, starting with 0.</p>

	<p><b>Hash join</b> execution is described by messages similar to these:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">47</span><span style="color: #007700">:</span><span style="color: #0000BB">19&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;60398160</span><span style="color: #007700">/</span><span style="color: #0000BB">150000000&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">48</span><span style="color: #007700">:</span><span style="color: #0000BB">26&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;241604746&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">48</span><span style="color: #007700">:</span><span style="color: #0000BB">44&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;120796320</span><span style="color: #007700">/</span><span style="color: #0000BB">150000000&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">49</span><span style="color: #007700">:</span><span style="color: #0000BB">56&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;483209597&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">50</span><span style="color: #007700">:</span><span style="color: #0000BB">02&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;all&nbsp;150000000&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">50</span><span style="color: #007700">:</span><span style="color: #0000BB">28&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;600037902&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">50</span><span style="color: #007700">:</span><span style="color: #0000BB">28&nbsp;&#91;1&#93;&nbsp;Roughly&nbsp;omitted&nbsp;66.65</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">packrows</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>&#8220;Traversed&#8221; step is finished when the next chunk of rows (potentially all of them) is decompressed, transformed and stored in memory hash buffer. &#8220;Produced x tuples&#8221; appears when all rows from the &#8220;matched&#8221; table (usually this is the larger one) are decompressed and matched against the contents of hash buffer. Resulting tuples are stored in another memory buffer, cached on disk if needed.</p>

	<p>For larger joins (like the above example) joining needs many passes through the &#8220;traversed&#8221; table. Each pass will take similar time, so we can approximate the total joining time basing on the reported progress. The last message indicates the number of data packs we were able to omit in &#8220;matching&#8221; phase of joining thanks to statistics of hash buffer and KNs.</p>

	<p><b>Map join</b> messages may look like that:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">08</span><span style="color: #007700">-</span><span style="color: #0000BB">15&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">31</span><span style="color: #007700">:</span><span style="color: #0000BB">14&nbsp;&#91;1&#93;&nbsp;Join&nbsp;mapping&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">offset&nbsp;map</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">created&nbsp;on&nbsp;399994&nbsp;rows</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>This message reports the size of the smaller table, on which the join mapping formula is found.</p>

	<p><b>Sorter join</b> messages may look like that:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">36&nbsp;&#91;1&#93;&nbsp;Joining&nbsp;sorters&nbsp;created&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">150000000&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">600037902&nbsp;tuples</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>This message appears when both joined columns are already scanned and turned into sorter buffers. It may take about a half of joining time, depending on data types and value sizes. The next step is to sort the buffers and produce join result by matching keys from both sorter buffers. The buffers are cached on disk if too big for memory.</p>

	<p>The following message indicates <b>joiner loop</b> algorithm, which may result in a slow response time:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2009</span><span style="color: #007700">-</span><span style="color: #0000BB">11</span><span style="color: #007700">-</span><span style="color: #0000BB">06&nbsp;18</span><span style="color: #007700">:</span><span style="color: #0000BB">52</span><span style="color: #007700">:</span><span style="color: #0000BB">20&nbsp;&#91;1&#93;&nbsp;Starting&nbsp;joiner&nbsp;loop&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">4017000000000&nbsp;rows</span><span style="color: #007700">).&nbsp;</span>
</span>
</code></div>

	<p>The number in message indicates the number of pairs to be checked. If this number is large (as above), it is probably better to stop query and rethink its formulation, to avoid joins declared in implicit way, e.g.:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">...</span><span style="color: #0000BB">WHERE&nbsp;t1</span><span style="color: #007700">.</span><span style="color: #0000BB">x&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">t2</span><span style="color: #007700">.</span><span style="color: #0000BB">y&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">5&nbsp;</span><span style="color: #007700">...&nbsp;&nbsp;&nbsp;---&gt;&nbsp;&nbsp;&nbsp;...</span><span style="color: #0000BB">WHERE&nbsp;t1</span><span style="color: #007700">.</span><span style="color: #0000BB">x&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">5&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">t2</span><span style="color: #007700">.</span><span style="color: #0000BB">y&nbsp;</span><span style="color: #007700">...&nbsp;</span>
</span>
</code></div>

	<p>The latter formulation will use much faster sorter join algorithm.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2009</span><span style="color: #007700">-</span><span style="color: #0000BB">05</span><span style="color: #007700">-</span><span style="color: #0000BB">29&nbsp;07</span><span style="color: #007700">:</span><span style="color: #0000BB">41</span><span style="color: #007700">:</span><span style="color: #0000BB">35&nbsp;&#91;7&#93;&nbsp;Warning</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">a&nbsp;big&nbsp;intermediate&nbsp;object&nbsp;created&nbsp;</span><span style="color: #007700">(~</span><span style="color: #0000BB">268&nbsp;GB</span><span style="color: #007700">)&nbsp;</span>
</span>
</code></div>

	<p>The above message means that a substantial disk space will be used to execute the query. In most cases it is not intended and may indicate a mistake in query formulation – e.g. a full Cartesian join of tables with millions of rows.</p>

	<p>When a joining (using any of the algorithms) is finished, the <b>final report</b> displays the number of rows in result, numbers of joined tables, information about outer joins etc.:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">14&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">50</span><span style="color: #007700">:</span><span style="color: #0000BB">28&nbsp;&#91;1&#93;&nbsp;Tuples&nbsp;after&nbsp;inner&nbsp;join&nbsp;0</span><span style="color: #007700">-</span><span style="color: #0000BB">1&nbsp;&#91;hash&#93;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">600037902&nbsp;&nbsp;&nbsp;&#91;11&#93;&nbsp;</span>
</span>
</code></div>

	<p>A name of algorithm used is also displayed. The last information (like [11]) is the structure of the result: each position indicates one dimension(table), and the symbol on this position means:
	<ul>
		<li><b>&#8220;1&#8221; (or other number)</b> when the table is represented as IndexTable object, i.e. it is a vector of tuple numbers, stored in a memory buffer or cached on disk. Dimensions marked as a number create a group of commonly described intermediate result (a kind of virtual subtable); more than one such result may be represented in the same time. E.g. [1122] means that the join result is a cross product of two subtables (one created as a join of first two dimensions, the other as a join of the remaining two ones).*</li>
		<li><b>&#8220;f&#8221;</b> when the table is represented as zero/one filter (the row may be present or not). The result of join is interpreted as a cross product of all dimensions described by &#8220;f&#8221; and all groups of dimensions described as numbers or otherwise.</li>
		<li><b>&#8220;F&#8221;</b> and <b>&#8220;v&#8221;</b> is an indication of Virtual Dimensions Column representation. It is a representation of join result as a filter (&#8220;F&#8221;) on the &#8220;fact&#8221; table, and a special version of a vector of tuple numbers (&#8220;v&#8221;) for a &#8220;dimension&#8221; table. This is a representation more convenient than the IndexTable one (indicated by numbers).</li>
		<li><b>&#8220;-&#8221;</b> when the dimension (table) is not present in query any longer and no description is needed. Only a number of tuples may be inferred from such &#8220;forgotten&#8221; dimensions.</li>
	</ul></p>

	<p>Initial state is described as &#8220;all f&#8221;, and each step of joining usually will change the representation. Note that results described as numbers are the most &#8220;heavy&#8221;, as explicit row numbers must be stored. On the other hand, usually n:m joins cannot avoid such representation.</p>

	<p>For many tables and join conditions, messages will describe the whole evolution of result. The following example also comes from <span class="caps">TPC</span>-H benchmark database:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;n_name</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sum</span><span style="color: #007700">(</span><span style="color: #0000BB">l_extendedprice</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">sum</span><span style="color: #007700">(</span><span style="color: #0000BB">l_discount</span><span style="color: #007700">)&nbsp;as&nbsp;</span><span style="color: #0000BB">revenue<br />from&nbsp;customer</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">orders</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">lineitem</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">supplier</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">nation</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">region<br />where&nbsp;c_custkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">o_custkey&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">l_orderkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">o_orderkey&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">l_suppkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">s_suppkey<br />&nbsp;&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">c_nationkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">s_nationkey&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">s_nationkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">n_nationkey&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">n_regionkey&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">r_regionkey<br /></span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">r_name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'EUROPE'&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">o_orderdate&nbsp;</span><span style="color: #007700">&gt;=&nbsp;</span><span style="color: #DD0000">'1997-01-01'&nbsp;</span><span style="color: #007700">and&nbsp;</span><span style="color: #0000BB">o_orderdate&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #DD0000">'1998-01-01'<br /></span><span style="color: #0000BB">group&nbsp;by&nbsp;n_name&nbsp;order&nbsp;by&nbsp;revenue&nbsp;desc</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

	<p>The join execution log:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Join&nbsp;execution&nbsp;plan</span><span style="color: #007700">:<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">13</span><span style="color: #007700">(</span><span style="color: #0000BB">t4a2</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">14</span><span style="color: #007700">(</span><span style="color: #0000BB">t5a0</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">16.89</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">6</span><span style="color: #007700">(</span><span style="color: #0000BB">t2a0</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">7</span><span style="color: #007700">(</span><span style="color: #0000BB">t1a0</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">27.19</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">11</span><span style="color: #007700">(</span><span style="color: #0000BB">t3a3</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">12</span><span style="color: #007700">(</span><span style="color: #0000BB">t4a0</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">28.11</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">5</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">4</span><span style="color: #007700">(</span><span style="color: #0000BB">t0a0</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">5</span><span style="color: #007700">(</span><span style="color: #0000BB">t1a1</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">29.54</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">6</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">8</span><span style="color: #007700">(</span><span style="color: #0000BB">t2a2</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">9</span><span style="color: #007700">(</span><span style="color: #0000BB">t3a0</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">35.15</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Cnd</span><span style="color: #007700">(</span><span style="color: #0000BB">7</span><span style="color: #007700">):&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">10</span><span style="color: #007700">(</span><span style="color: #0000BB">t0a3</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">VC</span><span style="color: #007700">:</span><span style="color: #0000BB">11</span><span style="color: #007700">(</span><span style="color: #0000BB">t3a3</span><span style="color: #007700">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(</span><span style="color: #0000BB">47.17</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Hash&nbsp;join&nbsp;buffer&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">up&nbsp;to&nbsp;277&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">+</span><span style="color: #0000BB">12&nbsp;bytes</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;all&nbsp;1&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;5&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Tuples&nbsp;after&nbsp;inner&nbsp;join&nbsp;4</span><span style="color: #007700">-</span><span style="color: #0000BB">5&nbsp;&#91;hash&#93;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#91;fffff</span><span style="color: #007700">-</span><span style="color: #0000BB">&#93;<br />2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Hash&nbsp;join&nbsp;buffer&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">up&nbsp;to&nbsp;33555503&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">+</span><span style="color: #0000BB">12&nbsp;bytes</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">18</span><span style="color: #007700">:</span><span style="color: #0000BB">36&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;all&nbsp;22760815&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">29&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;91050840&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">29&nbsp;&#91;1&#93;&nbsp;Tuples&nbsp;after&nbsp;inner&nbsp;join&nbsp;1</span><span style="color: #007700">-</span><span style="color: #0000BB">2&nbsp;&#91;hash&#93;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">91050840&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#91;f22ff</span><span style="color: #007700">-</span><span style="color: #0000BB">&#93;<br />2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">29&nbsp;&#91;1&#93;&nbsp;Hash&nbsp;join&nbsp;buffer&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">up&nbsp;to&nbsp;277&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">+</span><span style="color: #0000BB">12&nbsp;bytes</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">29&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;all&nbsp;5&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">29&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;200535&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">29&nbsp;&#91;1&#93;&nbsp;Tuples&nbsp;after&nbsp;inner&nbsp;join&nbsp;3</span><span style="color: #007700">-</span><span style="color: #0000BB">4&nbsp;&#91;hash&#93;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">200535&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#91;f22Fv</span><span style="color: #007700">-</span><span style="color: #0000BB">&#93;<br />2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Hash&nbsp;join&nbsp;buffer&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">up&nbsp;to&nbsp;28125749&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">+</span><span style="color: #0000BB">12&nbsp;bytes</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">20</span><span style="color: #007700">:</span><span style="color: #0000BB">36&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;all&nbsp;15000000&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">21</span><span style="color: #007700">:</span><span style="color: #0000BB">45&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;91050840&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">21</span><span style="color: #007700">:</span><span style="color: #0000BB">45&nbsp;&#91;1&#93;&nbsp;Tuples&nbsp;after&nbsp;inner&nbsp;join&nbsp;0</span><span style="color: #007700">-</span><span style="color: #0000BB">1&nbsp;&#91;hash&#93;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">91050840&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#91;2</span><span style="color: #007700">-</span><span style="color: #0000BB">2Fv</span><span style="color: #007700">-</span><span style="color: #0000BB">&#93;<br />2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">21</span><span style="color: #007700">:</span><span style="color: #0000BB">45&nbsp;&#91;1&#93;&nbsp;Hash&nbsp;join&nbsp;buffer&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">up&nbsp;to&nbsp;376997&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">+</span><span style="color: #0000BB">16&nbsp;bytes</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">21</span><span style="color: #007700">:</span><span style="color: #0000BB">49&nbsp;&#91;1&#93;&nbsp;Traversed&nbsp;all&nbsp;200535&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">23</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Produced&nbsp;730648&nbsp;tuples</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;12</span><span style="color: #007700">:</span><span style="color: #0000BB">23</span><span style="color: #007700">:</span><span style="color: #0000BB">30&nbsp;&#91;1&#93;&nbsp;Tuples&nbsp;after&nbsp;2&nbsp;cond</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">inner&nbsp;join&nbsp;0</span><span style="color: #007700">-</span><span style="color: #0000BB">2</span><span style="color: #007700">-</span><span style="color: #0000BB">3&nbsp;&#91;hash&#93;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">730648&nbsp;&nbsp;&nbsp;&nbsp;&#91;</span><span style="color: #007700">--</span><span style="color: #0000BB">2</span><span style="color: #007700">-</span><span style="color: #0000BB">2</span><span style="color: #007700">-</span><span style="color: #0000BB">&#93;&nbsp;</span>
</span>
</code></div>

	<p>The above join of 6 tables starts with hash joining table 4 and 5 (numbers start with 0). The next steps should be interpreted as follows:
	<ul>
		<li>[fffff-] &#8211; Note that some tables are excluded completely, as the engine found that they are used neither by the subsequent joins nor by resulting columns. In this case the last table is omitted.</li>
		<li>[f22ff-] &#8211; Hash join of tables 1 and 2 was chosen to be executed as the next one. A result is represented by an IndexTable (an explicit list of tuples), indicated by &#8220;2&#8221;.</li>
		<li>[f22Fv-] &#8211; Tables 3 and 4 are joined by a &#8220;large-small&#8221; hash join mechanism. At this stage the intermediate result is a Cartesian product of table 0, table 1-2 (already joined), and table 3 (represented as a filter, augmented by a dimension information coming from table 4).</li>
		<li>[2-2Fv-] &#8211; Hash join of table 0 and 1-2. The result is also an explicit IndexTable (a vector of tuples numbers), but at this stage we may omit information for table 1 as no longer used.</li>
		<li>[&#8212;2-2-] &#8211; Note that the last hash join uses 2 conditions joining table 0-2 with 3-4 in one step. The result is a list of tuples stored as an IndexTable object and only two tables are actually represented (needed for the following aggregation).</li>
	</ul></p>

	<p>A big intermediate result reported in a series of joins may suggest that order of joins is not optimal (however, it is virtually impossible to change it by hand, except using subqueries).</p>

	<p><b>Aggregations</b></p>

	<p>Aggregations (<b><span class="caps">GROUP</span> BY</b>, or <b><span class="caps">SELECT</span> <span class="caps">DISTINCT</span></b>) are based on large hash buffers (for determining groups) containing aggregation counters or other buffers (like a buffer for current <span class="caps">MAX</span> value). Values are binary encoded (a kind of compression) before sending them to the hash table. An example of log messages (<span class="caps">TPC</span>-H benchmark database):</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;o_orderstatus</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">o_orderpriority</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">count</span><span style="color: #007700">(*),&nbsp;</span><span style="color: #0000BB">max</span><span style="color: #007700">(</span><span style="color: #0000BB">o_orderdate</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">from&nbsp;orders&nbsp;group&nbsp;by&nbsp;1</span><span style="color: #007700">,</span><span style="color: #0000BB">2</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">17&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">26</span><span style="color: #007700">:</span><span style="color: #0000BB">45&nbsp;&#91;1&#93;&nbsp;GroupTable&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">up&nbsp;to&nbsp;1280&nbsp;groups</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">+</span><span style="color: #0000BB">14&nbsp;bytes&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">0.061&nbsp;MB</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">17&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">26</span><span style="color: #007700">:</span><span style="color: #0000BB">46&nbsp;&#91;1&#93;&nbsp;Aggregating</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">150000000&nbsp;tuples&nbsp;left</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0&nbsp;gr</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">found&nbsp;so&nbsp;far<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">17&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">27</span><span style="color: #007700">:</span><span style="color: #0000BB">25&nbsp;&#91;1&#93;&nbsp;Aggregated&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">15&nbsp;gr</span><span style="color: #007700">).&nbsp;</span><span style="color: #0000BB">Omitted&nbsp;packrows</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">0&nbsp;partially</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">out&nbsp;of&nbsp;2289&nbsp;total</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>A hash-based table for handling groups and aggregation buffers is initialized basing on an upper approximation of a number of groups (&#8220;positions&#8221; in the log above) and sizes of all values we need to store. The first number (2) is the total size of grouping columns (which may be internally compressed), the second one (14) is a total number of aggregation buffers (counters). <span class="caps">SELECT</span> <span class="caps">DISTINCT</span> queries are equivalent to a grouping without the aggregation part.</p>

	<p>A number of rows (tuples) to be aggregated is reported at the beginning of aggregation loop. Calculations end with a report about a number of groups found, as well as a number of data packrows omitted by rough part; &#8220;n + m partially&#8221; means that n packrows were omitted completely (both grouping and aggregated columns), and for m packrows some columns were omitted, and some other had to be decompressed. High values of n and m means that the Knowledge Grid is helpful for this query.</p>

	<p>For some long-lasting (multipass) aggregations it is possible to forecast approximate total time basing on logged timestamps:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2009</span><span style="color: #007700">-</span><span style="color: #0000BB">11</span><span style="color: #007700">-</span><span style="color: #0000BB">06&nbsp;19</span><span style="color: #007700">:</span><span style="color: #0000BB">05</span><span style="color: #007700">:</span><span style="color: #0000BB">57&nbsp;&#91;1&#93;&nbsp;Aggregating</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">1000000000&nbsp;tuples&nbsp;left</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0&nbsp;gr</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">found&nbsp;so&nbsp;far<br />2009</span><span style="color: #007700">-</span><span style="color: #0000BB">11</span><span style="color: #007700">-</span><span style="color: #0000BB">06&nbsp;19</span><span style="color: #007700">:</span><span style="color: #0000BB">17</span><span style="color: #007700">:</span><span style="color: #0000BB">59&nbsp;&#91;1&#93;&nbsp;Aggregating</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">864292787&nbsp;tuples&nbsp;left</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3677031&nbsp;gr</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">found&nbsp;so&nbsp;far<br /></span><span style="color: #007700">...&nbsp;</span>
</span>
</code></div>

	<p>Using timestamps we can conclude that 722 sec. was spent on 136 mln. rows (13.6%), which means that the query will probably run for another 1 h 16 minutes.</p>

	<p><b>Distinct</b> modifier inside an aggregating functions needs additional hash-based mechanism, which may potentially need many passes through data. Before aggregation, column statistics are checked to determine an upper approximation of distinct values. An example of count(distinct &#8230;) query messages:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;18</span><span style="color: #007700">:</span><span style="color: #0000BB">07</span><span style="color: #007700">:</span><span style="color: #0000BB">18&nbsp;&#91;1&#93;&nbsp;Adding&nbsp;dist</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">column</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">min&nbsp;</span><span style="color: #007700">=&nbsp;-</span><span style="color: #0000BB">inf</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">max&nbsp;</span><span style="color: #007700">=&nbsp;+</span><span style="color: #0000BB">inf</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">dist&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1000000000<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;18</span><span style="color: #007700">:</span><span style="color: #0000BB">07</span><span style="color: #007700">:</span><span style="color: #0000BB">18&nbsp;&#91;1&#93;&nbsp;GroupDistinctTable&nbsp;initialized&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">Hash</span><span style="color: #007700">(</span><span style="color: #0000BB">63161283</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">+</span><span style="color: #0000BB">16&nbsp;bytes</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;18</span><span style="color: #007700">:</span><span style="color: #0000BB">07</span><span style="color: #007700">:</span><span style="color: #0000BB">19&nbsp;&#91;1&#93;&nbsp;Aggregating</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">1000000000&nbsp;tuples&nbsp;left</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;18</span><span style="color: #007700">:</span><span style="color: #0000BB">29</span><span style="color: #007700">:</span><span style="color: #0000BB">04&nbsp;&#91;1&#93;&nbsp;Next&nbsp;distinct&nbsp;pass</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">908767724&nbsp;rows&nbsp;left<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;18</span><span style="color: #007700">:</span><span style="color: #0000BB">39</span><span style="color: #007700">:</span><span style="color: #0000BB">22&nbsp;&#91;1&#93;&nbsp;Next&nbsp;distinct&nbsp;pass</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">817534159&nbsp;rows&nbsp;left<br /></span><span style="color: #007700">...<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;19</span><span style="color: #007700">:</span><span style="color: #0000BB">24</span><span style="color: #007700">:</span><span style="color: #0000BB">08&nbsp;&#91;1&#93;&nbsp;Next&nbsp;distinct&nbsp;pass</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">5769&nbsp;rows&nbsp;left<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">07&nbsp;19</span><span style="color: #007700">:</span><span style="color: #0000BB">24</span><span style="color: #007700">:</span><span style="color: #0000BB">09&nbsp;&#91;1&#93;&nbsp;Aggregated&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">1&nbsp;gr</span><span style="color: #007700">).&nbsp;</span><span style="color: #0000BB">Omitted&nbsp;packrows</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">0&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">0&nbsp;partially</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">out&nbsp;of&nbsp;15259&nbsp;total</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>The meaning of messages:
	<ul>
		<li>A column in count(distinct &#8230;) is either string or numerical with a wide range of values (thus infinity in the statistics). For a numerical columns with more narrow domain we can use more optimizations. Distinct values are in this case approximated by a number of tuples.</li>
		<li>Distinct values are found by a hashing mechanism. The size of values to be counted is 16 bytes (plus 1 technical). Wide strings are represented by MD5 codes (20 bytes), but in this case the original values appeared to be shorter. The hashing buffer contains a space for 63 mln. values (17 bytes each), which makes 1 GB.</li>
		<li>The buffer is used several times, because the data itself are bigger than 1 GB. Each pass is reported, and the total time may be approximated basing on the time of one pass and the number of rows left.</li>
		<li>The last message displays the number of groups (1 group, because it is just count(distinct&#8230;) without <span class="caps">GROUP</span> BY part). If any pack was omitted because of rough checks, it is reported as &#8220;omitted packrow&#8221;. Partially omitted packrow may occur if there is more than one column involved (more aggregations or grouping columns), and it is the situation of a data pack omitted just for one of the aggregations.</li>
	</ul></p>

	<p>If the column statistics indicate that there is a limited number of values, a 0/1 filter is used instead of hash table (it is faster and always one-pass):</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;17</span><span style="color: #007700">:</span><span style="color: #0000BB">16</span><span style="color: #007700">:</span><span style="color: #0000BB">06&nbsp;&#91;1&#93;&nbsp;Adding&nbsp;dist</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">column</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">min&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">max&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">dist&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">11<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;17</span><span style="color: #007700">:</span><span style="color: #0000BB">16</span><span style="color: #007700">:</span><span style="color: #0000BB">06&nbsp;&#91;1&#93;&nbsp;GroupDistinctTable&nbsp;initialized&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">Filter</span><span style="color: #007700">(</span><span style="color: #0000BB">11</span><span style="color: #007700">)&nbsp;</span>
</span>
</code></div>

	<p>If there is no &#8220;GroupDistinctTable initialized&#8221; message in the log in spite of using distinct modifier in a query, then probably the modifier was omitted by optimizer basing on column statistics (e.g. all values are distinct anyway).</p>

	<p><b>Sorting</b></p>

	<p>The sorting algorithm works as follows:
	<ul>
		<li>Encode key columns and some of the output columns into memory buffers.</li>
		<li>Encode the rest of output columns as row numbers, if there is only one data pack to be opened.</li>
		<li>Sort the encoded values, rearranging also the stored output values/output row numbers. 
   Three algorithms are used for in-memory sorting of values:</li>
		<li> <br />
o <b>Quick Sort</b> (non-recurrent implementation),<br />
o <b>Counting Sort</b> for sorting small integer domains,<br />
o <b>Heap Sort</b> for sorting with small <span class="caps">LIMIT</span> (i.e. <span class="caps">TOP</span> n operation).</li>
		<li>Quick Sort stores the sorted data on disk in large (64 MB &#8211; 2 GB) cache buffers, which are then processed by <b>Merge Sort</b> to create output. The other sorting algorithms are not cached.</li>
		<li>Create output by reading values directly from sorter, or from data pack.</li>
		<li>Send the result to output (MySQL client, export etc.) once a portion is ready.</li>
	</ul></p>

	<p>In case of sorting, the main advantage of log messages is reporting of buffer sizes used. After the sorted columns are analyzed (basing on statistics), an appropriate encoding is determined and buffers are initialized. Consider the following query (<span class="caps">TPC</span>-H benchmark database):</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;</span><span style="color: #007700">*&nbsp;</span><span style="color: #0000BB">from&nbsp;nation&nbsp;order&nbsp;by&nbsp;n_name</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

	<p>There are 4 columns in the table, and we are sorting by char(25), binary collation. Statistics say that the longest string occupy 14 bytes (plus 2 bytes for its length), and an internal compression mechanism may be applied. The reported buffer size says:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">33</span><span style="color: #007700">:</span><span style="color: #0000BB">24&nbsp;&#91;1&#93;&nbsp;Quick&nbsp;Sort&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">25&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">6</span><span style="color: #007700">+</span><span style="color: #0000BB">0</span><span style="color: #007700">+</span><span style="color: #0000BB">1&nbsp;bytes&nbsp;each</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">33</span><span style="color: #007700">:</span><span style="color: #0000BB">24&nbsp;&#91;1&#93;&nbsp;Sorted&nbsp;rows&nbsp;retrieved</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>The meaning of the reported sizes is:
	<ul>
		<li>6 &#8211; a size of values to be compared (n_name column, internally compressed),</li>
		<li>0 &#8211; a size of values to be stored together with the sorted ones (the rest of columns, as it is select *),</li>
		<li>1 &#8211; a size of row numbers to be stored instead of original values (thus the previous value might be 0).</li>
	</ul></p>

	<p>Total: 7 bytes x 25 rows = 175 bytes. Apparently no disk caching is needed.<br />
Note that we needed just 1 byte to store a row number of 25-row table.</p>

	<p>An example of sorting the join result:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;s_suppkey</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">s_address</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">n_name&nbsp;from&nbsp;supplier&nbsp;join&nbsp;nation&nbsp;on&nbsp;n_nationkey</span><span style="color: #007700">=</span><span style="color: #0000BB">s_nationkey&nbsp;<br />&nbsp;order&nbsp;by&nbsp;s_suppkey</span><span style="color: #007700">;&nbsp;</span>
</span>
</code></div>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;14</span><span style="color: #007700">:</span><span style="color: #0000BB">47</span><span style="color: #007700">:</span><span style="color: #0000BB">58&nbsp;&#91;1&#93;&nbsp;Quick&nbsp;Sort&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">1000000&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">+</span><span style="color: #0000BB">42</span><span style="color: #007700">+</span><span style="color: #0000BB">1&nbsp;bytes&nbsp;each</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">05</span><span style="color: #007700">:</span><span style="color: #0000BB">14&nbsp;&#91;1&#93;&nbsp;Sorted&nbsp;rows&nbsp;retrieved</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>Now we have 3 bytes for sorted integers, 42 bytes for address, 1 byte for a row number in table nation. The address is not represented as a row number, because there is a lot of data packs used, and data pack shuffling may occur (degrading the performance radically). The most of the 17 minutes the query took was used to display the result on client console. Note that the result started to be displayed just after &#8220;Quick Sort initialized&#8230;&#8221; message.</p>

	<p>The message may not contain the &#8220;row number&#8221; part if it is not used at all:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">19</span><span style="color: #007700">:</span><span style="color: #0000BB">48&nbsp;&#91;1&#93;&nbsp;Quick&nbsp;Sort&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">1000000&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">+</span><span style="color: #0000BB">188&nbsp;bytes&nbsp;each</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>For large tables to be sorted, a message is displayed every 100 mln of rows:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">14</span><span style="color: #007700">:</span><span style="color: #0000BB">49&nbsp;&#91;1&#93;&nbsp;Merge&nbsp;Sort&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">600037902&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">7</span><span style="color: #007700">+</span><span style="color: #0000BB">0</span><span style="color: #007700">+</span><span style="color: #0000BB">4&nbsp;bytes&nbsp;each</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">15</span><span style="color: #007700">:</span><span style="color: #0000BB">15&nbsp;&#91;1&#93;&nbsp;Preparing&nbsp;values&nbsp;to&nbsp;sort&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">16</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">done</span><span style="color: #007700">).<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">15</span><span style="color: #007700">:</span><span style="color: #0000BB">40&nbsp;&#91;1&#93;&nbsp;Preparing&nbsp;values&nbsp;to&nbsp;sort&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">33</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">done</span><span style="color: #007700">).<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">16</span><span style="color: #007700">:</span><span style="color: #0000BB">06&nbsp;&#91;1&#93;&nbsp;Preparing&nbsp;values&nbsp;to&nbsp;sort&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">49</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">done</span><span style="color: #007700">).<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">16</span><span style="color: #007700">:</span><span style="color: #0000BB">32&nbsp;&#91;1&#93;&nbsp;Preparing&nbsp;values&nbsp;to&nbsp;sort&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">66</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">done</span><span style="color: #007700">).<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">16</span><span style="color: #007700">:</span><span style="color: #0000BB">58&nbsp;&#91;1&#93;&nbsp;Preparing&nbsp;values&nbsp;to&nbsp;sort&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">83</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">done</span><span style="color: #007700">).<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">17</span><span style="color: #007700">:</span><span style="color: #0000BB">23&nbsp;&#91;1&#93;&nbsp;Preparing&nbsp;values&nbsp;to&nbsp;sort&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">99</span><span style="color: #007700">%&nbsp;</span><span style="color: #0000BB">done</span><span style="color: #007700">).<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">17</span><span style="color: #007700">:</span><span style="color: #0000BB">26&nbsp;&#91;1&#93;&nbsp;Sorted&nbsp;rows&nbsp;retrieved</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>Sorting by non-binary collations may make the buffers larger than one may expect. For example, a varchar(100) column containing <span class="caps">UTF</span>-8 characters may be sorted as:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">36</span><span style="color: #007700">:</span><span style="color: #0000BB">55&nbsp;&#91;1&#93;&nbsp;Quick&nbsp;Sort&nbsp;initialized&nbsp;</span><span style="color: #007700">for&nbsp;</span><span style="color: #0000BB">80&nbsp;rows</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2570</span><span style="color: #007700">+</span><span style="color: #0000BB">109&nbsp;bytes&nbsp;each</span><span style="color: #007700">.&nbsp;</span>
</span>
</code></div>

	<p>Sorter needs 2570 bytes to encode one wide string with less than 100-character into a comparable form. Apart of that, 109 bytes are needed to store the original value, as we need it to be displayed as a query result. Even for a large memory settings, when the <span class="caps">RAM</span> sorter buffer is 1 GB, we will have to cache the result on disk after passing just 0.3 mln of rows. The same remarks apply to <span class="caps">UTF</span>-8 (and other non-binary collations) used in <span class="caps">GROUP</span> BY / <span class="caps">DISTINCT</span>.</p>

	<p><b>Union</b></p>

	<p>Execution of <span class="caps">UNION</span> / <span class="caps">UNION</span> <span class="caps">ALL</span> also will produce log messages, indicating the algorithm used and result size:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">18&nbsp;&#91;1&#93;&nbsp;UNION</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">materializing&nbsp;components</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2011</span><span style="color: #007700">-</span><span style="color: #0000BB">03</span><span style="color: #007700">-</span><span style="color: #0000BB">02&nbsp;13</span><span style="color: #007700">:</span><span style="color: #0000BB">54</span><span style="color: #007700">:</span><span style="color: #0000BB">18&nbsp;&#91;1&#93;&nbsp;UNION</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">generating&nbsp;result&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">84&nbsp;rows</span><span style="color: #007700">).&nbsp;</span>
</span>
</code></div>

	<p><b>&#8220;Materializing components&#8221;</b> means that a temporary table must be created to store intermediate results. This step is not always needed. For <span class="caps">UNION</span> a message <b>&#8220;excluding repetitions&#8221;</b> indicates that a nontrivial operation of detecting and omitting repeated rows must be performed.</p>

	<p><b>Subqueries</b></p>

	<p>Independent (non-parameterized) subqueries or views generate their own messages when they are evaluated. If more than one &#8220;Initial execution plan&#8221; lines can be found in a log, the most probable reason is calculating a subquery.</p>

	<p>Parameterized subqueries does not display messages, as they are usually executed many times (for each value of a parameter).</p>

	<p><b>End of query</b></p>

	<p>The following messages are displayed on the end of query:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">36</span><span style="color: #007700">:</span><span style="color: #0000BB">55&nbsp;&#91;1&#93;&nbsp;Result</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">80&nbsp;rows</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">36</span><span style="color: #007700">:</span><span style="color: #0000BB">55&nbsp;&#91;1&#93;&nbsp;Total&nbsp;data&nbsp;packs&nbsp;actually&nbsp;loaded&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">approx</span><span style="color: #007700">.):&nbsp;</span><span style="color: #0000BB">1<br />2010</span><span style="color: #007700">-</span><span style="color: #0000BB">06</span><span style="color: #007700">-</span><span style="color: #0000BB">16&nbsp;15</span><span style="color: #007700">:</span><span style="color: #0000BB">36</span><span style="color: #007700">:</span><span style="color: #0000BB">55&nbsp;&#91;1&#93;&nbsp;</span><span style="color: #007700">----------------------------------------------------------------------------&nbsp;</span>
</span>
</code></div>

	<p>The number of data packs loaded during the whole query is a good approximation of the overall computing time, as decompression usually takes the most of processing time.</p>
      ]]></content>
    </entry>

    <entry>
      <title>Get an Evaluation License Key</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Get_an_Evaluation_License_Key/" />
      <id>tag:infobright.com,2011:wiki:Get an Evaluation License Key/112.671</id>
      <published>2011-10-05T19:59:32Z</published>
      <updated>2011-10-05T19:59:32Z</updated>
      <author>
            <name>dobrien</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Instructions for 30 Day <span class="caps">IEE</span> Trial Key</b></p>

	<p>1. <a href="http://support.infobright.com/Support/Downloads">Download</a> and <a href="http://www.infobright.com/Wiki/IEE_Wiki/">Install</a> the evaluation version of <span class="caps">IEE</span></p>

	<p>2. Proceed to the <a href="http://support.infobright.com/Support/License_Keys/">30 day Evaluation License Key Site</a> and follow the instructions to accept the license agreement and generate a key</p>

	<p>3. The license key will be emailed as an attachment to the address linked to your Infobright account.  The email also includes version details and the expiration date</p>

	<p><b>4. Save the iblicense[name].lic file in your top level Infobright directory:</b></p>

	<p style="padding-left:2em;"><code>Windows:  C:\Program Files\Infobright</code><br />
<code>Solaris:  /opt/infobright</code><br />
<code>Linux:    /usr/local/infobright</code></p>

	<p><b>Instructions for 30 Day <span class="caps">DLP</span> Trial Key</b></p>

	<p>1. <a href="http://support.infobright.com/Support/Downloads">Download</a> the evaluation version of <span class="caps">DLP</span></p>

	<p>2. Proceed to the <a href="http://support.infobright.com/Support/#Keys">30 day Evaluation License Key Site</a> and follow the instructions to accept the license agreement and generate a key</p>

	<p>3. The license key will be emailed as an attachment to the address linked to your Infobright account.  The email also includes version details and the expiration date</p>

	<p>4. The <span class="caps">DLP</span> license filename looks like this: iblicense-username-74270836-<span class="caps">DLP</span>.lic.</p>

	<p style="padding-left:2em;">Place the license file in the directory where <span class="caps">DLP</span> is started from.</p>

	<p>Alternatively you can add the path to the license file in your configuration file /opt/infobright/tools/distributed-load-processor/.dataprocessorc <br />
For example, assuming the license file is under the &#8220;tools&#8221; directory):<br />
eval-license    =       /opt/infobright/tools/iblicense-username-74270836-<span class="caps">DLP</span>.lic<br />
Note: The following error is logged in the log file when the license file is not found in the current directory nor from the path in the .dataprocessorc configuration file:<br />
2011-09-26 09:20:25 No LicenseFile entry in ini file. Using defaultpath.<br />
The parameter is called &#8220;eval-license&#8221;, not &#8220;LicenseFile&#8221;.  <br />
The same license file can be use for multiple installations on one or more nodes.</p>
      ]]></content>
    </entry>

    <entry>
      <title>Upgrade Guide for Solaris</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Upgrade_Guide_for_Solaris/" />
      <id>tag:infobright.com,2011:wiki:Upgrade Guide for Solaris/106.662</id>
      <published>2011-06-29T21:11:13Z</published>
      <updated>2011-06-29T21:11:13Z</updated>
      <author>
            <name>Stuart Herd</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Note:</b> These instructions are for upgrading on Solaris using <span class="caps">PKGADD</span>. <i>If the previous installation was done using the tarball package, you must upgrade using the tarball package</i> (<a href="http://www.infobright.com/Wiki/IEE_Wiki/Tar_Upgrade_Guide_for_Solaris/">See Tar Upgrade Instructions</a>).</p>

	<p><b><span class="caps">IEE</span> 4.0.3 GA &#8211; Upgrade Notes</b> </p>

	<p><b>1.</b>  Since <span class="caps">IEE</span> 3.4, several tuning parameters are now configured automatically and have been deprecated from the brighthouse.ini file. The deprecated parameters include:</p>

	<ul>
		<li>ServerCompressedHeapSize</li>
		<li>LoaderSaveThreadNumber</li>
		<li>BufferingLevel</li>
		<li>CachingLevel</li>
		<li>ClusterSize</li>
		<li>HugefileDir</li>
	</ul>

	<p><b>2.</b>  Due to a known issue with the embedded version of MySQL, it is recommended you run the MySQL Updater program after any upgrade to avoid issues with stored procedures or table structures.</p>

	<p><b>3.</b>  The enable <span class="caps">UTF</span>-8 flag (UseCharset = 0/1) is no longer needed and if present, must be removed from the brighthouse.ini file. For table structures created prior to <span class="caps">IEE</span> 3.3.1 the Charset Migration Tool (<span class="caps">CHMT</span>) should be run during upgrade.</p>

	<p><b>Solaris Upgrade Instructions Using the <span class="caps">PKG</span> Package</b> </p>

	<p>1. Obtain root user access</p>

	<p>2. Uninstall the previous version (your data will not be removed): </p>

	<p style="padding-left:2em;"><code>pkgrm infobright</code></p>

	<p>3. Install Infobright: </p>

	<p style="padding-left:2em;"><code>pkgadd -d infobright-version-solaris_x86.pkg</code></p>

	<p>4. Change to the mysql user</p>

	<p>5. Start the Infobright server: </p>

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib start</code></p>

	<p>6. Run mysql upgrade tool to upgrade data folder:</p>

	<p style="padding-left:2em;"><code>cd /opt/infobright</code><br />
<code>LD_LIBRARY_PATH=/opt/infobright/lib/mysql</code><br />
<code>export LD_LIBRARY_PATH</code><br />
<code>./bin/mysql_upgrade --defaults-file=/etc/my-ib.cnf --user=root --tmpdir=/tmp</code></p>

	<p><b>Important:</b> The MySQL Upgrade utility may display several errors regarding the use of locks with log tables and errors requiring table upgrades. The errors are all handled automatically by Infobright and/or the upgrade utility and can be ignored.</p>

	<p>7. Re-start the Infobright server:</p>

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib restart</code></p>

	<p>8. Confirm the build version as IB_4.0_r13151_13690:</p>

	<p style="padding-left:2em;"><code>/opt/infobright/bin/mysqld --version</code></p>

	<p>9.  If you are upgrading from Infobright 3.5 or earlier, run the Infobright upgrade tool. This creates stored procedures used by the DomainExpert.</p>

	<p>cd /usr/local/infobright<br />
./infobright_upgrade.sh -u &lt;user&gt; -p <br />
i.e. ./infobright_upgrade.sh -u root</p>

	<p>Usage: ./infobright_upgrade.sh [-u &lt;user&gt;] [-p ]</p>
      ]]></content>
    </entry>

    <entry>
      <title>Upgrade Guide for Windows</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Upgrade_Guide_for_Windows/" />
      <id>tag:infobright.com,2011:wiki:Upgrade Guide for Windows/123.661</id>
      <published>2011-06-29T21:08:43Z</published>
      <updated>2011-06-29T21:08:43Z</updated>
      <author>
            <name>Stuart Herd</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b><span class="caps">IEE</span> 4.0.3 GA &#8211; Upgrade Notes</b> </p>

	<p><b>1.</b>  Since <span class="caps">IEE</span> 3.4.2 GA, several tuning parameters are now configured automatically and have been deprecated from the brighthouse.ini file. The deprecated parameters include:</p>

	<ul>
		<li>ServerCompressedHeapSize</li>
		<li>LoaderSaveThreadNumber</li>
		<li>BufferingLevel</li>
		<li>CachingLevel</li>
		<li>ClusterSize</li>
		<li>HugefileDir</li>
	</ul>

	<p><b>2.</b>  Due to a known issue with the embedded version of MySQL, it is recommended you run the MySQL Updater program after any upgrade to avoid issues with stored procedures or table structures.</p>

	<p><b>3.</b>  The enable <span class="caps">UTF</span>-8 flag (UseCharset = 0/1) is no longer needed and if present, must be removed from the brighthouse.ini file. For table structures created prior to <span class="caps">IEE</span> 3.3.1 the Charset Migration Tool (<span class="caps">CHMT</span>) should be run during upgrade.</p>

	<p><b>Windows Upgrade Instructions</b> </p>

	<p>Before upgrading, be sure to read the latest release notes for any special upgrade instructions.</p>

	<p>1.  Please follow the standard <span class="caps">IEE</span> Windows installation instructions. The Install Wizard automatically detects a previous version of <span class="caps">IEE</span> and upgrades your  <span class="caps">IEE</span> installation while preserving your data and configuration settings. The install procedure automatically runs the Configuration Manager.</p>

	<p>2.  Start the Infobright server from the Start Menu items.</p>

	<p>3.  Create or ensure that the directory c:\tmp exists (necessary for step 4).</p>

	<p>4.  Run the MySQL Upgrade utility from the Windows command line:</p>

	<p>cd “C:\Program Files\Infobright\bin” <br />
mysql_upgrade.exe &#8212;defaults-file=”c:\Program Files\Infobright\my-ib.ini” -uroot &#8212;tmpdir=c:\tmp</p>

	<p><b>Important:</b> The MySQL Upgrade utility may display several errors regarding the use of locks with log tables and errors requiring table upgrades. The errors are all handled automatically by Infobright and/or the upgrade utility and can be ignored.</p>

	<p>5. Stop and start the Infobright server from the Start Menu items.</p>

	<p>6.  If you are upgrading from Infobright 3.5 or earlier, run the Infobright upgrade tool from the Windows command line. This creates stored procedures used by the DomainExpert.</p>

	<p>cd “C:\Program Files\Infobright”<br />
\Infobright-upgrade.bat -u root</p>
      ]]></content>
    </entry>

    <entry>
      <title>Upgrade Guide for Linux</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Upgrade_Guide_for_Linux/" />
      <id>tag:infobright.com,2011:wiki:Upgrade Guide for Linux/98.660</id>
      <published>2011-06-29T21:03:56Z</published>
      <updated>2011-06-29T21:03:56Z</updated>
      <author>
            <name>Stuart Herd</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p>These instructions are for upgrading using the <span class="caps">RPM</span> or <span class="caps">DEB</span> packages.  To upgrade using the Tar package, see the <a href="http://www.infobright.com/Wiki/IEE_Wiki/Tar_Upgrade_Guide_for_Linux/">Linux Tar Upgrade Instructions</a>. </p>

	<p><b><span class="caps">IEE</span> 4.0.3 GA &#8211; Upgrade Notes</b> </p>

	<p><b>1.</b>  Since <span class="caps">IEE</span> 4.0.3, several tuning parameters are now configured automatically and have been deprecated from the brighthouse.ini file. The deprecated parameters include:</p>

	<ul>
		<li>ServerCompressedHeapSize</li>
		<li>LoaderSaveThreadNumber</li>
		<li>BufferingLevel</li>
		<li>CachingLevel</li>
		<li>ClusterSize</li>
		<li>HugefileDir</li>
	</ul>

	<p><b>2.</b>  Due to a known issue with the embedded version of MySQL, it is recommended you run the MySQL Updater program after any upgrade to avoid issues with stored procedures or table structures.</p>

	<p><b>3.</b>  The enable <span class="caps">UTF</span>-8 flag (UseCharset = 0/1) is no longer needed and if present, must be removed from the brighthouse.ini file. For table structures created prior to <span class="caps">IEE</span> 3.3.1 the Charset Migration Tool (<span class="caps">CHMT</span>) should be run during upgrade.</p>

	<p><b>Linux Upgrade Instructions Using the <span class="caps">RPM</span> or <span class="caps">DEB</span> Package</b> </p>

	<p>1. Obtain root user access</p>

	<p>2. Run either: </p>

	<p style="padding-left:2em;"><code>rpm -U infobright-version-platform.rpm</code><br />
<code>dpkg -i infobright-version-platform.deb</code></p>

	<p>3. Change to the mysql user</p>

	<p>4. Start the Infobright server:</p>

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib start</code></p>

	<p>5. Run mysql upgrade tool to upgrade data folder:</p>

	<p style="padding-left:2em;"><code>cd /usr/local/infobright</code><br />
<code>./bin/mysql_upgrade --defaults-file=/etc/my-ib.cnf --user=root --tmpdir=/tmp</code></p>

	<p><b>Important:</b> The MySQL Upgrade utility may display several errors regarding the use of locks with log tables and errors requiring table upgrades. The errors are all handled automatically by Infobright and/or the upgrade utility and can be ignored.</p>

	<p>6. Re-start the Infobright server:</p>

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib restart</code></p>

	<p>7. Confirm the build version as IB_4.0_r13151_13690 :</p>

	<p style="padding-left:2em;"><code>/usr/local/infobright/bin/mysqld --version</code></p>

	<p>8. If you are upgrading from Infobright 3.5 or earlier, run the Infobright upgrade tool. This creates stored procedures used by the DomainExpert.</p>

	<p>cd /usr/local/infobright<br />
./infobright_upgrade.sh -u &lt;user&gt; -p <br />
i.e. ./infobright_upgrade.sh -u root</p>

	<p>Usage: ./infobright_upgrade.sh [-u &lt;user&gt;] [-p ]</p>
      ]]></content>
    </entry>

    <entry>
      <title>Tar Upgrade Guide for Linux</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Tar_Upgrade_Guide_for_Linux/" />
      <id>tag:infobright.com,2011:wiki:Tar Upgrade Guide for Linux/122.659</id>
      <published>2011-06-29T20:59:21Z</published>
      <updated>2011-06-29T20:59:21Z</updated>
      <author>
            <name>Stuart Herd</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b><span class="caps">IEE</span> 4.0.3 GA &#8211; Upgrade Notes</b> </p>

	<p><b>1.</b>  With <span class="caps">IEE</span> 4.0.3, several tuning parameters are now configured automatically and have been deprecated from the brighthouse.ini file. The deprecated parameters include:</p>

	<ul>
		<li>ServerCompressedHeapSize</li>
		<li>LoaderSaveThreadNumber</li>
		<li>BufferingLevel</li>
		<li>CachingLevel</li>
		<li>ClusterSize</li>
		<li>HugefileDir</li>
	</ul>

	<p><b>2.</b>  Due to a known issue with the embedded version of MySQL, it is recommended you run the MySQL Updater program after any upgrade to avoid issues with stored procedures or table structures.</p>

	<p><b>3.</b>  The enable <span class="caps">UTF</span>-8 flag (UseCharset = 0/1) is no longer needed and if present, must be removed from the brighthouse.ini file. For table structures created prior to <span class="caps">IEE</span> 3.3.1 the Charset Migration Tool (<span class="caps">CHMT</span>) should be run during upgrade.</p>

	<p><b>Linux Upgrade Instructions Using the Tar Package</b> </p>

	<p>1.    Obtain root user access </p>

	<p>2.    Unpack the tarball into a temporary folder. Use the gunzip utility for unpacking:<br />
cd /path/to/temp/<br />
gunzip &lt; /path/to/infobright-4.0.3-x86_64.tar.gz | tar xvf &#8211; </p>

	<p>3.    Stop the Infobright server:<br />
/etc/init.d/mysqld-ib stop </p>

	<p>4.    Run the install script with the “&#8212;upgrade” and “&#8212;config” flags and pass in the configuration files of the previously installed version:<br />
./install-infobright.sh  &#8212;upgrade &#8212;config=/etc/my-ib.cnf</p>

	<p>5.    Start the Infobright server and run the mysql_upgrade utility:<br />
/etc/init.d/mysqld-ib start<br />
cd /usr/local/infobright<br />
./bin/mysql_upgrade &#8212;defaults-file=/etc/my-ib.cnf &#8212;user=root &#8212;tmpdir=/tmp </p>

	<p><b>Important:</b>    The MySQL Upgrade utility may display several errors regarding the use of locks with log tables and errors requiring table upgrades. The errors are all handled automatically by Infobright and/or the upgrade utility and can be ignored.</p>

	<p>6.    Re-start the Infobright server: <br />
/etc/init.d/mysqld-ib restart</p>

	<p>7.    Confirm the build version as IB_4.0_r13151_13690:<br />
/usr/local/infobright/bin/mysqld –-version</p>

	<p>8.    If you are upgrading from Infobright 3.5 or earlier, run the Infobright upgrade tool. This creates stored procedures used by the DomainExpert.<br />
cd /usr/local/infobright<br />
./infobright_upgrade.sh -u &lt;user&gt; -p <br />
i.e. ./infobright_upgrade.sh -u root<br />
Usage: ./infobright_upgrade.sh [-u &lt;user&gt;] [-p ]</p>

	<p>9.    If you are upgrading from a version prior to <span class="caps">IEE</span> 3.3.2, you must update your table structures</p>

	<p>Updating Table Structures <b>(Versions Prior to <span class="caps">IEE</span> 3.3.2 Only)</b></p>

	<p>If you are upgrading from a version prior to <span class="caps">IEE</span> 3.3.2, you must update your table structures after upgrading <span class="caps">IEE</span>. Do <span class="caps">NOT</span> follow these instructions if you are upgrading from <span class="caps">IEE</span> 3.3.2 or higher or you may experience data corruption. If you are unsure what version of <span class="caps">IEE</span> you are using, please contact Professional Services.</p>

	<p>10.    Stop the Infobright server from the Start Menu items</p>

	<p>11.    Run the Charset Migration Tool (as user mysql):<br />
cd /usr/local/infobright<br />
./bin/chmt –datadir=/absolute/path/to/data/directory</p>

	<p>12.    Start the Infobright server from the Start Menu items.</p>
      ]]></content>
    </entry>

    <entry>
      <title>Tar Upgrade Guide for Solaris</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Tar_Upgrade_Guide_for_Solaris/" />
      <id>tag:infobright.com,2011:wiki:Tar Upgrade Guide for Solaris/121.657</id>
      <published>2011-06-29T20:49:38Z</published>
      <updated>2011-06-29T20:49:38Z</updated>
      <author>
            <name>Stuart Herd</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b><span class="caps">IEE</span> 4.0.3 GA &#8211; Upgrade Notes</b> </p>

	<p><b>1.</b>  With <span class="caps">IEE</span> 4.0.3, several tuning parameters are now configured automatically and have been deprecated from the brighthouse.ini file. The deprecated parameters include:</p>

	<ul>
		<li>ServerCompressedHeapSize</li>
		<li>LoaderSaveThreadNumber</li>
		<li>BufferingLevel</li>
		<li>CachingLevel</li>
		<li>ClusterSize</li>
		<li>HugefileDir</li>
	</ul>

	<p><b>2.</b>  Due to a known issue with the embedded version of MySQL, it is recommended you run the MySQL Updater program after any upgrade to avoid issues with stored procedures or table structures.</p>

	<p><b>3.</b>  The enable <span class="caps">UTF</span>-8 flag (UseCharset = 0/1) is no longer needed and if present, must be removed from the brighthouse.ini file. For table structures created prior to <span class="caps">IEE</span> 3.3.1 the Charset Migration Tool (<span class="caps">CHMT</span>) should be run during upgrade.</p>

	<p>To upgrade Infobright on Solaris using the tarball package:</p>

	<p>Unpack the tarball into a temporary folder. Use the gunzip utility for unpacking:<br />
cd /path/to/temp/</p>

	<p>gunzip &lt; /path/to/infobright-4.0.3-x86_64.tar.gz | tar xvf &#8211; </p>

	<p>Stop the Infobright server:<br />
/etc/init.d/mysqld-ib stop </p>

	<p>Run the install script with the “&#8212;upgrade” and “&#8212;config” flags and pass in the configuration files of the previously installed version:</p>

	<p>./install-infobright.sh  &#8212;upgrade –config=/etc/my-ib.cnf</p>

	<p>Start the Infobright server and run the mysql_upgrade utility:</p>

	<p>/etc/init.d/mysqld-ib start<br />
cd /opt/infobright<br />
LD_LIBRARY_PATH=/opt/infobright/lib/mysql<br />
export LD_LIBRARY_PATH<br />
./bin/mysql_upgrade &#8212;defaults-file=/etc/my-ib.cnf &#8212;user=root &#8212;tmpdir=/tmp </p>

	<p>Important:    <br />
The MySQL Upgrade utility may display several errors regarding the use of locks with log tables and errors requiring table upgrades. The errors are all handled automatically by Infobright and/or the upgrade utility and can be ignored.</p>

	<p>Restart the Infobright server:<br />
/etc/init.d/mysqld-ib restart</p>

	<p>Confirm the build version as IB_4.0_r13151_13690:<br />
/opt/infobright/bin/mysqld &#8212;version</p>

	<p>If you are upgrading from Infobright 3.5 or earlier, run the Infobright upgrade tool. </p>

	<p>This creates stored procedures used by the DomainExpert.<br />
cd /usr/local/infobright<br />
./infobright_upgrade.sh -u &lt;user&gt; -p <br />
i.e. ./infobright_upgrade.sh -u root<br />
Usage: ./infobright_upgrade.sh [-u &lt;user&gt;] [-p ]</p>

	<p>If you are upgrading from a version prior to <span class="caps">IEE</span> 3.3.2, you must update your table structures. </p>

	<p>If you are upgrading from a version prior to <span class="caps">IEE</span> 3.3.2, you must update your table structures after upgrading <span class="caps">IEE</span>. Do <span class="caps">NOT</span> follow these instructions if you are upgrding from <span class="caps">IEE</span> 3.3.2 or higher or you may experience data corruption. If you are unsure what version of <span class="caps">IEE</span> you are using, please contact Professional Services. </p>

	<p>Stop the Infobright server from the Start Menu items</p>

	<p>Run the Charset Migration Tool (as user mysql):<br />
cd /usr/local/infobright<br />
./bin/chmt –datadir=/absolute/path/to/data/directory</p>

	<p>Start the Infobright server from the Start Menu items</p>
      ]]></content>
    </entry>

    <entry>
      <title>Install Guide for Solaris</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Install_Guide_for_Solaris/" />
      <id>tag:infobright.com,2011:wiki:Install Guide for Solaris/104.642</id>
      <published>2011-02-01T15:46:45Z</published>
      <updated>2011-02-01T15:46:45Z</updated>
      <author>
            <name>ashr</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p>Note: These instructions are for installing <span class="caps">IEE</span> on Solaris using the <span class="caps">PKG</span> package. To install using the tarball, please see the <a href="http://www.infobright.com/Wiki/IEE_Wiki/Solaris_Tar_Install/" title="Solaris_Tar_Install">Solaris Tar Install</a> instructions. </p>

	<p><b>Important:</b> Infobright depends on the <span class="caps">SUNW</span>gccruntime package, which is installed by default on Solaris 10 u6. To ensure the package is present, run pkgchk -l <span class="caps">SUNW</span>gccruntime. If the package is not present, you can install it from your Solaris media.  If the package has been installed in a location other than the default, the LD_LIBRARY_PATH needs to be updated to point to the location of the 64bit version of the libraries.</p>

	<p><b>Important:</b> It is critical that you add sufficient physical memory swap space on Solaris or performance will be severely impacted. Recommended swap space is 10 GB for 32 GB system, 5 GB for 16 GB system and 3 GB for 8 GB system.</p>

	<p><b>Installation Instructions</b></p>

	<p>1. Download the install package (e.g. infobright-3.5-solaris10-x86_64_iee.pkg.gz) to the server where you are installing Infobright</p>

	<p>2. Obtain root user access</p>

	<p>3. Unzip the pkg file:</p>

	<p style="padding-left:2em;"><code>gunzip infobright_version_name.pkg.gz</code></p>

	<p>4. Deploy the software:</p>

	<p style="padding-left:2em;"><code>pkgadd -d infobright_version_name.pkg</code></p>

	<p>5. To change the default install options, after installation run:</p>

	<p style="padding-left:2em;"><code>/opt/infobright/postconfig.sh</code></p>

	<p>You can run this script at any time after installation to change the datadir, CacheFolder, socket, and port. The script must be run as root and Infobright must not be running.</p>

	<p>6. The installation determines the optimum memory settings based on the physical memory of the system. You may change these settings by editing the file brighthouse.ini within the data directory. </p>

	<p><b>Important:</b> The memory settings assume that there are no other services on the machine consuming significant memory. If this is not the case, please lower the memory settings for Infobright.</p>

	<p>7. To start or stop Infobright, run:</p>

	<p>8. To start or stop the Infobright server, run:</p>

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib start</code><br />
<code>/etc/init.d/mysqld-ib stop</code></p>

	<p>9. To connect to Infobright, use the script mysql-ib: </p>

	<p style="padding-left:2em;"><code>/usr/bin/mysql-ib [optional:db_name]</code></p>

	<p>10. To uninstall Infobright, run:</p>

	<p style="padding-left:2em;"><code>pkgrm infobright</code></p>
      ]]></content>
    </entry>

    <entry>
      <title>Install Guide for Linux</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.com/Wiki/IEE_Wiki/Install_Guide_for_Linux/" />
      <id>tag:infobright.com,2011:wiki:Install Guide for Linux/97.641</id>
      <published>2011-02-01T15:45:31Z</published>
      <updated>2011-02-01T15:45:31Z</updated>
      <author>
            <name>ashr</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Note:</b> These instructions are for installing <span class="caps">IEE</span> on Linux operating systems using the <span class="caps">RPM</span> or <span class="caps">DEB</span> packages.  To install using the tarball, please see the <a href="http://www.infobright.com/Wiki/IEE_Wiki/Linux_Tar_Install/" title="Linux_Tar_Install">Linux Tar Install</a> instructions.  For Solaris 10, please see <a href="http://www.infobright.com/Wiki/IEE_Wiki/Install_Guide_for_Solaris/" title="Install_Guide_for_Solaris">Install Guide for Solaris</a></p>

	<p><b>Installation Instructions</b></p>

	<p>1. Download the install package (e.g. infobright-3.5.x86_64_rpm) to the server where you are installing Infobright</p>

	<p>2. Obtain root user access</p>

	<p>3. To install the <span class="caps">RPM</span> package, run:</p>

	<p style="padding-left:2em;"><code>rpm -i infobright_version_name.rpm [optional: --prefix=path]</code></p>

	<p>To install the <span class="caps">DEB</span> package, run:</p>

	<p style="padding-left:2em;"><code>dpkg -i infobright_version_name.deb</code></p>

	<p><b>Note:</b> Please do not install Infobright in the root or home directories due to possible MySQL permission checking issues during install, start up, and/or load.</p>

	<p>4. To change the default install options, after installation run:</p>

	<p style="padding-left:2em;"><code>/usr/local/infobright/postconfig.sh</code></p>

	<p>You can run this script at any time after installation to change the datadir, CacheFolder, socket, and port. The script must be run as root and Infobright must not be running.</p>

	<p>5. The installation determines the optimum memory settings based on the physical memory of the system. You may change these settings by editing the file brighthouse.ini within the data directory. </p>

	<p><b>Important:</b> The memory settings assume that there are no other services on the machine consuming significant memory. If this is not the case, please lower the memory settings for Infobright.</p>

	<p>6. To start or stop Infobright, run:</p>

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib start</code><br />
<code>/etc/init.d/mysqld-ib stop</code></p>

	<p>7.  To connect to Infobright, use the script mysql-ib: </p>

	<p style="padding-left:2em;"><code>/usr/bin/mysql-ib [optional:db_name]</code></p>

	<p>8. To uninstall Infobright, run either:</p>

	<p style="padding-left:2em;"><code>rpm -e infobright</code><br />
<code>dpkg -r infobright</code></p>
      ]]></content>
    </entry>


</feed>