I need update row in the table only if row exists.
UPDATE table1 SET ctime = now() WHERE id = 112233;
Or with select before
IF EXISTS (SELECT 1 FROM table1 WHERE id = 112233) THEN
UPDATE table1 SET ctime = now() WHERE id = 112233;
END IF;
Which query better to reduce write operations?
For performance purpose, do I need to do SELECT before UPDATE to check row exists?