i am using infobright as my database and Mondrian as OLAP tool for my Data warehouse .
many queries generated by Mondrian are not supported by infobright optimiser. those queries are executed by MySQL optimiser only.
before infobright i have been using MySQL MYISAM database. i have used many indexes on myisam.
below is the sample query
select
`DIM_LOCATION`.`country` as `c0`,
sum((case when demo_fact.optout =1 then 1 else 0 end)) as `m0`,
sum((case when demo_fact.touch =1 then 1 else 0 end)) as `m1`,
count( `demo_fact`.`profileid`) as `m2`
from
`DIM_LOCATION` as `DIM_LOCATION`,
`demo_fact` as `demo_fact`
where
`demo_fact`.`open_location` = `DIM_LOCATION`.`emailip`
and
`DIM_LOCATION`.`country` = ‘United States’
group by
`DIM_LOCATION`.`country`
in MySQL it took 2 minutes.
but in infobright it took 15 hours.
below are the explain plans
INFOBRIGHT :
explain select `DIM_LOCATION`.`country` as `c0`, sum((case when demo_fact.optout =1 then 1 else 0 end)) as `m0`, sum((case when demo_fact.touch =1 then 1 else 0 end)) as `m1`, count(distinct `demo_fact`.`profileid`) as `m2` from `DIM_LOCATION` as `DIM_LOCATION`, `demo_fact` as `demo_fact` where `demo_fact`.`open_location` = `DIM_LOCATION`.`emailip` and `DIM_LOCATION`.`country` = ‘United States’ group by `DIM_LOCATION`.`country` ;
+——+——————-+———————+———+———————-+———+————-+———+————-+—————————————————-+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+——+——————-+———————+———+———————-+———+————-+———+————-+—————————————————-+
| 1 | SIMPLE | demo_fact | ALL | NULL | NULL | NULL | NULL | 36250 | |
| 1 | SIMPLE | DIM_LOCATION | ALL | NULL | NULL | NULL | NULL | 3359911 | Using where with pushed condition |
+——+——————-+———————+———+———————-+———+————-+———+————-+————————————————-
in MySQL myisam :
explain select `DIM_LOCATION`.`country` as `c0`, sum((case when demo_fact.optout =1 then 1 else 0 end)) as `m0`, sum((case when demo_fact.touch =1 then 1 else 0 end)) as `m1`, count(distinct `demo_fact`.`profileid`) as `m2` from `DIM_LOCATION` as `DIM_LOCATION`, `demo_fact` as `demo_fact` where `demo_fact`.`open_location` = `DIM_LOCATION`.`emailip` and `DIM_LOCATION`.`country` = ‘United States’ group by `DIM_LOCATION`.`country` ;
+——+——————-+———————+————+———————-+————-+————-+—————————————————————+———-+——————-+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+——+——————-+———————+————+———————-+————-+————-+—————————————————————+———-+——————-+
| 1 | SIMPLE | demo_fact | ALL | open_location | NULL | NULL | NULL | 36250 | |
| 1 | SIMPLE | DIM_LOCATION | eq_ref | PRIMARY | PRIMARY | 18 | TIMEINC_DATAMART.demo_fact.open_location | 1 | Using where |
+——+——————-+———————+————+———————-+————-+————-+—————————————————————+———-+——————-+
i am expecting that INFOBRIGHT database this query is not supported by infobright optimiser and then it was executed by MySQL optimiser.
but in infobriht we don’t have any indexes on tables. that’s why it may take more time.
do u have any ideas regarding my problem?
how can i solve this problem? please provide me solution.
regards
Raja K

