Goof afternoon,
After a long break working on 'non-ASE' topic, I now have a bit of time to continue on this topic.
I'm curious to know how the linkage is done in an extent when you read data from a table?
Here's the example I ran:
I have a table with one field (numeric(10,6)) and containing 1000 rows
1> sp_help SIMON
2> go
Name Owner Object_type Object_status Create_date
----- ----- ----------- -------------------- -------------------
SIMON dbo user table keep first text page Apr 1 2016 11:31AM
(1 row affected)
Column_name Type Length Prec Scale Nulls Not_compressed Default_name Rule_name Access_Rule_name Computed_Column_object Identity
----------- ------- ------ ---- ----- ----- -------------- ------------ --------- ---------------- ---------------------- ----------
numero numeric 6 10 6 0 0 NULL NULL NULL NULL 0
Object does not have any indexes.
No defined keys for this object.
name type partition_type partitions partition_keys
----- ---------- -------------- ---------- --------------
SIMON base table roundrobin 1 NULL
partition_name partition_id compression_level pages row_count segment create_date
--------------- ------------ ----------------- ----- --------- ------- -------------------
SIMON_925968947 925968947 none 4 1000 default Apr 1 2016 11:31AM
1> select count(*) from SIMON
2> go
-----------
1000
Then I checked table syspartitions to know where the first datapage is
1> select datoampage,firstpage,rootpage from syspartitions where name='SIMON_925968947'
2> go
datoampage firstpage rootpage
------------- ------------- -------------
16472 16473 16473
Then I execute dbcc page on page 16473 and I was expecting to see a link to the next page in field nextpg but this is not the case
Page found in Cache: default data cache. Cachelet: 2
BUFFER:
Buffer header for buffer 0x7fffd7612a000
page=0x7fffd76129000 bdnew=0x7fffe7a776f40 bdold=0x7fffe7a776f40 bhash=0x7fffe7aaabad0
bmass_next=0x7fffe7d120e48 bmass_prev=0x7fffe7aaabad0 bdbid=2
bvirtpg=[ 0x7fffd7612a0c8 vpgdevno=7 vpvpn=29874 vdisk=0x7fffc8ae15d78 ]
bmass_head=0x7fffe7a776f40 bmass_tail=0x7fffe7a776f40
bcache_desc=0x7fffd7612ff38 (cid=0 cache name='default data cache')
bpool_desc=0x7fffd76139d00 bdbtable=0x7fffd0082ce80
Mass bkeep=0 Mass bpawaited=0 Mass btripsleft=0 Mass btripsleft_orig=0
bmass_size=4096 (4K pool) bunref_cnt=0
bmass_stat=0x6001010(0x0000000004000000 (MASS_DONT_DISCARD), 0x0000000002000000 (MASS_WRITE_BY_HK), 0x0000000000001000 (MASS_HASHED), 0x0000000000000010 (MASS_INWASH))
bbuf_stat=0x1 (0x00000001 (BUF_PG_REF))
Buffer blpageno=16473 bpg_size=4k Mass blpageno=16473 Mass blocallockkeep=0 bxls_pin=0x0 bxls_next=0x0 bspid=6
bxls_flushseq=0 bxls_pinseq=0 bcurrxdes=0x7fffd1260d710
Latch and the wait queue:
Latch (address: 0x7fffd7612a038)
latchmode: 0x0 (FREE_LATCH)
latchstatus: 0x0 latchowner: -1
latchnoofowners: 0
latchwaitq: 0x0 latchwaitqt: 0x0
latchlastfileindex=0 (nofilename) latchlastlineno=0
Latch wait queue:
PAGE HEADER:
Page header for page 0x7fffd76129000
pageno=16473 nextpg=0 prevpg=0 ptnid=925968947 timestamp=0000 04fccfea
nextrno=289 level=0 indid=0 freeoff=3512 minlen=12
page status bits: 0x881 (0x0800 (PG_XHEADER), 0x0080 (PG_FIXED), 0x0001 (PG_DATA))
second set of page status bits (dol_stat2): 0x02 (0x02 (PG2_DOL_DATAPG))
dol_pprivstat status bits: 0x01 (0x01 (DOLPG_PRIV_COMMITTED))
pagesize=4096, page version=1, ncfs=0, ndeleted=0, insert free space=4
pagetailts=0xcfea
So I'm wondering how ASE knows it has to read the others pages to retrieve all the information in case I do a 'select * from SIMON'?
Thanks for your comments.
Simon