Hi All,
Me again!
OE10.2BSp05 Windows 64-bit.
I'm racking my brain trying to work out why this doesn't make sense...
My aim is to monitor database extents and report on anything heading towards the variable extent or anything already in there.
I have the following code:
My main issue is that:
Total Blocks is 63328648
Hi-Water Mark is 63328255
Total Size GB is 241.58
Now, the size of all the extents is 243,712,000
243,712,000 / 4096 [blocksize] * 1024 * 1024 * 1024 = 3.5GB
Therefore the extent should be 3.5gb in size (give or take) but its 9GB.
Am i going wrong somewhere?
P.s. I've also read somewhere that variable extents aren't necessarily bad and won't slow down DB performance. Although I've experienced poor performance with variable extents in the past.
Are variable extents slowing the database?
Thanks
Me again!
OE10.2BSp05 Windows 64-bit.
I'm racking my brain trying to work out why this doesn't make sense...
My aim is to monitor database extents and report on anything heading towards the variable extent or anything already in there.
I have the following code:
Code:
DEFINE VARIABLE dAreaTotalSize AS DECIMAL NO-UNDO.
DEFINE VARIABLE dAreaUsedSpace AS DECIMAL NO-UNDO.
DEFINE VARIABLE dEmptySpace AS DECIMAL NO-UNDO.
DEFINE VARIABLE iSize AS INTEGER NO-UNDO.
FOR EACH _AreaStatus NO-LOCK:
FIND _Area WHERE _Area._Area-Number = _AreaStatus._AreaStatus-AreaNum NO-ERROR.
DISPLAY _AreaStatus WITH WIDTH 320.
ASSIGN dAreaTotalSize = DECIMAL ( _Areastatus._areaStatus-TotBlocks ) * _Area._Area-blocksize / 1024 / 1024 / 1024
dAreaUsedSpace = DECIMAL ( _Areastatus._areaStatus-HiWater ) * _Area._Area-blocksize / 1024 / 1024 / 1024
dEmptySpace = DECIMAL ( _AreaStatus-Totblocks - _AreaStatus-Hiwater - _AreaStatus-Extents ) * _Area._Area-blocksize / 1024 / 1024 / 1024.
DISPLAY dAreaTotalSize dAreaUsedSpace dEmptySpace.
ASSIGN iSize = 0.
FOR EACH _AreaExtent WHERE _AreaExtent._Area-Number = _AreaStatus._AreaStatus-AreaNum :
ASSIGN iSize = iSize + _AreaExtent._Extent-Size.
DISPLAY _AreaExtent WITH WIDTH 320.
END.
DISPLAY iSize.
END.
My main issue is that:
Total Blocks is 63328648
Hi-Water Mark is 63328255
Total Size GB is 241.58
Now, the size of all the extents is 243,712,000
243,712,000 / 4096 [blocksize] * 1024 * 1024 * 1024 = 3.5GB
Therefore the extent should be 3.5gb in size (give or take) but its 9GB.
Am i going wrong somewhere?
P.s. I've also read somewhere that variable extents aren't necessarily bad and won't slow down DB performance. Although I've experienced poor performance with variable extents in the past.
Are variable extents slowing the database?
Thanks