How to allocate pages for tables or indexes in DBMaker? (DBMR2238)

~ 0 min
2016-03-18 03:18

When a table is created, the number of pages allocated for it depends on the number of columns, the column type and table header information in this table. However, if users only create an empty table and no record is inserted, only the table’s related information is stored into SYSTABLE without allocating data pages for this empty table. When an index is created, the number of pages allocated for it depends on how many columns is based on to create it and its complexity. However, if users only create an empty index and no record is inserted, only the index’s related information is stored into SYSINDEX without allocating index pages for this empty index. In one word, users can’t define the number of pages allocated for tables or indexes by themselves.

The system table schema of DDL is stored in different system table respectively. For example:

Create table t1 (c1 int, c2 int);

Create index idx1 on t1 (c1);

One record will be added into SYSTABLE in P1 to record t1’s related information.

Two records will be added into SYSCOLUMN in P2 to record related information of c1 and c2.

One record will be added into SYSINDEX in P3 to record idx1’s related information.

Now, if users continue to create table named t2 with the command “create table t2 (c3 int, c4 char(10), …)”, the record used to record t2’s related information will be added into SYSTABLE in P1 if there is enough space in P1, otherwise, a new page named P4 will be allocated for SYSTABLE and the record will be added into P4. Meanwhile, the two records used to record related information of C3 and C4 respectively will be added into SYSCOLUMN in P2 if there is enough space in P2, otherwise, a new page named P5 will be allocated for SYSCOLUMN and the two records will be added into P5.

 

Version: DBMaker4.x/5.x

Product: Bundle/Normal

Platform: Windows/Linux

Average rating 0 (0 Votes)

You cannot comment on this entry

Tags