2k rows update is very slow in MySQL
Posted
by sergeik
on Stack Overflow
See other posts from Stack Overflow
or by sergeik
Published on 2010-04-20T10:01:29Z
Indexed on
2010/04/20
10:03 UTC
Read the original article
Hit count: 188
Hi all, I have 2 tables: 1. news (450k rows) 2. news_tags (3m rows)
There are some triggers on news table update which updating listings. This SQL executes too long...
UPDATE news
SET news_category = some_number
WHERE news_id IN (SELECT news_id
FROM news_tags
WHERE tag_id = some_number); #about 3k rows
How can I make it faster?
Thanks in advance, S.
© Stack Overflow or respective owner