Quantcast
Viewing all articles
Browse latest Browse all 3587

Re: feedback about a document on data storage and how to track space allocation

Hi all,

 

I did a little test and the results are not in line with what I expected -- unless I did something.

 

The test below was executed on "Adaptive Server Enterprise/15.0.3/EBF 17686 ESD#1.1 RELSE/P/Sun_svr4/OS 5.8/ase1503/2681/64-bit/FBO/Thu Aug 20 14:20:57 2009"

 

I have a table named TABLE_A

select object_id('TABLE_A') --> 1737782963

 

select * from syspartitions where name like 'TABLE_A%'

nameindididpartitionidsegmentstatusdatoampageindoampagefirstpagerootpagedata_partitionidcrdatecdataptnname
TABLE_A_1737782963017377829631737782963127268007268110168202015-05-03 15:44:16(null)

 

dbcc listoam(5,1737782963,0)

 

Code: 0 --- -----------------------------------------------------------------------------

Code: 0 --- Partition id: 1737782963     indid:   0 prevpg: 72680 nextpg: 72680

Code: 0 --- OAM pg cnt:      1 Entry cnt:          3

Code: 0 --- Rows:            126 Rows Per pg:        0

Code: 0 --- Used pgs:       19 Unused pgs:         5

Code: 0 --- Attribute entries:       15

Code: 0 --- OAM status bits set:  (0x8000 (PG_OAMPG), 0x0008 (PG_OAMATTRIB), 0x0004 (PG_OAMSORT))

Code: 0 --- LAST SCANNED OAM PAGE:          0

Code: 0 --- ALLOCATION HINTS     :

Code: 0 --- 72680          0          0          0

Code: 0 --- 0          0          0          0

Code: 0 --- 0          0          0          0

Code: 0 --- 0          0          0

Code: 0 --- BCP LAST PAGE:      72681

Code: 0 --- OAM pg #  1:      72680 has the following 3 entries (allocpg:used/unused):

Code: 0 ---

Code: 0 --- [   0]      72448:  8/  0       73984:  8/  0      101632:  3/  5

Code: 0 ---

Code: 0 --- ---- End of OAM chain for partition 1737782963 ----

 

From this output my understanding is:

  • the OAM page is at page 72680 as shown in column dataoampage,
  • my table is using 19 pages spread on 3 extents starting at pages 72448 / 73984 and 101632

 

dbcc page(5,72448,1,0)

 

Code: 0 ---

Code: 0 --- Page read from disk.

Code: 0 ---

Code: 0 --- BUFFER:

Code: 0 --- Buffer header for buffer 0x1a86ea000 (Mass head)

Code: 0 --- page=0x1a86e9000 bdnew=0x0 bdold=0x0 bhash=0x0

Code: 0 --- bmass_next=0x0 bmass_prev=0x0 bdbid=5

Code: 0 --- bvirtpg= [ 0x1a86ea0b8 vpgdevno=8 vpvpn=144896 vdisk=0x15e8e4090 ]

Code: 0 --- bmass_head=0x1a86ea000 bmass_tail=0x1a86ea000

Code: 0 --- bcache_desc=0x1a86f2ae8 (cache name='default data cache')

Code: 0 --- bpool_desc=0x0 bdbtable=0x0

Code: 0 --- Mass bkeep=0 Mass bpawaited=0 Mass btripsleft=0 Mass btripsleft_orig=0

Code: 0 --- bmass_size=4096 (4K pool) bunref_cnt=0

Code: 0 --- bmass_stat=0x0800 (0x00000800 (MASS_NOTHASHED))

Code: 0 --- bbuf_stat=0x0 (0x00000000)

Code: 0 --- Buffer blpageno=72448 bpg_size=4k Mass blpageno=72448 (Buffer slot #: 0)

Code: 0 --- bxls_pin=0x0 bxls_next=0x0 bspid=0

Code: 0 --- bxls_flushseq=0 bxls_pinseq=0 bcurrxdes=0x0

Code: 0 --- Latch and the wait queue:

Code: 0 --- Latch (address: 0x1a86ea030)

Code: 0 --- latchmode: 0x0 (FREE_LATCH)

Code: 0 --- latchowner: 0

Code: 0 --- latchnoofowners: 0

Code: 0 --- latchwaitq: 0x0 latchwaitqt: 0x0

Code: 0 ---

Code: 0 --- Latch wait queue:

Code: 0 ---

Code: 0 --- PAGE HEADER:

Code: 0 --- Page header for page 0x1a86e9000

Code: 0 --- pageno=72448 dealloc_count=5636 ptnid=99 allocation_page dbid=5 timestamp=0000 00000001, segmap=0x00000003 (0x00000002 (SEG_DEFAULT), 0x00000001 (SYS_SEGMENT))

Code: 0 --- page status bits: 0x300 (0x0200 (PG_AP_PTNID_UPGD_CMPLT), 0x0100 (PG_AP_HAS_PTNID))

Code: 0 ---

Code: 0 --- Allocation Page Data:

Code: 0 --- pallocreserved:

Code: 0 --- 1a86e9020 (     0):  00000000 00000000 00000000 00000000  ................

Code: 0 --- 1a86e9030 (    16):

Code: 0 ---

Code: 0 --- pextents[]:

Code: 0 --- no.  start page   --ptnid---  rsv  fwd spre --objid---  alloc deall indid status

Code: 0 --- 0:      72448   803099587  0x00 0x00 0x00   803099587   0x03  0x00     2  0x01

Code: 0 --- 1:      72456  1857347296  0x00 0x00 0x00  1857347296   0x03  0x00     0  0x00

 

Here I got lost with the output of dbcc page. The extent starting at page 72448 holds information related to object 803099587 and it looks to be an index as indid is 2.

 

I expected objectid to be 1737782963 and indid 0.

 

Am I misunderstanding anything?

 

Thanks all and have a good week-end.

 

 

Simon


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>