Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know this sounds weird, but apparently one of my columns is locked.

select * from table where type_id = 1 and updated_at < '2010-03-14' limit 1;

select * from table where type_id = 3 and updated_at < '2010-03-14' limit 10;

the first one would not finish running, while the second one completes smoothly. the only difference is the type_id

Thanks in advance for your help - i have an urgent data job to finish, and this problem is driving me crazy

share|improve this question
    
Is it possible that type_id: 1 simply has a large amount of rows in it? Perhaps the query is running, and simply has a huge amount of results to process. –  Josiah May 17 '10 at 0:59
add comment

1 Answer 1

up vote 1 down vote accepted

Why don't you look at the SHOW FULL PROCESSLIST and see what other threads are accessing the system, and kill off the ones that might be using the row.

InnoDB has row-level locking, not column level. The fact that you changed the type_id means that it has selected a different row, and that row is locked.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.