The case statement is slightly different, more like this (usually with a couple of hundred ID's):
UPDATE TABLE place
SET rating = (
CASE WHEN id = 1 THEN 25
CASE WHEN id = 2 THEN 94
CASE WHEN id = 3 THEN 16
)
WHERE id IN (1, 2, 3)
Members of the Django community, myself included, have seem huge performance benefits using this technique. I had an update loop go from taking 90 seconds to 3.As a seasoned DBA you see any huge downsides with this technique? I agree that if you're updating the whole table using a CASE statement is not a great idea but if you want to update 1000 rows with differing values and you have to issue 1000 individual queries then this can take some time (including whatever overhead Django has).