MySQL Forums
Forum List  »  General

Partitions and performance
Posted by: mahesh karipe
Date: February 06, 2014 06:28AM

Hi,

We have OLAP application and we are using MYISAM engine. We have a huge fact table (6000 K records), to improve the performance we have created an aggregated fact table but still the row count 2000K. When we do some aggregation (for sum/count) on this aggregated table, taking nearly one minute response time, this is not acceptable to the client (need this in less than 20 sec or less).

I tried with paritioning, but did not see any difference, as we need to run the query on the whole data.

sample query:

SELECT YEAR,
SUM(patCnt) PatientCount,
ROUND(AVG(CRisk), 2) CRisk,
ROUND(AVG(DRisk), 2) DRisk,
ROUND(AVG(ZRisk), 2) ZRisk,
ROUND(AVG(ARisk), 2) ARisk,
AVG(ACRisk) ACRisk
FROM (
SELECT YEAR,
ROUND(AVG(CRisk), 2) CRisk,
ROUND(AVG(DRisk), 2) DRisk,
ROUND(AVG(ZRisk), 2) ZRisk,
ROUND(AVG(ARisk), 2) ARisk,
AVG(ACRisk) ACRisk
FROM tmp_qfact_p2 ps
GROUP BY YEAR, patient_id
) temp
GROUP BY YEAR;




Please assist to imporve the same.

Thanks
Mahesh

Options: ReplyQuote


Subject
Written By
Posted
Partitions and performance
February 06, 2014 06:28AM
February 07, 2014 12:57PM
February 12, 2014 07:04AM
February 13, 2014 10:14PM
February 14, 2014 12:44AM
February 15, 2014 11:36AM
February 17, 2014 06:43AM
February 17, 2014 12:45PM
February 18, 2014 11:36AM
February 18, 2014 11:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.