MySQL Forums
Forum List  »  Performance

Performance Problem - how to tune a query?
Posted by: Daniel Fricke
Date: October 31, 2005 08:38AM

Hi @All!

I´m facing a problem with an query running on MySQL 4.0.21. The following query takes on a P4, 1GB RAM, WinXP (my testing environment) about 38 seconds:

SELECT HIGH_PRIORITY
c.customer_name AS 'customer',
c.customer_freevolume AS 'freevolume',
c.customer_price_per_gb AS 'pricePerGB',
c.customer_currency AS 'currency',
ROUND(((SUM(d.data_recievedbytes) + sum(d.data_sendbytes))/1024/1024/1024),3) AS 'traffic',
ROUND(((SUM(d.data_recievedbytes) + sum(d.data_sendbytes))/1024/1024/1024),3) - c.customer_freevolume AS 'billedTraffic'
FROM billing_data d, billing_customer c
WHERE data_starttime LIKE '200510%'
AND MID(d.data_site,3,3) = c.customer_short
GROUP BY c.customer_name

Any ideas how to speep up this query?

Greetings,

Daniel!

Options: ReplyQuote


Subject
Views
Written By
Posted
Performance Problem - how to tune a query?
2787
October 31, 2005 08:38AM
1221
November 02, 2005 01:42AM
1221
November 03, 2005 08:10PM


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.