MySQL Forums
Forum List  »  General

Re: select over a table joing two others via same column is very slow
Posted by: Gunnar Beister
Date: March 06, 2015 04:38AM

Hi,

thanks a lot for the quick answer.
An "inner join" didn't help.
Here the outcome of the "Explain Extended":

id,select_type,table,type,possible_keys,key,key_len,ref,rows,filtered,Extra
1 ,SIMPLE,t2,ALL,NULL,NULL,NULL,NULL,31851,100.00,Using temporary; Using filesort
1 ,SIMPLE,t3,ALL,NULL,NULL,NULL,NULL,35635,100.00,Using where; Using join buffer
1 ,SIMPLE,t1,eq_ref,PRIMARY,PRIMARY,4,d018e5d5.t3.ref_article,1,100.00,Using where

here the output for show create table "articles":

CREATE TABLE `articles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`price` double(11) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `title_2` (`title`)
) ENGINE=MyISAM AUTO_INCREMENT=35679 DEFAULT CHARSET=utf8

for ean_map:

CREATE TABLE `ean_map` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ean` varchar(30) NOT NULL,
`ref_article` int(15) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31852 DEFAULT CHARSET=utf8

for isbn_map:
CREATE TABLE `isbn_map` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ref_article` int(15) NOT NULL,
`isbn` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=35636 DEFAULT CHARSET=utf8

Options: ReplyQuote




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.