MySQL Forums
Forum List  »  Performance

Performance Problems with left outer Joins
Posted by: Dietmar Freitag
Date: February 02, 2005 04:41AM

Hi, I encounter serious Performance Problems when doing a left join . I have two tables, first one has about 270 thousend and second has about 80 thousend entries. The query is as follows:
SELECT dv1 AS item_id,dv2 AS item_name,mv1 AS nr_item_impressions,mv2 AS nr_item_clicks,mv3 AS nr_items_sold,mv4 AS items_sold_value,ROUND(mv3/mv1,3) AS conversion,universalname
FROM values_table LEFT OUTER JOIN item_ml
ON values_table.time_id=item_ml.time_id AND values_table.dv1=item_ml.second_id
WHERE values_table.locale_id = 1 and values_table.report_id = 7 and values_table.time_id=20050125 and user_type =3 AND mv1>0
ORDER BY nr_item_impressions LIMIT 100

My Problem is that this query needs about 20 minutes to return a result. The same query on MS SQL Server only takes about 10 seconds. Anybody know how I can fix this issue ? Because now I'm only working on a testset, later on there will be millions of rows.
Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Performance Problems with left outer Joins
3069
February 02, 2005 04:41AM


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.