Re: missing page when calculating extents
Posted in 1995
Topics: Storage & Space Management, Platform-Specific Issues
Lucy Lastik <jcooke@mltsa.mlm.att.com> wrote: >Apologies if this is old hat ... >I have been trying to calculate extent sizes, I faithfully followed what it >said in chapter 10 of the Tutorial, but I found an interesting 'problem' >take for example a table with a rowsize of 12 bytes and no indexes >the number of rows per page should work out as > (pagesize-28)/(rowsize+4) > = (2048-28)/(12+4) > = 2020/16 > = 126 >I should therefore be able to fit 4*126 = 504 rows in 4 pages (one 8K extent) >However, I can only fit 3*126 = 378 rows in 4 pages; when I insert the 379th >row >I get a second extent. >The same applies to other extent/row sizes, there is always one "missing" page. >Is this because OnLine always wants at least one empty page or is it because >the "missing" page has some other info on it? There will be at least one bitmap page to track space in the table (There might be more of them depending on number of pages in the table,page size and type of data stored) >And what about Indexes, the calculations in chapter 10 seem way out. >When I added a 4 byte index to my table, I could only fit 669 rows into 12 >pages >any clues anyone?? You have to take into account an 8 byte overhead for calculating the index length And there is the overhead for the B-tree structure (on average take 25% of the calculated index size) >[machine = HP-UX A.09.04 E 9000/847, OnLine = 5.02.UC6] >-- >John Cooke >AT&T Network Systems UK >Though the opinions are mine, they remain the intellectual property my employer If any more questions feel free to mail me Alex.Meyers@Cevi.be