This is an old revision of the document!
Grids are an Omnidex feature that allows very fast retrieval on large volume data.
Partitioning the SIMPLE database
Upartitioned tables: countries, states, genders
Partitioned tables: Household
Households partitioned by STATE INDIVIDUALS partitioned by HOUSEHOLD, correlated to the HOUSEHOLDS table.
Partition by state plus first initial of last name
The dominant parent dictates the partitioning approach used for all the children.
Every query that comes in to the grid controller is only sent to the nodes that are needed to satisfy the query.
An Omnidex Grid Environment File is created using the same statements as a standard Omnidex Environment:
However, there are additional clauses that are declared.
There is a single Omnidex Environment catalog.
create environment "SIMPLE_ENV"
max_threads 2
node "NODE01" partitioned
node "NODE02" partitioned
in "SIMPLEGRID.XML"
with delete;
create environment "simple_env"
max_threads 2
node "NODE01"
create database "SIMPLE"
node "NODE01"
type flatfile
index_directory "IDX\SIMPLE1_"
node "NODE02"
type flatfile
INDEX_DIRECTORY "idx\simple_"
create table "HOUSEHOLDS"
node "NODE01"
physical "DATA\HOUSEHOLDS01.DAT"
partition_by "STATE IN ('NY', 'PR', 'MA',
'PA', 'DE') AND
zip BETWEEN '01000' AND '349999' "
node "NODE02"
PHYSICAL "DAT\HOUSEHOLDS02.DAT"
PARTITION_BY "STATE IN ('IN', 'MI', 'IA', 'WI', 'MN', 'SD', 'ND') AND
ZIP BETWEEN '46000' AND '99999'"
( <COLUMN DECLARATIONS> )
use more partitions when most queries contain the partition qualifier.
user fewer partitions when most queries do not containe the partition qualifier.
Consider using partitions for archived data.
Generally best to have a CPU core available for each partition.
Rule of thumb: start with 4-8 partitions and adjust accordingly.
1. Export the data into the partitioned flat of rdelimited data files using Omnidex SQL.
odxsql> export (select_statement) to filename
2. Export the data into partitioned data files using a relational database or an ETL tool.
Since some queries do get localized to some nodes, that sames time and even if a query has to touch all nodes, the processing of multiple smaller queries is still better than the processing of the single large query.