I need a clarification on the mechanism of sql server fetches records
to memory (buffer)
Example: A Table ( Table1 ) having 10 Columns
(column1,column2,column3,column4 etc)
When SELECT column1,column2 FROM Table1 is executed
Whether all columns are trasnferred to the server memory from the disk
OR only column1 and column2 are read from disk to memory .
My assumption is that, entire page (8K) containg the rows with all the
colunmns are transferred to the memory and from the memory the select
columns are displayed .
Please confirm
Thanks
M A SrinivasMy assumption is that, entire page (8K) containg the rows with all the
Quote:
Originally Posted by
colunmns are transferred to the memory and from the memory the select
columns are displayed .
Correct. Keep in mind that non-clustered index pages can also be used and
are typically more dense than data pages. A composite index on column1 and
column2 will cover your query so the optimizer will probably choose to scan
that index rather than the entire table.
--
Hope this helps.
Dan Guzman
SQL Server MVP
<masri999@.gmail.comwrote in message
news:1159952825.340114.188580@.m7g2000cwm.googlegro ups.com...
Quote:
Originally Posted by
Hello,
>
I need a clarification on the mechanism of sql server fetches records
to memory (buffer)
>
Example: A Table ( Table1 ) having 10 Columns
(column1,column2,column3,column4 etc)
>
When SELECT column1,column2 FROM Table1 is executed
>
Whether all columns are trasnferred to the server memory from the disk
>
OR only column1 and column2 are read from disk to memory .
>
My assumption is that, entire page (8K) containg the rows with all the
colunmns are transferred to the memory and from the memory the select
columns are displayed .
>
Please confirm
>
Thanks
>
M A Srinivas
>
No comments:
Post a Comment