473,387 Members | 1,863 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,387 software developers and data experts.

Unallocated Space anomaly

At my current workplace, whenever I check table sizes using the
'reserved' column from sysindexes, or sp_spaceused, I get a total for
all user tables which exceeds the physical size of the database.

Running sp_spaceused with no parameteres, I get a NEGATIVE value for
unallocated space in the database, but only see this if I return the
results in GRID format in QA (text format gives less output):

DatabaseName DatabaseSize Unallocated Space
xxxxx_xxxxx 11502.38 MB -4874.80 MB

Reserved Data index_size unused
16602800 KB 7013752 KB 2381904 KB 7207144 KB
If I re-run sp_spaceused with the @updateusage='TRUE' option, this
output gets corrected to:
DatabaseName DatabaseSize Unallocated Space
xxxxx_xxxxx 11502.38 MB 2773.76 MB

Reserved Data index_size unused
8770680 KB 6928168 KB 1808096 KB 34416 KB

which shows a substantial difference in the Reserved/Data/Index/Unused
sizes.

This happens every day - any ideas about:

1) Why this might be happening on such a large scale, and
2) Is it conceivable that these discrepancies in space allocation
information could be causing performance problems? I can imagine that
if the database is trying to locate free pages on extents yet its
internal view of these doesn't match reality then this could impede
data insertion.

Offers anybody?
Jul 20 '05 #1
2 5253

"Philip Yale" <ph********@btopenworld.com> wrote in message
news:e9**************************@posting.google.c om...
At my current workplace, whenever I check table sizes using the
'reserved' column from sysindexes, or sp_spaceused, I get a total for
all user tables which exceeds the physical size of the database.

Running sp_spaceused with no parameteres, I get a NEGATIVE value for
unallocated space in the database, but only see this if I return the
results in GRID format in QA (text format gives less output):

DatabaseName DatabaseSize Unallocated Space
xxxxx_xxxxx 11502.38 MB -4874.80 MB

Reserved Data index_size unused
16602800 KB 7013752 KB 2381904 KB 7207144 KB
If I re-run sp_spaceused with the @updateusage='TRUE' option, this
output gets corrected to:
DatabaseName DatabaseSize Unallocated Space
xxxxx_xxxxx 11502.38 MB 2773.76 MB

Reserved Data index_size unused
8770680 KB 6928168 KB 1808096 KB 34416 KB

which shows a substantial difference in the Reserved/Data/Index/Unused
sizes.

This happens every day - any ideas about:

1) Why this might be happening on such a large scale, and
2) Is it conceivable that these discrepancies in space allocation
information could be causing performance problems? I can imagine that
if the database is trying to locate free pages on extents yet its
internal view of these doesn't match reality then this could impede
data insertion.

Offers anybody?


1. If the database is busy, then the data in sysindexes can get out of date.
I guess that perhaps maintaining correct space data is 'low priority'
compared to all the other things the database engine has to do.

2. I doubt it - the information returned by sp_spaceused and corrected by
DBCC UPDATEUSAGE is only about the amount of space used on disk, and not
about the GAM/SGAM data which is held internally. See "Managing Extent
Allocations and Free Space" in Books Online.

Simon
Jul 20 '05 #2
Use the @updateusage parameter of sp_spaceused and see if that helps. See
Books Online for more info.
--
Jul 20 '05 #3

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

Similar topics

2
by: orion30 | last post by:
I would like to know, if an allocated variable returning by a fuction is unallocated automatically ? If no how to proceed ? Best regards ...
1
by: Philip Yale | last post by:
At my current workplace, whenever I check table sizes using the 'reserved' column from sysindexes, or sp_spaceused, I get a total for all user tables which exceeds the physical size of the...
38
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with...
11
by: kenneth | last post by:
I just ran across this. #1 <DBColumn> 1 </DBColumn> #2 <DBColumn> </DBColumn> The data for #1 will be parsed and returned as " 1 ". I get a sequence of...
1
by: orion30 | last post by:
I would like to know, if an allocated variable returning by a fuction is unallocated automatically ? If no how to proceed ? Best regards ...
3
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc...
16
by: clintonG | last post by:
At design-time the application just decides to go boom claiming it can't find a dll. This occurs sporadically. Doing a simple edit in the HTML for example and then viewing the application has...
1
by: lars.uffmann | last post by:
Hello everyone! I just debugged a pretty huge project, eliminating basically every memory leak that would occur with the current configuration files, at least according to the mtrace() tool from...
1
by: mai | last post by:
Hi everyone, i'm trying to exhibit FIFO anomaly(page replacement algorithm),, I searched over 2000 random strings but i couldnt find any anomaly,, am i I doing it right?,, Please help,,,The...
10
by: Phil Stanton | last post by:
I have a table of SpaceAreas eg Food Store, Garden Shed etc with the first and last bin for each Space Area defined. eg Food Store First Space 1, last space 26 and Gargen Shed First space 1, last...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.