PHP - MySQL - Select runs indefinitely
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-11T20:24:35Z
Indexed on
2010/04/11
20:33 UTC
Read the original article
Hit count: 198
I have three tables
listings: id, pid, beds, baths, etc, etc, etc, db
locations: id, pid, zip, lat, lon, etc, etc, etc, db
images id, pid, height, width, raw, etc, etc, db
id, pid & db are indexed. db just references the mls provider a particular item came from. in images the raw column holds raw image data
there are about 15k rows in listings/locations, and about 120k rows in images so there are multiple rows that have the same pid.
when i do "select pid from listings" or "select pid from locations" the query completes successfully in about 100ms.
when i do "select pid from images" it just hangs in sqlyog and never completes... i was thinking since the raw column contains alot of information that it might be trying to select that too, but my query doesn't try to select that so I can't imagine why it's taking so long...
any idea why this is happening??
© Stack Overflow or respective owner