|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Today @ 5:09 AM
Points: 415,
Visits: 1,458
|
|
Hi,
When we insert the data into a table, what happened exactly(process)?
How the data will be inserted? For any modifications sql server uses t-log right? How the t-log will be committed to data pages?
Thanks,
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Saturday, January 26, 2013 2:59 AM
Points: 199,
Visits: 240
|
|
The transaction log is used for all modifications to guarantee atomicity, durability and consistency. Read Gail's thorough article.
http://www.sqlservercentral.com/articles/Administration/64582/
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 6:22 AM
Points: 37,737,
Visits: 30,007
|
|
The transaction log records aren't committed to data pages. The data modification is made to the data pages (in memory) and then logged into the transaction log. The only time you get replay from the log is in database recovery or restores (or on the mirror DB in database mirroring).
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Today @ 5:09 AM
Points: 415,
Visits: 1,458
|
|
GilaMonster (9/25/2012) The transaction log records aren't committed to data pages. The data modification is made to the data pages (in memory) and then logged into the transaction log. The only time you get replay from the log is in database recovery or restores (or on the mirror DB in database mirroring).
The data modification is made to the data pages (in memory) and then logged into the transaction log.
That means 1. Sql server fetches the table related data pages to memory (What is the memory in this case is it RAM?) Q. How many pages will be fetched to Memory? Q2. How does server knows that the pages are related to a table?
if i am wrong can u correct me, Can you tell me the process of insertion?
Thanks alot
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 6:29 AM
Points: 13,382,
Visits: 25,178
|
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 6:22 AM
Points: 37,737,
Visits: 30,007
|
|
SQL* (9/25/2012) Q. How many pages will be fetched to Memory?
As many as are needed for the query
Q2. How does server knows that the pages are related to a table?
In short, the allocation pages (or which there are many kinds) and the system tables.
Read Kalen's book, read Paul Randal's blog.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|