You are on page 1of 22

1.

About Infobright
Infobright Overview
Thank you for choosing to install Infobright Enterprise Edition (IEE) 3.2.2. The
Infobright
Data Warehouse is a columnoriented analytic data !arehouse built on "y#$%& an
opensource
database management systems (D'"#). Infobright !as designed specifcally for large
(olume data !arehousing applications !ith up to 3)T' of data.
Infobright uses a uni*ue and patentpending approach to compressing and storing
data that
allo!s it to be installed and run on commodity hard!are !ith little or no D'+
inter(ention.
Infobright re*uires little tuning to support ad hoc or comple, business analytic
*ueries.
Infobright is a database engine utili-ing the "y#$% database en(ironment. +s such&
Infobright is fully compatible !ith all "y#$%compliant 'usiness Intelligence tools and
utili-es the "y#$% administrati(e interface to reduce the learning cur(e for system
administrators.
Infobright Enterprise Edition pro(ides a (ersatile& highlycompressed database
system
optimi-ed for analytictype *ueries. The ratio of possible compression and the speed
of data
import and retrie(al are optimi-ed at the e,pense of some transactional features of
the engine
performance& like the fre*uent data updating.
Infobright e,ecutes comple, or ad hoc *ueries across (ast amounts of data !ith a lo!
cost of
o!nership.
Infobright and MySQL
IEE 3.2.2 combines the Infobright storage engine !ith "y#$% ser(er implementation.
The Infobright ser(er consists of se(eral layers. The upper layers are pro(ided by the
"y#$%
ser(er implementation& and the lo!er layers are pro(ided by the Infobright.
Infobright includes both its o!n optimi-er and e,ecutor along !ith the storage
engine. The
"y#$% *uery engine can be used !ith the Infobright storage engine. ho!e(er& since
the
"y#$% storage engine interface is ro! oriented& it can not take full ad(antage of the
column
orientation or the /no!ledge 0rid and hence *uery e,ecution (ia this path is
reduced.
$ueries !ill be directed to the Infobright optimi-er !hene(er possible.
Infobright ships !ith the full "y#$% binaries re*uired along !ith some select other
storage
engines like "yI#+". "yI#+" is used to store catalog information (as !ith other
storage
engines) and you can use the "yI#+" instance for other purposes but 1oining "yI#+"
and
Infobright tables may result in reduced performance as the "y#$% *uery engine !ill
be
used.
2sing "yI#+" for some purposes in your !arehouse implementation can be *uite
(aluable.
#ome ET% applications !ould re*uire lots of I3#E4Ts and 25D+TEs !hich !ould be
better
suited to "yI#+". Data preparation can be done using "yI#+" and the result loaded
into
Infobright (#ee 6Design of D"% in Infobright6).
MySQL provides:
"ature connectors& tools and
resources
Interconnecti(ity and
certifcation !ith 'I Tools
"anagement ser(ices and
utilities
Infobright provides:
%oad function that compresses data
7olumnoriented storage engine
/no!ledge 0rid metadata layer that contains
information about the compressed data
8ptimi-er9e,ecutor that uses the /no!ledge
0rid
Infobright and "y#$% are integrated as sho!n belo!:
#ince other storage engines& like InnoD' and ;alcon& are not included in the
Infobright
distribution& they must be run as separate instances (e,ecutables)& from Infobright. If
you
!ish to combine other storage engines !ith Infobright& you !ill need look at a
database
federation application (some 'I tools pro(ide this).
2. Setting up Infobright
Tehnia! "e#uire$ents
'efore installing Infobright& re(ie! the follo!ing technical re*uirements.
I%&O'"I()T T*+)%I+AL "*Q,I"*M*%TS
"e#uire$ent -esription
5latforms #olaris <)
Windo!s #er(er 2))3& 2))=
4ed >at Enterprise %inu, ?
3o(el l #2#E %inu, Enterprise <)
Debian 6%enny@
7ent8# ?.2
5rocessor +rchitecture Intel ABbit
Intel 32bit (Windo!s 8nly)
+"D ABbit
+"D32bit (Windo!s 8nly)
&or .ersona! *va!uation and/or App!iation -eve!op$ent
752 #peed <.=0>- minimum
2.)0>- or faster dual or *uad core recommended
"emory 20' minimum
B0' or more recommended
&or Mu!ti0,ser *va!uation or .rodution -ep!oy$ent
752 #peed 2.)0>- minimum
2.)0>- or faster dual or *uad core recommended
"emory B0' minimum
=0' or more recommended
Linu1 for Infobright
Infobright has been optimi-ed for (arious Cfa(oursD of %inu,. While Infobright can be
run
Cout of the bo,D on any supported %inu, platform& there are a number of tuning
opportunities
to impro(e performance.
#ee +ppendi, '& 6%inu, Tuning #ettings6 for a list of tuning suggestions.
Insta!!ing Infobright
The Infobright installation packages are pro(ided as an rpm& deb& or pkg& or tarball.
The user
installing Infobright must be the root user or a user !ith the necessary permissions to
install
Ees& create the user mys*l and create the group mys*l.
Important: The installation instructions assume you do not ha(e another (ersion of
"y#$%
installed on the same ser(er. 'y default& the installation !ill use and o(er!rite
the default ports and confguration Ees for "y#$%. To install Infobright coresident
on a ser(er !ith another instance of "y#$% see 64unning "ultiple
"y#$% #er(ers on the #ame "achine@ in the MySQL 5.1 Reference Manual.
Windows Installation Instructions
<. Do!nload the package infobright3.2!inAB.e,e or infobright3.2!in32.e,e to the
Windo!s #er(er machine on !hich you are installing Infobright.
2. Double click on the infobright3.2.e,e Ee to launch the Install Wi-ard. 7lick %e1t to
continue.
3. 'y default IEE is installed in 7:F5rogram ;ilesFInfobright. To change the default
location&
either enter the folder name in the feld or click 'rowse2 to select desired install
location
on your computer. 7lick Insta!! to accept the install location.
B. 5lease !ait !hile the Install Wi-ard completes the installation.
?. 7hoose if you !ant I7E to start on completion of the installation. 7lick &inish to
complete
the installation.
A. The Install Wi-ard automatically creates IEE as a Windo!s #er(ice& !hich allo!s
the
Infobright ser(er to be started and stopped automatically !hen you boot or shutdo!n
Windo!s. If you do not !ant IEE to start on boot& open the #er(ices !indo! from the
7ontrol 5anel and change the #tartup Type for Infobright from 6+utomatic@ to
6"anual@.
G. The Install Wi-ard automatically determines the optimum memory settings based
on the
physical memory of the system. Hou may change these settings by editing the Ee
brighthouse.ini !ithin the data directory.
Important: The memory settings assume that there are no other ser(ices on the
machine
consuming signifcant memory. If this is not the case& please lo!er the memory
settings for Infobright.
#ee 64ecommended "emory 7onfgurations@ later in this chapter.
=. To uninstall IEE& select 6Infobright 2ninstall@ under the Infobright program group in
the
Windo!s #tart "enu:
#tart9+ll 5rograms9Infobright9Infobright 2ninstall
Linux Installation Instructions
".M and -.3( Insta!!
To install Infobright on %inu, using the rpm or dpkg package:
<. Do!nload the installation package from
!!!.infobright.c om9#upport9Do!nloads9
2. 8btain root user access& and run:
rpm i infobrightI(ersionIname.rpm JpreK,LpathM
or
dpkg i infobrightI(ersionIname.deb
Important: Do not install in the root or home directories due to possible "y#$%
permission
checking issues during install& start up& and9or load.
If you use the rpm pref, option& you should manually create a softlink to the
Infobright install directory from 9usr9local9infobright .
3. To change the default install options& after installation run:
9usr9local9infobright9postconKg.sh
Hou can run this script at any time after installation to change the datadir&
7ache;older&
socket& or port. The script must be run as root& and I7E must not be running.
I%&O'"I()T I%STALL O.TIO%S
.ara$eter -esription
Datadir 5ath to the directory !here tables !ill be created and stored. Use
a high-performance storage such as a RAID.
7achedir 5ath to the directory !here temporary Ees !ill be created and
stored. #hould be located on a fast dri(e& possibly not the same as
the data. +llo! at least <)) 0' of free space (depending on
database si-e).
5ort %istening port for the Infobright ser(er instance.
#ocket #ocket connection point for client connections. (The socket
connection point !ill be created during the Infobright
installation.)
B. The installation determines the optimum memory settings based on the physical
memory
of the system. Hou may change these settings by editing the Ee brighthouse.ini
!ithin the
data directory.
Important: The memory settings assume that there are no other ser(ices on the
machine
consuming signifcant memory. If this is not the case& please lo!er the memory
settings for Infobright.
#ee 64ecommended "emory 7onfgurations@ later in this chapter.
?. To uninstall Infobright& run:
rpm e infobright
or
dpkg r infobright
TA" Insta!!
To install Infobright on %inu, using the tarball package:
<. 8btain root user access
2. 7hange to the parent location in !hich you !ant to install (e.g. 9usr9local)
cd 9usr9local
Important: Do not install in the root or home directories due to possible "y#$%
permission
checking issues during install& start up& and9or load.
3. 2npack the tarball& !hich !ill create the product directory (e.g. infobright3.2p<
,=AIABIiee and create a symbolic link CinfobrightD to the product folder
gun-ip N 9path9to9infobright3.2p<,=AIABIiee.tar.g- O tar ,(f
ln s 9usr9local9infobright3.2p<,=AIABIiee infobright
cd 9usr9local9infobright
B. 4un the install script !ith the 6help@ fag to check for system confguration and
pro(ide
e,amples of directory parameters
.9installinfobright.sh Phelp
5arameters re*uired:
datadirLinfobright data folder
JdatadirL9usr9local9infobright9dataM
cachedirLinfobright cache folder
JcachedirL9usr9local9infobright9cacheM
conKgLmys*l conf Kle to be created
JconKgL9etc9myib.cnfM
portLinfobright ser(er port JportL33)AM
socketLsocket Kle to be used by this ser(er
JsocketL9tmp9mys*lib.sockM
userLuser to be created if not e,ist JuserLmys*lM
groupLuser group to be created if not e,ist JgroupLmys*lM
I%&O'"I()T +OMMA%-0LI%* .A"AM*T*"S
.ara$eter -esription
Datadir 5ath to the directory !here tables !ill be created and stored. Use
a high-performance storage such as a RAID.
7achedir 5ath to the directory !here temporary Ees !ill be created and
stored. #hould be located on a fast dri(e& possibly not the same as
the data. +llo! at least <)) 0' of free space (depending on
database si-e).
5ort %istening port for the Infobright ser(er instance.
7onfg "y#$% confguration Ee. (The confguration Ee !ill be created
!ith defaults during the Infobright installation.)
#ocket #ocket connection point for client connections. (The socket
connection point !ill be created during the Infobright
installation.)
2ser #ystem user !ho can run the infobright ser(er instance. 2ser !ill
be created if it does not e,ist. The default user is mys*l.
0roup #ystem group for the abo(e user. 0roup !ill be created if it does
not e,ist. The default group is mys*l.
?. 4un the install script again& this time !ith directory parameters. If parameters are
used
that already e,ist& an error !ill occur (for e,ample running the same script !ith
parameters t!ice)
E,ample command
.9installinfobright.sh datadirL9usr9local9infobright9data
cachedirL9usr9local9infobright9cache portL33)A conKgL9etc9myib.cnf
socketL9tmp9mys*lib.sock userLmys*l groupLmys*l Pforce
A. 7hange the default memory confguration by editing the Ee brighthouse.ini
!ithin the
data directory. #ee 64ecommended "emory 7onfgurations@ later in this chapter.
Important: It is critical that you increase the memory settings for systems running
more than
20' of physical memory or perfor$ane wi!! be severe!y i$pated.
S olaris Installation instructions
Important: Infobright depends on the #23Wgccruntime package& !hich is installed
by
default on #olaris <) uA. To ensure the package is present& run pkgchk l
#23Wgccruntime. If the package is not present& you can install it from your
#olaris media.
If the package has been installed in a location other than the default& the
%DI%I'4+4HI5+T> needs to be updated to point to the location of the ABbit
(ersion of the libraries.
.3(A-- Insta!!
To install Infobright on #olaris using pkgadd:
<. 8btain root user access& and run:
pkgadd d infobrightI(ersionIname.pkg
2. To change the default install options& after installation run:
9opt9infobright9postconKg.sh
I%&O'"I()T I%STALL O.TIO%S
.ara$eter -esription
Datadir ath to the !irectory "here ta#les "ill #e create! an! store!. Use a
highperformance
storage such as a RAID.
7achedir 5ath to the directory !here temporary Ees !ill be created and
stored. #hould be located on a fast dri(e& possibly not the same as
the data. +llo! at least <)) 0' of free space (depending on
database si-e).
5ort %istening port for the Infobright ser(er instance.
#ocket #ocket connection point for client connections. (The socket
connection point !ill be created during the Infobright
installation.)
3. The installation determines the optimum memory settings based on the physical
memory
of the system. Hou may change these settings by editing the Ee brighthouse.ini
!ithin the
data directory.
#ee 64ecommended "emory 7onfgurations@ later in this chapter.
Important: The memory settings assume that there are no other ser(ices on the
machine
consuming signifcant memory. If this is not the case& please lo!er the memory
settings for Infobright.
B. To uninstall Infobright& run:
pkgrm infobright
TA" Insta!!
To install Infobright on #olaris using the tarball package:
<. 7hange to the parent location in !hich you !ant to install (e.g. 9opt). Ensure you
ha(e
suQcient permissions to !rite to this directory.
cd 9opt
2. 2npack the tarball& !hich !ill create the product directory (e.g. infobright3.2p<
solaris<),=AIAB9)& and create a symbolic link CinfobrightD to the product folder
gun-ip N 9path9to9infobright3.2p<solaris<),=AIAB.tar.g- O tar ,(f
ln s 9opt9infobright3.2p<solaris<),=AIAB infobright
cd 9opt9infobright
3. 4un the install script !ith the 6help@ fag to check for system confguration and
pro(ide
e,amples of directory parameters
.9installinfobright.sh Phelp
5arameters re*uired:
datadirLinfobright data folder JdatadirL9opt9infobright9dataM
cachedirLinfobright cache folder JcachedirL9opt9infobright9cacheM
conKgLmys*l conf Kle to be created JconKgL9opt9infobright9myib.cnfM
portLinfobright ser(er port JportL33)AM
socketLsocket Kle to be used by this ser(er JsocketL9tmp9mys*lib.sockM
userLuser to be created if not e,ist JuserLmys*lM
groupLuser group be created if not e,ist JgroupLmys*lM
I%&O'"I()T +OMMA%-0LI%* .A"AM*T*"S
.ara$eter -esription
Datadir ath to the !irectory "here ta#les "ill #e create! an! store!. Use a
highperformance
storage such as a RAID.
7achedir 5ath to the directory !here temporary Ees !ill be created and
stored. #hould be located on a fast dri(e& possibly not the same as
the data. +llo! at least <)) 0' of free space (depending on
database si-e).
5ort %istening port for the Infobright ser(er instance.
7onfg "y#$% confguration Ee. (The confguration Ee !ill be created
!ith defaults during the Infobright installation.)
#ocket #ocket connection point for client connections. (The socket
connection point !ill be created during the Infobright
installation.)
2ser #ystem user !ho can run the infobright ser(er instance. 2ser !ill
be created if it does not e,ist. The default user is mys*l.
0roup #ystem group for the abo(e user. 0roup !ill be created if it does
not e,ist. The default group is mys*l.
B. 4un the install script again& this time !ith directory parameters. If parameters are
used
that already e,ist& an error !ill occur (for e,ample running the same script !ith
parameters t!ice)
E,ample command
.9installinfobright.sh datadirL9opt9infobright9data
cachedirL9opt9infobright9cache portL33)A conKgL9opt9infobright9myib.
cnf socketL9tmp9mys*lib.sock userLNcurrentuserDsIDR
groupLNcurrentuserDsgroupR force
Important: Ensure that you specify the current userDs ID and group for the user
and
group parameters& other!ise the default mys*l user and group !ill be used
?. 7hange the default memory confguration by editing the Ee brighthouse.ini
!ithin the
data directory. #ee 64ecommended "emory 7onfgurations@ later in this chapter.
Important: It is critical that you increase the memory settings for systems running
more than
20' of physical memory and add suQcient physical memory s!ap space on
#olaris or perfor$ane wi!! be severe!y i$pated. #ee 64ecommended "emory
7onfgurations@ later in this chapter.
Windows Upgrade Instructions
To upgrade IEE on Windo!s& please follo! the Windo!s Installation Instructions. The
Install
Wi-ard automatically detects a pre(ious (ersion of IEE and upgrades your IEE
installation
!hile preser(ing your data and confguration settings.
Linux Upgrade Instructions
".M or -.3( ,pgrade
To upgrade using the rpm or deb package& simply run the installation command and
the
package !ill automatically identify that Infobright is already installed and s!itch to
upgrade
mode. Hour confguration settings and data !ill not be changed during the upgrade.
Important: If the pre(ious installation !as done using the tarball package& you must
upgrade using the tarball package (see instructions belo!). 2pgrading from a tar
package to an 45" or DE' package !ill be supported in the upcoming 3.2 0+
release..
To upgrade Infobright on %inu, using the rpm or deb package:
<. 8btain root user access
2. 4un either:
rpm 2 infobright(ersionplatform.rpm
dpkg i infobright(ersionplatform.deb
3. #tart the Infobright ser(er:
9etc9init.d9mys*ldib start
B. 7onfrm the build (ersion as
I'I3.2.2Ir?S=<IA)<3:
9usr9local9infobright9bin9mys*ld (ersion
S olaris Upgrade Instructions
.3(A-- ,pgrade
To upgrade using pkgadd& simply run the installation command and the package !ill
automatically identify that Infobright is already installed and s!itch to upgrade mode.
Hour
confguration settings and data !ill not be changed during the upgrade.
Important: If the pre(ious installation !as done using the tarball package& you must
upgrade using the tarball package (see instructions belo!). 2pgrading from a tar
package to the 5/0 package !ill be supported in an upcoming release.
To upgrade Infobright on #olaris using the pkgadd:
<. 8btain root user access
2. 2ninstall the pre(ious (ersion (your data !ill not be remo(ed):
pkgrm infobright
3. Install Infobright:
pkgadd d infobright(ersionsolarisI,=A.pkg
B. If you are not using the default data directory& update data dir path in 9etc9my
ib.cnf.
?. #tart the Infobright ser(er:
9etc9init.d9mys*ldib start
A. 7onfrm the build (ersion as I'I3.2.2Ir?S=<IA)<3:
9opt9infobright9bin9mys*ld (ersion
TA" ,pgrade
To upgrade Infobright on #olaris using the tarball package:
<. 2npack the tarball into a temporary folder. 2se the gun-ip utility for unpacking:
cd 9path9to9temp9
gun-ip N 9path9to9infobright3.2p<solaris<),=AIAB.tar.g- O tar ,(f
2. #top the Infobright ser(er:
9etc9init.d9mys*ldib stop
3. 8(er!rite the bin9mys*ld and bin9bhloader Ees from the pre(ious installation !ith
the
upgraded (ersions in the temporary folder.
B. 7hange the o!nership and permissions on the ne! (ersions of mys*ld and
bhloader:
cd 9opt9infobright9bin
cho!n username.groupname mys*ld
cho!n username.groupname bhloader
chmod GG? mys*ld
chmod GG? bhloader
?. #tart the Infobright ser(er:
9etc9init.d9mys*ldib start
A. 7onfrm the build (ersion as I'I3.2.2Ir?S=<IA)<3:
9opt9infobright9bin9mys*ld P(ersion
+on4guring Infobright
The Infobright confguration Ee is called brighthouse.ini and is located in the data
subdirectory !ithin your Infobright installation directory. The confguration Ee is a te,t
Ee
containing the Infobright confguration parameters. #ee the Infobright installation
package
for a sample brighthouse.ini Ee.
Important: It is critical that you specify increased memory settings for systems
running more
than 20' of physical memory to ensure optimal performance.
Each parameter is sho!n on a separate line and uses the follo!ing form:
5arameter3ameLarameter$alue
If a parameter is not present in the confguration Ee or if the confguration Ee does not
e,ist&
the default (alues are used. 'lank lines and comments (lines starting !ith T) are
ignored.
'e sure to customi-e the follo!ing parameters to optimi-e performance. These
para$eters
are ase0sensitive and $ust be typed as shown.
I%&O'"I()T T,%I%( .A"AM*T*"S
.ara$eter Synta1 5a!ue -esription
#er(er"ain>eap#i-eLsi%e 3ot less than 32)
Default: A))
#i-e of the main memory heap in
the ser(er process& in "'. The
larger the heap si-e& the more
eQecti(ely the ser(er !orks.
>o!e(er& the sum of the heap
si-es in the ser(er and the loader
should not e,ceed physical
memory installed in the machine&
other!ise performance decreases
radically.
6. ,sing Infobright
Starting and Stopping the Infobright
Server
7indows
The Windo!s Install Wi-ard automatically creates I7E as a Windo!s #er(ice& !hich
allo!s
the Infobright ser(er to be started and stopped automatically !hen you boot or
shutdo!n
Windo!s.
To manually start the Infobright ser(er& from the Windo!s #tart "enu run:
#tart9+ll 5rograms9Infobright9Infobright #tart
To manually stop the Infobright ser(er& from the Windo!s #tart "enu run:
#tart9+ll 5rograms9Infobright9Infobright #top
Linu1 and So!aris
Hou can start and stop the Infobright ser(er the same !ay you !ould start and stop
the
original "y#$% ser(er (mysqld). 'efore using the Infobright ser(er& see 6#tarting and
#topping "y#$% +utomatically@ in the MySQL 5.1 Reference Manual.
Important: It is recommended that you run Infobright using "y#$% user credentials
rather
than root for security reasons.
To start the Infobright ser(er& run:
To start9stop the Infobright ser(er during system boot9shutdo!n use the mys*ldib
script in 9etc9init.d9 for start and stop ser(ices. 2se run le(el 2 3 B ? to start the
ser(ice&
and run le(el ) < A to stop.
The follo!ing are sample commands to create ser(ices:
(2buntu) updaterc.d mys*lib.ser(er start SS 2 3 B ? . stop )< ) < A .
(7ent8#) chkconKg add mys*ldib
chkconKg le(el 23B? mys*ldib on
chkconKg le(el )<A mys*ldib oQ
7or8ing with the Infobright Server
Hou can use the tools pro(ided !ith "y#$%& such as the mysql client program& !ith
the
Infobright ser(er. ;or more information& see 6Tutorial@ in the MySQL 5.1 Reference
Manual..
Hou can also use 02I tools& such as the "y#$% 'ro!ser pro(ided by "y#$% +'& to
*uery
Infobright databases in a more graphical manner. ;or more information& see the
MySQL
Query &ro"ser online documentation .
Hou can use the mysql client program to perform the follo!ing actions. ;or more
information& see 6Tutorial' in the MySQL 5.1 Reference Manual.
7indows
To connect to the I7E command line interface& run :
#tart9+ll 5rograms9Infobright9Infobright 7ommand %ine 7lient
To enable remote connections to I7E you need to grant connection permissions in
Infobright.
;rom !ithin the mys*l shell run the follo!ing grant pri(ileges commands:
mys*lR grant all pri(ileges on U.U to CrootDVClocalhostD !ith grant option.
$uery 8/& ) ro!s aQected ().)) sec)
mys*lR grant all pri(ileges on U.U to CrootDVDWD !ith grant option.
$uery 8/& ) ro!s aQected ().)) sec)
Linu1 and So!aris
If you used the standard install locations& enter the follo!ing command to connect
to
Infobright:
9usr9bin9mys*lib
If you used a diQerent install location& modify the abo(e command to point to your
socket
Ee.
When the Infobright ser(er is frst installed& an administrator account !ith no
pass!ord is
created. To connect to the administrator account& use the follo!ing command:
mys*lib
To run a script !hen connecting to the administrator account& use the follo!ing
command:
mys*lib N inputIscriptIname.t,t
;or e,ample:
mys*lib N 9tmp9testing9input.t,t
To run a script !hen connecting to the administrator account and direct all output
to a
te,t Ee& use the follo!ing command:
mys*lib N inputIscriptIname.t,t R outputIresults.t,t
;or e,ample:
mys*lib N 9tmp9testing9input.t,t R 9tmp9testing9output.t,t
During the Infobright ser(er shutdo!n process& the ser(er !ill not shut do!n until all
running commands are completed.
To force the shutdo!n of the ser(er:
/ill the mys*ld process and all running bhloader processes.
Infobright can be used !ith (irtually all 'usiness Intelligence tools and any "y#$%
02I
client tool like Toad or 3a(icat. #imply point to the I5 address and socket number for
the
Infobright ser(er& and logon using any user credentials that ha(e been set up.
9. Managing Infobright Tab!es
About the Infobright -atabase &i!es
Infobright tables are located in the data subdirectory in your Infobright installation
directory.
This is the same directory structure used for standard "y#$% databases and tables.
;or more
information& see 6Installation %ayouts@ in the MySQL 5.1 Reference Manual.
Within the data subdirectory& Infobright databases are stored in separate
subdirectories.
Within each database subdirectory& data Ees for each Infobright table are stored in
separate
subdirectories.
Important: -o not $anua!!y opy a data tab!e fro$ one database to another
by opying
the database :esXinternal table numbering errors and /no!ledge 0rid
inconsistencies may occur. To copy a table& use import and e,port commands (see
7hapter G& 6Importing and E,porting Data in Infobright@) or back up the entire
database directory (see 7hapter S& 6Infobright 'ackup and 4eco(ery@).
The Infobright ser(er uses additional directories to store temporary data& and
optimi-ation
information& such as /no!ledge 3odes. The follo!ing sho!s the data directory&
containing
the Infobright databases:
JrootVib)3 dataMT p!d
9usr9local9infobright9data
JrootVib)3 dataMT ls
'>I4#II4epository
Infobright.log
Infobright.se*
ib)3.corp.infobright.com.err
mys*l
test
About Supported -ata Types
The follo!ing data types are supported in Infobright. 3ote that 3umeric data types
ranges
are < less than the "y#$% minimums and ma,imums.
%,M*"I+ T;.*S
-ata Type Mini$u$ Ma1i$u$
TI3HI3T <2G <2G
'88%& '88%E+3 <2G <2G
#"+%%I3T 32GAG 32GAG
"EDI2"I3T =3==A)= =3==A)G
I3T (I3TE0E4) 2<BGB=3ABG 2<BGB=3ABG
'I0I3T S2233G2)3A=?BGG?=)G
S2233G2)3A=?BGG?=)G
;%8+T 3.B)2=23BAAEY3= 3.B)2=23BAAEY3=
D82'%E
(D82'%E54E7I#I83) <.GSGAS3<3B=A23<?GEY3)=
<.GSGAS3<3B=A23<?GEY3)=
DE7("& D)
(DE7I"+%("& D))
!here ) N " NL <= (<EY" P <) 9 (<EYD) (<EY" P <) 9 (<EYD)
and
) NL D NL "
-AT* A%- TIM* T;.*S
-ata Type Mini$u$ Ma1i$u$ &or$at
D+TE <)))<)< SSSS<23< HHHHmmdd
D+TETI"E <)))<)< )):)):)) SSSS<23< 23:?S:?S HHHHmmdd
>>:"":##
TI"E#T+"5 <SG))<)< )):)):)) 2)3=)<)< )):?S:?S HHHHmmdd
>>:"":##
TI"E =3=:?S:?S =3=:?S:?S >>>:"":##
HE+4 (Bdigit format only) <S)< 2<?? HHHH
ST"I%( T;.*S
-ata Type Ma1i$u$ Length
7>+4(3) 2??
Z+47>+4(3) A??32
'I3+4H(3) 2??
Z+4'I3+4H(3) A??32
TI3HTE[T 2??
TE[T(3) A??3?
+reating and -ropping Tab!es
2se the standard "y#$% commands to create and drop tables in Infobright& the same
as you
!ould !ith a "y#$% table. ;or detailed synta, information& see 6 74E+TE T+'%E #ynta,
@ and
6 D485 T+'%E #ynta, @ in the MySQL 5.1 Reference Manual.
Important: -o not $anua!!y opy a data tab!e fro$ one database to another
by opying
the database :esXinternal table numbering errors and /no!ledge 0rid
inconsistencies may occur. To copy a table& use import and e,port commands (see
7hapter G& 6Importing and E,porting Data in Infobright@) or back up the entire
database directory (see 7hapter S& 6Infobright 'ackup and 4eco(ery@).
To create a table& enter the follo!ing command:
mys*lR create table NtableInameR (Ncolumn(s)R).
To drop a table& enter the follo!ing command:
mys*lR drop table tableIname.
#ee the ne,t section& 6+bout 7olumn 8ptions&@ for information on supported and
unsupported options !hen creating columns.
Note: When creating a table& as a matter of practice one should al!ays use the
E30I3EL
option to ensure that the correct database engine is used. Infobright is shipped !ith
DE;+2%T E30I3E L '4I0>T>82#E& but this can be changed. The name of the
engine can be specifed e,plicitly at the end of create table statement:
mys*lR create table NtableInameR (Ncolumn(s)R) engineLbrighthouse.
About +o!u$n Options
32%% and 38T 32%%
Infobright supports 32%% and 38T 32%% specifcations for columns.
32%% allo!s 32%% (alues for the column.
38T 32%% replaces the imported 32%% (alues !ith default (alues such as ) (-ero) for
numeric columns and an empty string (CD) for string columns.
Lookup olumns
The Infobright #torage Engine pro(ides an additional modifer for string data type
columns&
called a lookup column. The lookup column utili-es an integer substitution for (alues.
Hou
can declare a lookup column on a 7>+4 or Z+47>+4 column to increase its compression
and
performance in *ueries. >o!e(er& to use a lookup column& the 7>+4 or Z+47>+4 column
must
meet the follo!ing criteria:
The column must ha(e less than <)&))) distinct (alues.
The column must contain a large number of duplicate (alues: the ratio of total
number of
records to distinct (alues should be greater than <).
Typically& a lookup column is useful for felds like state& gender& category& and the like
!here
the number of instances is (ery high& but the number of uni*ue (alues is (ery lo!. To
determine the ratio of records to distinct (alues& determine the number of distinct
(alues
using #E%E7T 7823T (DI#TI37T N78%2"3R) ;48"\ Then compare this to the
number of records using a #E%E7T 7823T(N78%2"3R) ;48"\
Note: 2sing a lookup on a column !here there are more than <)&))) distinct (alues
!ill
result in greatly reduced load speeds.
To declare a column as a lookup column& add the comment ]lookup] on the column.
Enter
the follo!ing command:
mys*lR create table \
(\
NNcolumn nameRR NNcolumn typeRR \ comment ]lookup] \
\)
engineLbrighthouse.
Unsupported olumn !ptions
The follo!ing column options are ignored by Infobright:
default (alues
references to other tables
Unsupported Indice s !ptions
The Infobright #torage Engine uses /no!ledge 0rid technology instead of standard
indices
and does not support e,plicit indices. The follo!ing elements of 74E+TE T+'%E synta,
related
to indices are not allo!ed:
keys
indices
uni*ue columns
autoincrement columns
+onverting Ora!e --L to Infobright
If you ha(e an e,isting 8racle schema defnition& you should do the follo!ing steps to
make
it !ork on Infobright:
7on(ert "EDI2"TE[T to Z+47>+4 (3)& !here C3D is only as large as necessary
7on(ert %830TE[T to Z+47>+4 (3)& !here C3D is only as large as necessary
7on(ert D82'%E(+&') to DE7I"+%(+&')
I3TE0E4 types may be con(erted to 'I0I3T
7on(ert Z+47>+4297>+42 to Z+47>+497>+4
+onverting SQL Server to Infobright
If you ha(e an e,isting #$% #er(er schema defnition& you should do the follo!ing
steps to
make it !ork on Infobright:
7on(ert "EDI2"TE[T to Z+47>+4 (3)& !here C3D is only as large as necessary
7on(ert %830TE[T to Z+47>+4 (3)& !here C3D is only as large as necessary
7on(ert D82'%E(+&') to DE7I"+%(+&')
I3TE0E4 types may be con(erted to 'I0I3T
37>+493Z+47>+4 should be con(erted to 7>+49Z+47>+4 unless they contain
2T;= character sets (currently not supported)
7on(ert 32"'E4 to I3TE0E4.
7on(ert 32"'E4(+&') to DE7I"+%(+&')
+onverting MySQL <MyISAM= to
Infobright
If you ha(e an e,isting "yI#+" schema defnition& you should do the follo!ing steps
to
ensure compliance !ith Infobright:
7on(ert "EDI2"TE[T to Z+47>+4 (3)& !here C3D is only as large as necessary
7on(ert %830TE[T to Z+47>+4 (3)& !here C3D is only as large as necessary
7on(ert D82'%E(+&') to DE7I"+%(+&')
I3TE0E4 types may be con(erted to 'I0I3T
5iewing Tab!e Infor$ation
Hou can use the standard "y#$% commands to obtain information about a table.
To (ie! column information& enter the follo!ing command:
#>8W J;2%%M 78%2"3# ;48" tblIname J;48" dbInameM J%I/E ]pattern]M.
;or more information& see 6#>8W 78%2"3# #ynta,@ in the MySQL 5.1 Reference
Manual.
2tili-ation of the ;2%% option !ill pro(ide an estimate of the compression for each
column
mys*lR sho! full columns from dimIcars.
YYYYYYYY
YY
O ;ield O Type O 7ollation O 3ull O /ey O Default O E,tra O 5ri(ileges O 7omment O
YYYYYYYY
YY
O makeIid O decimal(<)&)) O 32%% O HE# O O 32%% O O select&insert&update&references O #i-eJ"'M: ).<. 4atio:
<?.AB. uni*ue O
O makeIname O (archar(2?) O latin<Is!edishIci O HE# O O 32%% O O select&insert&update&references O #i-eJ"'M:
).<. 4atio: ?.)? O
O modelIname O (archar(2?) O latin<Is!edishIci O HE# O O 32%% O O select&insert&update&references O #i-eJ"'M:
).<. 4atio: <.3= O
O recordIdt O datetime O 32%% O HE# O O 32%% O O select&insert&update&references O #i-eJ"'M: ).<. 4atio: 3.=A O
YYYYYYYY
YY
B ro!s in set ().)< sec)
To (ie! the 74E+TE T+'%E statement used to create a gi(en table& enter the
follo!ing
command:
#>8W 74E+TE T+'%E tblIname.
;or more information& see 6 #>8W 74E+TE T+'%E #ynta,@ in the MySQL 5.1 Reference
Manual.
mys*lR sho! create table dimIcars.
YYY
O Table O 7reate Table O
YYY
O dimIcars O 74E+TE T+'%E ^dimIcars^ (
^makeIid^ decimal(<)&)) DE;+2%T 32%%&
^makeIname^ (archar(2?) DE;+2%T 32%%&
^modelIname^ (archar(2?) DE;+2%T 32%%&
^recordIdt^ datetime DE;+2%T 32%%
) E30I3EL'4I0>T>82#E DE;+2%T 7>+4#ETLlatin< O
YYY
< ro! in set ().)) sec)
To (ie! table information& enter the follo!ing command:
#>8W T+'%E #T+T2# J;48" dbInameM J%I/E ]pattern]M.
;or more information& see 6 #>8W T+'%E #T+T2# #ynta,@ in the MySQL 5.1 Reference
Manual.
mys*lR sho! table status like ]dimIcars].
YYYYYYYYY
YYY
O 3ame O Engine O Zersion O 4o!Iformat O 4o!s O +(gIro!Ilength O DataIlength O
"a,IdataIlength O Inde,Ilength O DataIfree O +utoIincrement O
YYYYYYYYY
YYY
O dimIcars O '4I0>T>82#E O <) O 7ompressed O B)) O << O BAG2 O ) O ) O ) O 32%% O
YYYYYYYYY
YYY
YYYYY
YY
7reateItime O 2pdateItime O 7heckItime O 7ollation O 7hecksum O 7reateIoptions O 7omment O
YYYYY
YY
2))=)=2= )?:3):BB O 2))=)B23 <B:<G:<3 O 32%% O latin<Is!edishIci O 32%% O O 8(erall
compression ratio: 3.A22 O
YYYYYYY
< ro! in set ().)< sec)
5iewing +o$pression "atio Statistis
Infobright pro(ides specifc statistics on table and column compression. The
compression
ratio is calculated in relation to the 6natural si-e@ of uncompressed data in the table
or
column. The ratio e*ual to n means that the compressed data& including statistics
and
technical description of a column& is n times smaller than its theoretical natural si-e.
The follo!ing natural si-es (in bytes) are defned for (arious data types. 3ote the
follo!ing:
;or all data types& if the column is not declared as 38T 32%%& add one bit per ro! for
32%%
indicators.
These data si-es take into account the typical format of data display& for e,ample
6yyyymm
dd@ for D+TE or decimal point for DE7. The si-e also counts the bytes that store the
actual te,t length (Z+47>+4).
The data typeDs natural si-e is appro,imately e*ual to the binary import9e,port
format.
The compression statistics are pro(ided in the table comment. ;or e,ample:
mys*lR sho! table status from test like Ct<D F0
UUUUUUUUUUUUUUUUUUUUUUU <. 4o! UUUUUUUUUUUUUUUUUUUUUU
3ame: t<
Engine: '4I0>T>82#E
Zersion: <)
4o!Iformat: 7ompressed
4o!s: 3B3)3=G
+(gIro!Ilength: )
DataIlength: )
"a,IdataIlength: )
Inde,Ilength: )
DataIfree: )
+utoIincrement: 32%%
7reateItime: 2))=)S)B <?:3<:3S
7heckItime: 32%%
2pdateItime: 2))=)S)B <?:3?:3)
7ollation: asciiIbin
7hecksum: 32%%
7reateIoptions:
7omment: 8(erall compression ratio 3S.S)=
< ro! in set ().?S sec)
Note: The most accurate means of measuring compression is to compare the si-e of
the
input Ees& used during load& to the stored si-e !ithin Infobright in order to compute
the true compression. +lternately& !hen comparing to another database& the
compression comparison should include supporting elements such as indices
"iewing olumn ompre s sion #atio Statistic s
To (ie! the compression ratio and the compressed si-e for a column& enter the
follo!ing
command:
mys*lR sho! full columns from tableIname \.
+ database name and a column Eter can be specifed in optional clauses. ;or more
information& see 6 #>8W 78%2"3# #ynta, @ in the MySQL 5.1 Reference Manual.
The compression statistics are pro(ided in the column comment. In addition to the
compression information& the comment line may also contain a 6uni*ue@ indicator &
meaning
that the column has all uni*ue (alues (e,cept nulls).
8(er time& the compression statistics may not refect the real compression if the
signifcant
use of 25D+TE and DE%ETE is made& since the compression statistics are not updated
!hen
these commands are utili-ed.
;or e,ample
>. -ata Manipu!ation
State$ents
-esign of -ML in Infobright
Infobright has been designed specifcally for data !arehousing applications& !hich are
primarily load and read applications. +lthough Infobright supports I3#E4T& 25D+TE&
and
DE%ETE& these constructs are designed for specifc use cases.
The "y#$% %oader replicates a large bulk I3#E4T function and is typically used for
loading
small (olumes of data !here the format can (ary& and !here the higher le(el of error
handling resilience is benefcial.
25D+TE is utili-ed for updating slo!ly changing dimensions. the DE%ETE function is
ideal
for the remo(al or archi(ing of older data from tables& and for the correction of in(alid
loads
(the CoopsD factor).
Infobright is not designed for 8%T5 type applications and its transaction model is
limited.
2sing Infobright for an 8%T5 solution !ill result in poor performance& and incremental
eQort
!ill be re*uired to enforce referential integrity.
I%S*"T
Infobright supports the I3#E4T statement. #ee 6I3#E4T #ynta,@ in the MySQL 5.1
Reference
Manual.
I3#E4T J%8WI54I84ITH O DE%+HED O >I0>I54I84ITHM JI0384EM
JI3T8M tblIname J(colIname&...)M
_Z+%2E# O Z+%2E` (_e,pr O DE;+2%T`&...)&(...)&...
Important: To use I3#E4T in bulk or batch load. you must set +2T878""ITL ) and
e,plicitly use 78""IT and 48%%'+7/ to complete the transaction. If you
lea(e +2T878""ITL <& then each insert !ill result in the decompression and
recompression after each insert causing (ery slo! beha(iour. 2sing e,plicit
commits& !ill ensure compression is only done once and minimi-es
decompression operations.
Inserting a $uery #esult in a %yIS&% 'able
Hou can use the I3#E4T command to insert the result of an Infobright *uery into a
"yI#+" table. Enter the follo!ing command:
+utocommitL).
insert into NmyisamItableR (NcolumnsR) select NcolumnsR from
NInfobrightItableR \.
commit.
The follo!ing e,ample sho!s the use of the I3#E4T command as described abo(e:
mys*lR drop table if e,ists temp.
$uery 8/& ) ro!s aQected ().)) sec)
mys*lR create table temp (sums int) engine L myisam.
$uery 8/& ) ro!s aQected ().)) sec)
mys*lR insert into temp (sums) select sum(i<) from tint.
$uery 8/& < ro! aQected ().)2 sec)
4ecords: < Duplicates: ) Warnings: )
mys*lR select U from temp.
YY
O sums O
YY
O =G O
YY
< ro! in set ().)) sec)
The 74E+TE T+'%E statement can be used in combination !ith a select statement to
generate a series of I3#E4Ts from one table into another. The format is as follo!s:
74E+TE T+'%E NtableInameR E30I3EL'4I0>T>82#E +# (#E%E7T \).
This !ill result in the creation and population of a ne! table based on the #E%E7T
criteria.
There are a fe! things to look out for:
+lthough the E30I3ELNengineInameR is optional& if not specifed it !ill default to
the
default E30I3E for the database.
Important: It is strongly recommended that you al!ays include the
E30I3ELNengineInameR in the 74E+TE T+'%E statement.
If the #E%E7T contains functions (for e,ample& 7837+T)& the output feld attributes
!ill
be based on the defned output of the function. In the case of concat& the feld
attribute
!ill be aggregate of the feld si-es defned in the concat.
The target column names& !here functions are used& !ill be the function name
unless an
alias is pro(ided:
7oncat(a& b) !ill result in a target column name of +onat<a? b=
7oncat(a& b) as c !ill result in a target column name of .
,.-AT*
Infobright supports the 25D+TE statement. #ee 625D+TE #ynta,@ in the MySQL 5.1
Reference
Manual.
25D+TE tblIname
#ET colIname<L_e,pr<ODE;+2%T` J& colIname2L_e,pr2ODE;+2%T`M ...
JW>E4E !hereIconditionM
J84DE4 'H ...M
J%I"IT ro!IcountM
+2T878""IT should also be turned oQ during large 25D+TE operations and the
transaction e,plicitly committed as described in the I3#E4T statement section.
25D+TE can be used to maintain slo!ly changing dimensions& but if there are
massi(e
changes to the dimension& you might consider recreating the dimension !ith an ET%
tool and
simply dropping and reloading the dimension in the !arehouse as this !ill impro(e
performance.
25D+TE should be used sparingly& if at all& on fact tables. 'esides being a
discouraged
practice in Data Warehousing& it is not an optimi-ed function: 25D+TE results in the
DE%ETE of the old record information and appending of the ne! record information to
the
data packs.
-*L*T*
Infobright supports the DE%ETE statement. #ee 6DE%ETE #ynta,@ in the MySQL 5.1
Reference
Manual.
DE%ETE ;48" tblIname
JW>E4E !hereIconditionM
J84DE4 'H ...M
J%I"IT ro!IcountM
+2T878""IT is also important for good DE%ETE performance. DE%ETE is designed to
remo(e the older data from a table and free up disk space. It should be used
sparingly to
6randomly@ delete data o(er a large fact table. This !ill ha(e signifcant performance
problems.
8ccasionally& data is incorrectly loaded to a fact table incorrectly. DE%ETE can be
used
eQecti(ely in this case to remo(e the fresh incorrect data and replace it !ith the
corrected
data.
()L)') and $uery *er+ormance
When Infobright undertakes a DE%ETE& it simply marks the record as deleted& !ithout
recomputation of corresponding elements of /no!ledge 0rid. This means that the
/no!ledge 0rid& !hen processing a *uery& can delegate a chunk of data containing
the
deleted record to be decompressed although that !as really not needed. +s more
and more
records from random locations are deleted& the *uery optimi-er may increase the
number of
data chunks to be read and decompressed& resulting in reduced performance.
Where a C>eadD or CTailD deletion is undertaken& Infobright deletes the data as abo(e.
>o!e(er& performance is not impacted negati(ely& since most of deleted data chunks
are
marked as deleted in !hole.

You might also like