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??
Maybe a broken index or data table? Can you try dumping the whole table and re-inserting it in a different database?
(See extended comments and input in the comments)