My script is:
--drop table mytbl
--create clustered index iii on mytbl(x)
The result is:
Table 'mytbl'. Scan count 1, logical reads 17, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
1. Why do I get 17 logical reads? an integer is 4 bytes. a data page is 8000 bytes. I have 10 thousand records times 4 bytes means 40 thousands bytes which fits to 5 data pages. why are there 12 extra logical reads? (ok there
might be additional haeder and footer to the data page but that shouldn't get to an extra 12 pages)
2. why are there no physical reads? It's the first time i read from this table. Was the table stored in the cash when I inserted it? was it actually written to the disk data pages?
3. How can I know what data pages are currenctly stored in the buffer cache? (of which tables/indices)?
4. Is there a logical/physical writes couter?
5. When I add the clustered index I get 19 logical reads - why is that?
View Complete Post