0

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

  • 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 00:59

1 Answers1

1

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.

Mitch Dempsey
  • 399
  • 3
  • 10