MySQL Forums :: Performance :: insert takes too long

Advanced Search

Re: insert takes too long
Posted by: nir elbaz ()
Date: January 09, 2012 08:26AM

Hi Rick ,

First of all thanks for replaying.

About the left join without null i tryied that,but it made not diffrence

what is also wierd is when i tried to see what part of the query is problematic

i spilted it to 2:

1.create table act as
(select trim(att1),b.actor_id,trim(CONCAT(att2,att3,att4,att5,att6,att7,att8,att9,att10)) m_name
from data_stg a LEFT JOIN actors b
on trim(att1)=b.actor_name
where item_id>=240
and length(trim(att1))>0);

and it created the table in a reasnable time

but when i tried the seconde part
create table act_movie as
(selec * from act a,movies b
where a. m_name=b.imdb_title)

its takes hours and doest return

and even that the actors table is 6 time bigger than movies
and i am using left join there and here when smaller tables and
a regular joing it take longer

'act_mov', 'InnoDB', '10', 'Compact', '11045420', '89', '987758592', '0', '1261436928', '2043674624', NULL, '2012-01-08 15:06:47', NULL, NULL, 'utf8_general_ci', NULL, '', ''
'movies', 'InnoDB', '10', 'Compact', '1851033', '153', '283934720', '0', '128974848', '2043674624', '8060382', '2012-01-03 18:14:41', NULL, NULL, 'utf8_general_ci', NULL, '', ''

Options: ReplyQuote

Subject Views Written By Posted
insert takes too long 2302 nir elbaz 01/08/2012 03:10AM
Re: insert takes too long 878 Rick James 01/09/2012 01:25AM
Re: insert takes too long 891 nir elbaz 01/09/2012 08:26AM
Re: insert takes too long 616 Rick James 01/10/2012 11:48AM

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.