MySQL Forums
Forum List  »  Performance

Re: INSERT SELECT LIMIT very very slow
Posted by: Mohammad Azmath
Date: February 09, 2005 12:16AM

As you are usning JOIN state it takes hell lot of time with below values;


Volume and indexes :
Table 1 : 2 000 000 rows (index : col1 and last_update)
Table 2 : 1000 rows (index : col1)

Server has to work on

Step 1)
2000000 * 1000 = 2000000000 Records

Step 2)
It has make temporay tables based on "ON" condition
(using index tables then to original tables

Step 3)

Then checks for "WHERE" conditions.


Solution for this could be Query without a join.
Try to work on SELF JOIN it helps


All the best :)

Options: ReplyQuote


Subject
Views
Written By
Posted
4289
February 07, 2005 08:05AM
Re: INSERT SELECT LIMIT very very slow
2208
February 09, 2005 12:16AM


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.