Hi All,
I am using MyISAM storage engine for 2 of the tables in my application
so as to use the full text search features. When I join any one of the
MyISAM table with other INNODB table, the query is very fast. But, if I
do inner join with both theMyISAM table, then the query takes 5 mins to
execute.
Here is the query: The employment_summary and executive_summary tables
are MyISAM type.
select SQL_CALC_FOUND_ROWS distinct(exec1.id) as id, exec1.firstName as
firstName, exec1.middleName as middleName, exec1.lastName as lastName,
exec1.age as age from executive as exec1
inner join (select emp.id as empId, emp.executive_id as execId,
emp.active as active, emp.shortTitle as shortTitle, emp.director as
director
from employment as emp
inner join (select * from employment_summary where ((
MATCH(job_description) AGAINST(' +University +of +Pennsylvania' IN
BOOLEAN MODE)))) as empSummary
on (empSummary.id = emp.id)
inner join (target_company targetComp
inner join company comp on
(targetComp.company_id = comp.id )) on ( emp.company_id =
targetComp.company_id )
inner join (select id from executive_summary where ((
MATCH(firstName) AGAINST(' +John' IN BOOLEAN MODE)))) as execSummary
on execSummary.id = emp.executive_id ) as res
on ( res.active = 1 and res.execId=exec1.id)
order by lastName, firstName, id limit 0,200
Any ideas?
Thanks,
Harini
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]