Re: MySQL performs very very slow
Posted by:
Rob Drake
Date: February 21, 2005 01:41AM
I've run the same query with the latest 4.1.10-nt and it takes the same time to run the query give or take a few seconds but it;s round about 2 minutes. So it's not with 5.0. as i thought initially.
Actually i run the query in MsAccess 2000 using old-stly syntax - you know what i mean -
this is new style - using inner join -it's okay for SQL Server 2000 and mySQL
select learnercode,language,lastname,left(firstname,1) as 'in',gradecode as grade,
disciplinesnamelang2 as 'Detail'
from learners as a
inner join disciplinesaudit as b
on learnercode=auditlearnercode
inner join disciplines as c on b.disciplinescode=c.disciplinescode order by gradecode,learnercode;
this is old style using the and operator - if i use new style in access it returns a syntax error . the query takes 1.00 seconds.
SELECT a.firstname, a.lastname, b.*, c.*, d.firstname, d.lastname
FROM learners AS a, disciplinesaudit AS b, disciplines AS c, teachers AS d
WHERE a.learnercode=b.auditlearnercode
and c.disciplinescode = b.disciplinescode
and b.auditteachercode = d.teachercode
ORDER BY gradecode, learnercode, auditdate;
So now i'm not too sure where to go from here - it's a standard installation - so am i doing something wrong in the installation- is there something i need to optimise??
Rob