Ok,
then do the following:
Check how full the disks are with "df -m"
Check how system resources and server load look like with "top".
Check if there are any network error with "ifconfig" (if web server and MySQL server are on different machines).
Check that with and without hanging query. Besides that, there are some limit settings but have first to check which ones could cause the problems. But I think that you should get an error message if you hit any limit. The script shouldn't just hang in that case.
Additionally, check the mysql error log and the web server error log for any error messages.
Which PHP and MySQL versions do you use ?
How is MySQL set up regarding the buffer and cache sizes (/etc/my.cnf).
EDIT: What happens, if you execute the query with a limit of e.g. 100 on the mysql console ?
Thomas