Vincento Harris (wu*****@yahoo.com) writes:
Example
My table contains 10000 rows
If a query is run that requires a full table scan all the blocks with
data are visited.
Now
9000 rows are deleted
Next Step
Run a query that requires a full table scan and all the blocks that
ever contained data are visited (Not only the one thousand now
present)
Remedy
If the table is exported ,truncated,imported
the highest point that ever contained data is readjusted at least in
Oracle
Does this work the same in sql server?....
It sounds like what you are looking for is DBCC DBREINDEX. This commands
rebuilds all or the selected indexes for a table. Note that if you
have a clustered index on a table, the data pages are the leaf level
of that index, so DBREINDEX also caters for these. For a table that
does not have a clustered index, there is no command as far as I know
that takes care of the data pages. But it is recommendable to always
have a clustered index on a table.
An alternative is DBCC INDEXDEFRAG which can be run without locking out
other users.
Both commands are described in Books Online.
The reason that your question confused me, is that you used Oracle
terminology. In SQL Server you never talk about high-water marks,
for instance.
--
Erland Sommarskog, SQL Server MVP,
so****@algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp