473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Is there a High water Mark in sql server

If you delete rows in a table and do a full table scan...
Is that supposed to read up to the highest block/extent that the
table ever attended.(like in some databases I use)
If so what is the best way to take care of such tables in sql server.

I appreciate your responses

Vince
Jul 20 '05 #1
4 12926
Vincento Harris (wu*****@yahoo.com) writes:
If you delete rows in a table and do a full table scan...
Is that supposed to read up to the highest block/extent that the
table ever attended.(like in some databases I use)
If so what is the best way to take care of such tables in sql server.


I'm afraid that I don't understand the question. Could you exemplify what
you are looking for?
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
Erland Sommarskog <so****@algonet.se> wrote in message news:<Xn********************@127.0.0.1>...
Vincento Harris (wu*****@yahoo.com) writes:
If you delete rows in a table and do a full table scan...
Is that supposed to read up to the highest block/extent that the
table ever attended.(like in some databases I use)
If so what is the best way to take care of such tables in sql server.


I'm afraid that I don't understand the question. Could you exemplify what
you are looking for?


Sorry
I hope this is in some clarifies the earlier post.
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?....

Will appreciate your responses
Vince
Jul 20 '05 #3
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
Jul 20 '05 #4
> 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.


Right. SQL Server has a totally different internal structure than
Oracle has. In SQL Server, a table is basically a big linked-list and
the data blocks are essentially the leaf-blocks of the cluster index.
Those blocks are then doubly-linked back and forth so you can traverse
the table in a full table scan or in an index range scan. In fact, an
index range scan of the whole table is essentially (physically) the
same as a full table scan. I'm not sure exactly why, but SQL Server
has always had trouble with corruption of these link-list pointers.
Run DBCC to check (and fix) problems with these pointers.
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sql-db2-dba | last post by:
When I did db2batch to benchmark a query, it performance details came back with this reading ... "High water mark for database heap = 4291373408" Does this mean it would have caused memory...
1
by: Erik Hendrix | last post by:
Hi, I have some questions related to stripe sets that I'm hoping someone here can answer. 1) What happens to stripe sets when doing a database restore? Do they stay as is? 2) What happens...
1
by: bwmiller16 | last post by:
Folks - I'm seeing this warning on the log...I'm curious if it has a more sinister meaning than what's expressed here. It seems to me that if IBM wants me to know about this then there might be...
4
by: Patrick | last post by:
I have a tablespace that contains the LOB data for 3 tables which exist in other tablespaces. Even after reorging the LOB tablespace with the LONG option, the high water mark is still too high. I...
1
by: Asphalt Blazer | last post by:
How can you reduce high water mark of a DMS tablespace? I have tablespace quite huge, but I dont need it thatt size anymore. There is no way though to reduce the ts size as the highwater mark is...
0
by: Ntsakane | last post by:
guys,im new in db2 and im seeing sth called High Water mark. what is it.how does it impact the database and what isthe recommended HWM???
1
by: Lennart | last post by:
I'm trying to create a testdatabase from a productiondatabase. The steps I've gone through so far are: export data with certain criteria from roughly 150 tables drop f.k pointing to these tables...
4
by: | last post by:
Hi: how to reduce the tablespace's High water mark? ths!
1
by: tg | last post by:
http://img522.imageshack.us/img522/8647/scan10005ci7.jpg As a percentage of world inhabitants, the white population will plummet to a single digit (9.76%) by 2060 from a high-water mark of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.