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

    <title type="text">ICE Wiki</title>
    <subtitle type="text">ICE Wiki</subtitle>
    <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/" />
    <link rel="self" type="application/atom+xml" href="http://www.infobright.org/wiki/Special:Recentchanges_Atom" />
    <updated>2010-03-25T20:18:47Z</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.org,2010:03:25:wiki</id>


    <entry>
      <title>Install Guide Part 2</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Install_Guide_Part_2/" />
      <id>tag:infobright.org,2010:wiki:Install Guide Part 2/10.572</id>
      <published>2010-03-25T20:18:47Z</published>
      <updated>2010-03-25T20:18:47Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p>7. Change default memory configuration by editing the file brighthouse.ini within the data directory. </p>

	<p><b>Important:</b> It is critical that you increase the memory settings for systems running more than 2GB of physical memory or performance will be severely impacted.</p>

	<p>The following table lists the parameters and some recommended values based on the amount of system memory (values are expressed in megabytes).</p>

	<table>
		<tr>
			<th>System</th>
			<th>Server Main</th>
			<th>Server Compressed</th>
			<th>Loader Main</th>
		</tr>
		<tr>
			<th>Memory</th>
			<th>Heap Size</th>
			<th>Heap Size</th>
			<th>Heap Size</th>
		</tr>
		<tr>
			<td>&#8212;&#8212;&#8212;&#8212;&#8212;-</td>
			<td>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</td>
			<td>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</td>
			<td>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</td>
		</tr>
		<tr>
			<td>64 GB</td>
			<td>48000</td>
			<td>4000</td>
			<td>800</td>
		</tr>
		<tr>
			<td>48 GB</td>
			<td>32000</td>
			<td>4000</td>
			<td>800</td>
		</tr>
		<tr>
			<td>32 GB</td>
			<td>24000</td>
			<td>4000</td>
			<td>800</td>
		</tr>
		<tr>
			<td>16 GB</td>
			<td>10000</td>
			<td>1000</td>
			<td>800</td>
		</tr>
		<tr>
			<td>8 GB</td>
			<td>4000</td>
			<td>500</td>
			<td>800</td>
		</tr>
		<tr>
			<td>4 GB</td>
			<td>1300</td>
			<td>400</td>
			<td>400</td>
		</tr>
		<tr>
			<td>2 GB</td>
			<td>600</td>
			<td>250</td>
			<td>320</td>
		</tr>
		<tr>
			<td>Default</td>
			<td>600</td>
			<td>250</td>
			<td>320</td>
		</tr>
		<tr>
			<td>.</td>
		</tr>
	</table>

	<p><b>Note:</b> The values are commented out (preceded by #) in the brighthouse.ini file, which causes them to default to the application minimum allowed values of 600, 256, and 320 respectively.</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>For details, run</p>

	<p style="padding-left:2em;"><code>bin/mysqld_safe --help</code></p>

	<p>9. To connect to Infobright server, use the script mysql-ib located in /usr/bin</p>

	<p><a href="http://www.infobright.org/wiki/Creating_the_Database_from_an_Existing_Schema/" title="Creating_the_Database_from_an_Existing_Schema">Creating the Database from an Existing Schema</a></p>
      ]]></content>
    </entry>

    <entry>
      <title>Install Guide</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Install_Guide/" />
      <id>tag:infobright.org,2010:wiki:Install Guide/9.571</id>
      <published>2010-03-25T20:18:17Z</published>
      <updated>2010-03-25T20:18:17Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Tar Package Installation Instructions</b></p>

	<p>1. <a href="http://www.infobright.org/Downloads/ICE/">Download the install package</a> (e.g. infobright-3.3-x86_64-ice.tar.gz) to the server where you are installing Infobright</p>

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

	<p>3. Change to the parent location in which you want to install (e.g. /usr/local) </p>

	<p style="padding-left:2em;"><code>cd /usr/local</code></p>

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

	<p>4. Unpack the tarball, which will create the product directory (infobright-3.3-x86_64-ice/), and create a symbolic link &#8216;infobright&#8217; to the product folder</p>

	<p style="padding-left:2em;"><code>gunzip</code> &lt; <code>/path/to/infobright-3.3-x86_64-ice.tar.gz | tar xvf -</code><br />
<code>cd /usr/local/infobright</code></p>

	<p>5. Run the install script with the <code>&quot;--help</code>&#8221; flag to check for system configuration and provide examples of directory parameters</p>

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

	<p style="padding-left:2em;"><code>Parameters required for installation -</code><br />
<code>--datadir=infobright data folder       [--datadir=/usr/local/infobright/data]</code><br />
<code>--cachedir=infobright cache folder     [--cachedir=/usr/local/infobright/cache]</code><br />
<code>--config=mysql conf file to be created [--config=/etc/my-ib.cnf]</code><br />
<code>--port=infobright server port          [--port=5029]</code><br />
<code>--socket=socket file to be used by this server [--socket=/tmp/mysql-ib.sock]</code><br />
<code>--user=user to be created if not exist         [--user=mysql]</code><br />
<code>--group=user group be created if not exist     [--group=mysql]</code></p>

	<p style="padding-left:2em;"><code>Example command</code><br />
<code>./install-infobright.sh          (install with defaults)</code><br />
<code>./install-infobright.sh --help</code><br />
<code>./install-infobright.sh --datadir=/usr/local/infobright/data --cachedir=/usr/local/infobright/cache --port=5029 --config=/etc/my-ib.cnf --socket=/tmp/mysql-ib.sock --user=mysql --group=mysql</code></p>

	<p>6. Run the install script again, this time with directory parameters. If parameters are used that already exist, an error will occur (for example running the same script with parameters twice)</p>

	<p><a href="http://www.infobright.org/wiki/Install_Guide_Part_2/" title="Install_Guide_Part_2">Install Guide Part 2</a></p>
      ]]></content>
    </entry>

    <entry>
      <title>Upgrade Guide for Windows</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Upgrade_Guide_for_Windows/" />
      <id>tag:infobright.org,2010:wiki:Upgrade Guide for Windows/105.570</id>
      <published>2010-03-25T16:49:07Z</published>
      <updated>2010-03-25T16:49:07Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Note:</b> These instructions are for upgrading on Windows XP. For upgrading on Linux platforms, please see the Linux <a href="http://www.infobright.org/wiki/Upgrade_Guide/" title="Upgrade_Guide">Upgrade Guide</a>.</p>

	<p><b>Note:</b> Due to the port to MySQL 5.1 GA, the underlying data structures have changed. Please see step 3 below on how to run the MySQL Updater to migrate your previous database to 3.1.1 during the upgrade. After upgrading to 3.1.1 you will not be able to use a 3.1.1 database with a previous versions of <span class="caps">ICE</span>. We recommend you backup your data before upgrading in case you wish to downgrade for any reason.</p>

	<p>1. Stop <span class="caps">ICE</span> using the Start Menu item.</p>

	<p>2. Follow the <a href="http://www.infobright.org/wiki/Install_Guide_for_Windows/" title="Install_Guide_for_Windows">Install Guide for Windows</a>. The Install Wizard automatically detects a previous version of <span class="caps">ICE</span> and upgrades your <span class="caps">ICE</span> installation while preserving your data and configuration settings.</p>

	<p><b>3. After installation, ensure <span class="caps">ICE</span> is running, then run the MySQL Upgrade utility from the Windows command line:</b></p>

	<p style="padding-left:2em;"><code>cd &quot;C:\Program Files\Infobright&quot;</code>  <br />
<code>.\bin\mysql_upgrade.exe --defaults-file=&quot;C:</code>&#92;Program Files&#92;Infobright&#92;my-ib.ini&#8221; <code>-uroot --tmpdir=c:\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>4. Stop and start the Infobright server from the Start Menu items.</p>
      ]]></content>
    </entry>

    <entry>
      <title>Tar Upgrade Guide</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Tar_Upgrade_Guide/" />
      <id>tag:infobright.org,2010:wiki:Tar Upgrade Guide/120.568</id>
      <published>2010-03-19T19:47:41Z</published>
      <updated>2010-03-19T19:47:41Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Upgrade Instructions for Linux Tar Packages</b></p>

	<p><b>Note:</b> Due to the port to MySQL 5.1 GA, the underlying data structures have changed. Please see step 4 below on how to run the MySQL Updater to migrate your previous database to 3.1.1 during the upgrade. After upgrading to 3.1.1 you will not be able to use a 3.1.1 database with a previous versions of <span class="caps">ICE</span>. We recommend you backup your data before upgrading in case you wish to downgrade for any reason.</p>

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

	<p>2.    Unpack the tarball into a temporary folder:</p>

	<p style="padding-left:2em;"><code>cd /path/to/temp/</code><br />
<code>gunzip</code> &lt; <code>/path/to/infobright-3.3.1-x86_64.tar.gz | tar xvf -</code><br />
<code>cd infobright-3.3.1-x86_64</code></p>

	<p>3. Stop the Infobright server:</p>

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

	<p>3. Run the install script with the <code>&quot;--upgrade” and “--config”</code> flags and pass in the configuration files of the previously installed version:</p>

	<p style="padding-left:2em;"><code>./install-infobright.sh  --upgrade --config=/etc/my-ib.cnf</code></p>

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

	<p style="padding-left:2em;"><code>/etc/init.d/mysqld-ib start</code><br />
<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>5. Re-start the Infobright server:</p>

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

	<p>6. Confirm the build version as IB_3.3.1_r6997_7017:</p>

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

    <entry>
      <title>Upgrade Guide</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Upgrade_Guide/" />
      <id>tag:infobright.org,2010:wiki:Upgrade Guide/26.548</id>
      <published>2010-01-29T15:53:19Z</published>
      <updated>2010-01-29T15:53:19Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Note:</b> These instructions are for upgrading on Linux platforms using the <span class="caps">RPM</span> or <span class="caps">DEB</span> packages. <i>If the previous installation was done using the tarball package, you must upgrade using the tarball package</i> (<a href="http://www.infobright.org/wiki/Tar_Upgrade_Guide/">See Tar Upgrade Instructions</a>). Upgrading from a tar package to an <span class="caps">RPM</span> or <span class="caps">DEB</span> package will be supported in an upcoming release.</p>

	<p><b>Note:</b> Due to the port to MySQL 5.1 GA, the underlying data structures have changed. Please see step 4 below on how to run the MySQL Updater to migrate your previous database to 3.1.1 during the upgrade. After upgrading to 3.1.1 you will not be able to use a 3.1.1 database with a previous versions of <span class="caps">ICE</span>. We recommend you backup your data before upgrading in case you wish to downgrade for any reason.</p>

	<p>For upgrading on Windows XP, please see <a href="http://www.infobright.org/wiki/Upgrade_Guide_for_Windows/" title="Upgrade_Guide_for_Windows">Upgrade Guide for Windows</a>.</p>

	<p>To upgrade Infobright on Linux using the rpm or deb package: </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. Start the <span class="caps">ICE</span> server:</p>

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

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

	<p style="padding-left:2em;"><code>cd /usr/local/inforbright</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>5. Re-start the Infobright server:</p>

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

	<p>6. Confirm the build version as IB_3.3.1_r6997_7017:</p>

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

    <entry>
      <title>Install Guide for Windows</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Install_Guide_for_Windows/" />
      <id>tag:infobright.org,2009:wiki:Install Guide for Windows/27.526</id>
      <published>2009-12-15T13:17:49Z</published>
      <updated>2009-12-15T13:17:49Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Note:</b> These instructions are for installing <span class="caps">ICE</span> 3.x on Windows XP. For Linux operating systems, please see <a href="http://www.infobright.org/wiki/Install_Guide_for_Linux/" title="Install_Guide_for_Linux">Install Guide for Linux</a>.</p>

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

	<p>1. <a href="http://www.infobright.org/Download/ICE/">Download the install package</a> infobright-3.3-win32.zip to the Windows XP machine on which you are installing Infobright</p>

	<p>2. Double click the infobright-3.3-win32.zip file to unzip the install.exe file</p>

	<p>3. Double click on the infobright-3.3-win32.exe file to launch the Install Wizard. Click <b>Next</b> to continue</p>

	<p>4. Click <b>I Agree</b> to accept the <span class="caps">GPL</span> license agreement</p>

	<p>5. By default <span class="caps">ICE</span> is installed in C:\Program Files\Infobright. To change the default location, either enter the folder name in the field or click Browse… to select desired install location on your compute. Click <b>Install</b> to accept the install location</p>

	<p>6. After the Install Wizard completes the installation, choose if you want <span class="caps">ICE</span> to start on completion of the installation. Click <b>Finish</b> to complete the installation</p>

	<p>7. To connect to the <span class="caps">ICE</span> command line interface, run:</p>

	<p style="padding-left:2em;"><code>Start/All Programs/Infobright/Infobright Command Line Client</code></p>

	<p>8. To uninstall <span class="caps">ICE</span>, select “Infobright Uninstall” under the Infobright program group in the Windows Start Menu:</p>

	<p style="padding-left:2em;"><code>Start/All Programs/Infobright/Infobright Uninstall</code></p>

	<p><b>Configuration Settings</b></p>

	<p>The install determines optimum memory settings based on the physical memory of the system. The 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 by editing the file brighthouse.ini within the data directory.</p>

	<p>The Install Wizard automatically creates <span class="caps">ICE</span> as a Windows Service, which allows the Infobright server to be started and stopped automatically when you boot or shutdown Windows. If you do not want <span class="caps">ICE</span> to start on boot, open the Services window from the Control Panel and change the Startup Type for Infobright from “Automatic” to “Manual.”</p>

	<p>To manually start the Infobright server, from the Windows Start Menu run:</p>

	<p style="padding-left:2em;"><code>Start/All Programs/Infobright/Infobright Start</code></p>

	<p>To manually stop the Infobright server, from the Windows Start Menu run:</p>

	<p style="padding-left:2em;"><code>Start/All Programs/Infobright/Infobright Stop</code></p>
      ]]></content>
    </entry>

    <entry>
      <title>Install Guide for Linux</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Install_Guide_for_Linux/" />
      <id>tag:infobright.org,2009:wiki:Install Guide for Linux/108.525</id>
      <published>2009-12-15T13:17:33Z</published>
      <updated>2009-12-15T13:17:33Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p><b>Note:</b> These instructions are for installing <span class="caps">ICE</span> 3.x 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 tar <a href="http://www.infobright.org/wiki/Install_Guide/" title="Install_Guide">Install Guide</a>. For Windows XP, please see <a href="http://www.infobright.org/wiki/Install_Guide_for_Windows/" title="Install_Guide_for_Windows">Install Guide for Windows</a>.</p>

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

	<p>1. <a href="http://www.infobright.org/Downloads/ICE/">Download the install package</a> (e.g. infobright-3.3-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 <span class="caps">ICE</span> 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 <span class="caps">ICE</span> 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 <span class="caps">ICE</span>, 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 <span class="caps">ICE</span>, 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 <span class="caps">ICE</span>, run either:</p>

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

    <entry>
      <title>Query Execution Log</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Query_Execution_Log/" />
      <id>tag:infobright.org,2009:wiki:Query Execution Log/124.513</id>
      <published>2009-11-20T18:25:36Z</published>
      <updated>2009-11-20T18:25:36Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<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><b>Maintaining the Query Execution Log</b></p>

	<p>The query execution log is located:</p>

	<ul>
		<li> in <i>bh.err</i> file in your database directory (configurable as log-error value in the <code>--</code>config file provided at installation, /etc/my-ib.cnf by default),</li>
		<li>on console, if the server is run with <code>--</code>console option</li>
	</ul>

	<p>By default, the Query Execution Log contains information on server start and shutdown, as well as values of execution parameters (from the <i>brighthouse.ini</i> file). To enable more detailed query execution logging, follow these steps:</p>

	<p>1. Open the <i>brighthouse.ini</i> configuration file, located in your database directory</p>

	<p>2. Set the following option:</p>

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

	<p>3. Restart the Infobright server to execute the change</p>

	<p>The execution log for a query may be quite large (several KBs), and the <i>bh.err</i> 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 bh.err file is available <a href="http://www.infobright.org/Downloads/Contributed-Software/">here</a></p>

	<p>Set ControlMessages = 1 to obtain a log in more compact form (without timestamps).</p>

	<p><b>Understanding Query Execution Log</b></p>

	<p>Most of the lines of the log consists of a timestamp, and a session number in a square bracket. The session number is maintained by a querying tool &#8211; 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>

	<p style="padding-left:2em;"><code>2009-05-11 14:30:10 [6] (t0): 25 all packrows, 25 to open (including 25 full)</code><br />
<code>2009-05-11 14:30:11 [2] Displaying result: 1000 rows.</code></p>

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

	<p style="padding-left:2em;"><code>2009-05-12 09:29:26 [1] T:-1 = TABLE_ALIAS(T:0)</code><br />
<code>T:-2 = TMP_TABLE(T:-1)</code><br />
<code>A:-1 = T:-2.ADD_COLUMN(TERM(t:-1 a:0),LIST,&quot;RECORDTYPE&quot;,&quot;ALL&quot;)</code><br />
<code>... </code></p>

	<p>The query is then executed by the Infobright optimizer, and each step is described in the log. Before the exact calculation, a result of rough execution is presented, including a total number of data packs, and data packs excluded by KNs. The log for a query is completed after displaying the summary of loaded and decompressed (i.e. not present in cache) data packs:</p>

	<p style="padding-left:2em;"><code>2009-05-12 09:29:26 [1] Displaying result: 20 rows.</code><br />
<code>2009-05-12 09:29:26 [1] Total data packs actually loaded (approx.): 35</code><br />
<code>2009-05-12 09:29:26 [1] ---------------------------------------------------------------------------- </code></p>

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

	<p style="padding-left:2em;"><code>Table ./mydb/clients (41) accessed by MySQL engine.</code></p>

	<p>The Infobright table was accessed by MySQL engine, instead of Infobright one. Possible reasons:</p>

	<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>All cases except the last one mean that the query will be very slow.</p>

	<p style="padding-left:2em;"><code>2009-05-29 07:41:35 [7] Warning: a big intermediate object created (~268 GB)</code></p>

	<p>This 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 &#8211; e.g. a full Cartesian join of tables with millions of rows.</p>

	<p style="padding-left:2em;"><code>2009-11-06 18:52:20 [1] Starting joiner loop (4017000000000 rows).</code></p>

	<p><b>Joiner loop</b> is the least efficient joining algorithm in Infobright (just a quadratic loop through all pairs of rows). 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>

	<p style="padding-left:2em;"><code>...WHERE t1.x + t2.y </code>&gt; <code>5... </code>&gt; <code>...WHERE t1.x </code>&gt; <code>5 - t2.y...</code></p>

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

	<p>For some long-lasting operations it is possible to forecast approximate total time basing on log:</p>

	<p style="padding-left:2em;"><code>2009-11-06 19:05:57 [1] Aggregating: 1000000000 tuples left, 0 gr. found so far</code><br />
<code>2009-11-06 19:17:59 [1] Aggregating: 864292787 tuples left, 3677031 gr. found so far</code></p>

	<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>
      ]]></content>
    </entry>

    <entry>
      <title>Tips &amp; Tricks</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Tips_%26_Tricks/" />
      <id>tag:infobright.org,2009:wiki:Tips &amp; Tricks/14.508</id>
      <published>2009-11-18T21:11:11Z</published>
      <updated>2009-11-18T21:11:11Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p>While the standard parameter settings are documented in the Install Guide, performance can be tuned based on:</p>

	<ul>
		<li>Hardware resources (available <span class="caps">RAM</span>, number of cores, etc.)</li>
		<li>Operating system &#40;Red Hat Enterprise Linux, Ubuntu, CentOS, etc.&#41;</li>
	</ul>

	<p>Based on the user’s environment, the following Tip &amp; Tricks pages discuss which parameters can be tweaked and provides guidelines for appropriate parameters values:  </p>

	<ul>
		<li><a href="http://www.infobright.org/wiki/Optimizing_Queries/" title="Optimizing_Queries">Optimizing Queries</a></li>
		<li><a href="http://www.infobright.org/wiki/How_and_When_to_use_Lookups/" title="How_and_When_to_use_Lookups">How and When to use Lookups</a></li>
		<li><a href="http://www.infobright.org/wiki/Supported_Data_Types_and_Values/" title="Supported_Data_Types_and_Values">Supported Data Types and Values</a></li>
		<li><a href="http://www.infobright.org/wiki/Efficient_Data_Types/" title="Efficient_Data_Types">Efficient Data Types</a></li>
		<li><a href="http://www.infobright.org/wiki/Optimized_SQL_Functions_and_Operators/" title="Optimized_SQL_Functions_and_Operators">Optimized <span class="caps">SQL</span> Functions and Operators</a></li>
		<li><a href="http://www.infobright.org/wiki/Knowledge_Grid_Statistics/" title="Knowledge_Grid_Statistics">Knowledge Grid Statistics</a></li>
		<li><a href="http://www.infobright.org/wiki/Query_Execution_Log/" title="Query_Execution_Log">Query Execution Log</a></li>
		<li><a href="http://www.infobright.org/wiki/Linux_Tuning/" title="Linux_Tuning">Linux Tuning</a></li>
	</ul>
      ]]></content>
    </entry>

    <entry>
      <title>Efficient Data Types</title>
      <link rel="alternate" type="text/html" href="http://www.infobright.org/wiki/Efficient_Data_Types/" />
      <id>tag:infobright.org,2009:wiki:Efficient Data Types/19.499</id>
      <published>2009-11-06T19:38:24Z</published>
      <updated>2009-11-06T19:38:24Z</updated>
      <author>
            <name>Andrew Flint</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        	<p>The following data types are identified as being more efficient within Infobright:</p>

	<p>Columns stored as integers are much more efficient (easier to sort, better described by Knowledge Nodes, etc.) than other data types. So if possible, store data as any of the following:</p>

	<p style="padding-left:2em;"><code>TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT</code><br />
<code>DECIMAL</code> &#8212; note: storing as (10,0) will be much faster than (10,5)<br />
<code>DATE, TIME</code></p>

	<p>Special case data types:</p>

	<p style="padding-left:2em;"><code>CHAR, VARCHAR</code> &#8212; these types are covered in the Knowledge Grid, but where possible should be replaced numeric values, as they are better optimized and faster to decompress</p>

	<p>Less optimized data types:</p>

	<p style="padding-left:2em;"><code>BINARY, VARBINARY</code><br />
<code>FLOAT</code><br />
<code> DOUBLE</code><br />
<code>TINYTEXT, TEXT</code></p>

	<p><acronym title="n, 0"><span class="caps">DECIMAL</span></acronym> is a different, relatively less efficient <span class="caps">PHYSICAL</span> representation of <span class="caps">INTEGER</span>. <acronym title="precision, scale"><span class="caps">DECIMAL</span></acronym> is much more efficient than <span class="caps">FLOAT</span> or <span class="caps">DOUBLE</span> and therefore, should be used in place of <span class="caps">FLOAT</span> or <span class="caps">DOUBLE</span> if possible.</p>
      ]]></content>
    </entry>


</feed>