Forum posts for mysqld-nt.exe

What's the difference between IN and INNER JOIN in my case?

In my MySQL database, table events has a composite index with columns closingeventid, timeStart and eventCode. There are more than 21 million rows in table events.

Here is two SQLs, if I run the first one in MySQL command line, the Mem Usage of process mysqld-nt.exe increases gradually with 10 M per second, it goes up around 1.6 G then plummets to around 30 M. Then the command line returns a Out of Memory exception.

But, it's ok if I use the second SQL, with INNER JOIN instead of IN. It seems IN clause doesn't hit any index.

Why? Any idea to monitor MySQL execution process like execution plan of MS SQL?

SELECT COUNT(*) AS 'cnt'
FROM events
WHERE
(timeStart < '2010-09-22 14:29:10’)
AND (closingeventid IS NULL)
AND (eventcode IN (SELECT DISTINCT evtcclosed FROM eventclose))`


VS

SELECT COUNT(1) AS 'cnt'
FROM events
inner join
(SELECT DISTINCT evtcclosed FROM eventclose) ec
ON ec.evtcclosed = events.eventcode
WHERE (timeStart < '2010-09-22 14:29:10’) AND (closingeventid IS NULL)

View complete forum thread with replies

Other posts related to mysqld-nt.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

mysqld-nt.exe exist in task list,but actually it&#39;s not running?
taskkill Mysql from .ASPX &mdash; Permission Problems?
how to get around The &#39;--&#39; operator works only on variables or on properties
MySQL stops working every five to six hours
Mysql server not starting in xampp
recover data using ibdata1 file mysql
Getting error 2003 when trying to connect to MySQL server after reboot
What&#39;s the difference between IN and INNER JOIN in my case?

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.