March 30, 2015 at 1:06 pm
I have been told that when you run a sql statement on a database, it doesn't actually update the table. It's committed to a log. Is this true ?
March 30, 2015 at 1:25 pm
That's right and wrong at the same time. :hehe:
Every modification to a database (in SQL Server) is part of a transaction. Each transaction (which can contain several statements) will be written to the transaction log and will be written to the disk to affect the database when the transaction is committed.
Of course, this is very simplistic, but I'm searching for the full explanation of how this happens.
March 30, 2015 at 2:59 pm
No, the data gets updated AND the log gets written. As was stated above, this is to help maintain ACID properties and it makes it possible to do point in time recovery. But both events occur. For more details on how it occurs, I'd suggest getting Kalen Delaney's book on SQL Server internals.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply