Hi all:
Switching my site from ASP Classic and MSSQL to PHP and MySQL. Something weird is going on with the following query. It is causing my mysqld.exe to spike to 99% CPU and is killing my site. Its results are about 315 records. When I set a LIMIT to 10 results, I still get the spike but after about 30 seconds the 10 results do appear. So I know the code "works" as I get results but what is causing this this spike in my mysqld.exe CPU usage?????
if ($result = mysqli_query($link, "
SELECT
ae.player,
sports.sport,
ae.promoter,
promoters.promoterFirstName,
promoters.promoterLastName,
promoters.promoterPhone,
promoters.promoterEmail,
ae.exclusive,
ae.agreementEnd,
ae.repSince,
ae.reference
FROM
sports
INNER JOIN
((ae INNER JOIN promoters ON ae.prID = promoters.prID)
INNER JOIN
players ON ae.plID = players.plID) ON sports.sportCode = players.sportCode
"))