Hi,

I have two tables:
whenever I tried doing this select, mysql would hang 
indefinitely trying to resolve it or at least took
toooo long I would rather shutdown the whole machine.

SELECT m.username, m.class, u.password
FROM masterlist m, user u
WHERE m.class <> '' LIMIT 20;

However, when I include "u.username = m.username" in
the WHERE field, it immediately produces the result
in 0.0x seconds.

Why does it hang on the 1st case? was it because there
were cases wherein a row in masterlist is not present
in user list that's causing it to croak?

Jaime


mysql> describe masterlist;
+----------+----------------------+
| Field    | Type                 |
+----------+----------------------+
| username | char(8)              |
| class    | char(8)              |
+----------+----------------------+

mysql> describe user;
+------------+--------------+
| Field      | Type         |
+------------+--------------+
| username   | varchar(20)  |
| password   | varchar(20)  |
+------------+--------------+


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to