SQL Locate data log files

I understand how SQL has data files and log files. Now let's say we have the recovery model set to full and transaction log backups are done every hour. People make changes to a customer record once every hour over a five hour period. Now I come along and look for data for this customer. SQL goes into the index to get the original data but then what does it do to get the msot recent version? Does it go though each transaction log file to get the final version?
Who is Participating?
SQL Server keeps a buffer of all of the changes to data for performance reasons. It writes items to the transaction log immediately, but does not write changes to the data file immediately. A checkpoint is written to the transaction log to indicate that a particular transaction has been completely written from the buffer to the data file. When SQL Server is restarted, it looks for the most recent checkpoint in the transaction log and rolls forward all transactions that have occurred from that point forward since it is not guaranteed to have been written to the data file until a checkpoint is entered in the transaction log

If the data is available (committed/checkpoint)  then it comes from the datafile. Whenever checkpoint happen the committed data is flushed from the log file to data file.

Mostly you will not touch the transaction log file when you search for the data.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.