MySQL Forums
Forum List  »  InnoDB

Re: high concurency issue with read-write on mysql table
Posted by: soufiane wahi
Date: June 14, 2017 06:42AM

I tried to use Delete chunk's but the script on the link won't work:

set @a = 0
LOOP
DELETE FROM tbl
WHERE id BETWEEN @a AND @a+999
AND ts < DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
SET @a = @a + 1000
sleep 1 -- be a nice guy
UNTIL end of table

It told me 'Syntax error ...' near LOOP.

I tried to do it on stored routines but I got the same error.

what's wrong with that script?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: high concurency issue with read-write on mysql table
104
June 14, 2017 06:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.