MySQL Forums
Forum List  »  Performance

Re: Left Join between two large tables too slow!!
Posted by: Rupinder Dhaliwal
Date: July 02, 2013 03:53AM

Hi Rick,

Thank you for the quick reply. To answer the queries:

1. I did try the 1st solution stated by you, and put the subquery in a temporary table and added indexes, but that is not something that really helped. The difference with this approach was 30 minutes initially were reduced to 12 minutes. But our application demands a response within seconds. :)
2. The third solution mentioned by you to use union all worked perfectly!!. I could get the data within seconds after removing unnecessary left joins and replacing with union all.

As to answer your query about having two separate tables, it is because of different type of data's captured in the tables. They though have the same structure and columns.For clarity, we could say one records average sunshine and other avarage rainfall...And through query we want to display both.

This was really helpful. I greatly appreciate your assistance...

Cheers! :)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Left Join between two large tables too slow!!
4219
July 02, 2013 03:53AM


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.