Joinutility seperatorLogin utility separator Infobright.com
   
 
Slow query results ?
Posted: 30 August 2010 08:10 AM   Ignore ]  
Newbie
Rank
Total Posts:  1
Joined  2009-11-24

Dear all,

I would like to receive your thoughts, comments on the implementation I am working on.

I am using infobright with mondrian for OLAP analysis.
I was wondering if I should use the classical aproach of a star schema (ie 1 fact table and differents dimensions tables) or a unique flat table with degenerated dimensions inside.

I have chosen the second one, a unique flat table.

I have about 50 columns (varchar, int and decimal) and 90’000’000 rows.

I was expecting some better performance on simple queries generated by mondrian. For instance,

mysqlselect `fact_5`.`some_name` as `c0`, `fact_5`.`some_num` as `c1from `fact_5` as `fact_5group by `c0`, `c1order by `fact_5`.`some_nameASC;
+------+------+
c0   c1   |
+------+------+
NULL NULL 
1    |    
10   |   10 
11   |   11 
12   |   12 
13   |   13 
14   |   14 
15   |   15 
16   |   16 
17   |   17 
18   |   18 
19   |   19 
2    |    
20   |   20 
21   |   21 
22   |   22 
3    |    
4    |    
5    |    
6    |    
7    |    
8    |    
9    |    
X    |   23 
XY   |   25 
Y    |   24 
+------+------+
26 rows in set (13.05 sec

mysqlselect `fact_5`.`beset_type_name` as `c0`, `fact_5`.`beset_name` as `c1`, `fact_5`.`some_name` as `c2`, `fact_5`.`some_num` as `c3from `fact_5` as `fact_5where (`fact_5`.`some_name` = '1'group by `c0`, `c1`, `c2`, `c3order by `fact_5`.`beset_type_nameASC, `fact_5`.`beset_nameASC, `fact_5`.`some_nameASC;
..................
SRP  rz9988443    1    |    
SRP  rz9988572    1    |    
SRP  rz9988575    1    |    
SRP  rz999095     1    |    
SRP  rz999915     1    |    
+------+--------------+------+------+
27127 rows in set (44.73 sec


I don’t know if theses execution time are normal or if they should be better.


Also, here is an extract of the ddl :

CREATE TABLE  `POC_DW`.`fact_5` (
  `
beset_namevarchar(64) DEFAULT NULL COMMENT 'lookup',
  `
beset_type_namevarchar(64) DEFAULT NULL COMMENT 'lookup',
  `
some_namevarchar(8) DEFAULT NULL COMMENT 'lookup',
  `
some_numint(11) DEFAULT NULL,
   ...............
ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 

and some additionnal information :

+--------+-------------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+-----------------------------------+
Name   Engine      Version Row_format Rows     Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time         Update_time         Check_time Collation         Checksum Create_options Comment                           |
+--------+-------------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+-----------------------------------+
fact_5 BRIGHTHOUSE |      10 Compressed 88942765 |             13 |  1179572176 |               |            |         |           NULL 2010-08-30 04:40:26 2010-08-30 04:40:21 NULL       latin1_swedish_ci |     NULL |                | Overall compression ratio26.282 
+--------+-------------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+-------------------+----------+----------------+-----------------------------------+
1 row in set (0.00 sec)

+----------------------------------------------+---------------+-------------------+------+-----+---------+-------+---------------------------------+--------------------------------------+
Field                                        Type          Collation         Null Key | Default | Extra Privileges                      Comment                              |
+----------------------------------------------+---------------+-------------------+------+-----+---------+-------+---------------------------------+--------------------------------------+
set_name                                     varchar(64)   | latin1_swedish_ci YES  |     | NULL    |       | select,insert,update,references lookupSize[MB]5.5Ratio173.31 
set_type_name                                varchar(64)   | latin1_swedish_ci YES  |     | NULL    |       | select,insert,update,references lookupSize[MB]0.1Ratio999.99 
some_name                                    varchar(8)    | latin1_swedish_ci YES  |     | NULL    |       | select,insert,update,references lookupSize[MB]2.6Ratio103.88 
some_num                                     int(11)       | NULL              YES  |     | NULL    |       | select,insert,update,references Size[MB]2.6Ratio130.28         

So could you comment if theses execution time for theses queries are normal ?

 

regards,

Profile
 
Posted: 30 August 2010 09:47 AM   Ignore ]   [ # 1 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  736
Joined  2008-08-18

Hi,

Please try the same queries on the same data on other databases (MySQL/MyISAM, Oracle, ...) so we will know whether the performance is normal.

Regards,

Signature 
Profile