When running UPDATE ... datetime = NOW(); will all rows updated have the same date/time?

Posted by Darryl Hein on Stack Overflow See other posts from Stack Overflow or by Darryl Hein
Published on 2008-10-12T07:08:15Z Indexed on 2010/05/03 8:58 UTC
Read the original article Hit count: 158

Filed under:
|
|
|

When you run something similar to:

UPDATE table SET datetime = NOW();

on a table with 1 000 000 000 records and the query takes 10 seconds to run, will all the rows have the exact same time (minutes and seconds) or will they have different times? In other words, will the time be when the query started or when each row is updated?

I'm running MySQL, but I'm thinking this applies to all dbs.

© Stack Overflow or respective owner

Related posts about sql

Related posts about time