Question on how updates to Access tables may or may not cause the database to expand in size
- From: Bob Alston <bobalston9@xxxxxxxxx>
- Date: Tue, 20 Jan 2009 18:39:29 -0600
See if I have this right:
For this I will ignore BLOBS and MEMO fields which I do not use in this application.
Data is stored by jet in 2k pages. Multiple records may be stored in a single pages but records are not spanned across two pages.
All strings are stored as variable length data, one byte for each actual character and one overhead byte. This is regardless of the string size specified.
All other data types are fixed length in size.
When a database is compacted and repaired, tables are written out in primary key sequence.
I have concluded that after the compact/repair, that each table, is written in sequence, filling up 2k pages, and that tables are not generally intermixed except at the end of one table and the beginning of the next. However, this assumption is not key to my question.
When updates are made, if they are made to fixed length data (integer, long, single, double, byte, boolean, etc) the database does not expand.
when updates are made to strings, if the size of one or more strings is expanded, any available unused space in the 2k page is used to store the new data (likely by shifting other data "down" to make room for the longer string). If the data can be accommodated by unused space in the 2k page, then the database does not increase in size. If it cannot, then the database DOES expand in size. When this happens, I assssuuummme that the record is removed from its current 2k page and moved to a new 2k page.
Not clear if the old space in the old 2k page is available for expansion of the other records on that page or if it is totally lost until compact/repair.
Does the above sound right?
Is any of the space that the old record took up available for use?
Expansion of other records on the page?
Insertion of new records?
If the above causes many records to exceed the space available in their 2k page, do the each get a new 2k page or would they be combined in a new 2k page if space permitted?
Is there any rule about how much "blank space" should be left in 2k pages when loading from a Compact/repair to accommodate changes that increase the record size?
Any references to online references on this?
I have already read the pertinent portions of Jet Databae Engine Programmer's Guide.
Thanks.
.
- Follow-Ups:
- Prev by Date: Re: Memo Fields
- Next by Date: Filtering data for a form
- Previous by thread: Memo Fields
- Next by thread: Re: Question on how updates to Access tables may or may not cause the database to expand in size
- Index(es):
Relevant Pages
|
Loading