To display the TABLE_OPTIONS menu, as Figure 55 shows, select Table_options from the CREATE TABLE menu (or ALTER TABLE menu). You can then specify storage-management parameters, such as location and distribution of data on the storage media.
TABLE_OPTIONS clients: Storage eXtent_size Next_size Lock_mode Exit Define dbspace or fragmentation strategy for table storage. ---- Page 1 of 1 ---- mydata@mydbserv ---------- Press CTRL-W for Help ---- Column Name Type Length Index Nulls
The TABLE_OPTIONS menu contains the following options.
Option | Purpose | Instructions |
---|---|---|
Storage | Displays dbspaces and enables you to assign a dbspace to the current table Enables you to define a fragmentation strategy for the current table | Selecting Dbspaces Fragmenting a New Table |
eXtent_size | Enables you to specify the initial extent size of the table | Setting the Extent Size |
Next_size | Enables you to specify the next extent size | Setting the Extent Size |
Lock_mode | Enables you to select either Page or Row as the lock mode | Determining the Lock Mode |
Exit | Returns to the previous menu | none |
For assistance in setting Table_options values such as dbspaces, fragmentation strategy, extent sizes, and lock mode, see your IBM Informix: Administrator's Guide and IBM Informix: Performance Guide.
To display the STORAGE menu, as Figure 56 shows, select the Storage option from the TABLE_OPTIONS menu.
STORAGE new_acct: Dbspace Fragment Exit
Select a dbspace in which to store the table.
----- Page 1 of 1 ----- mydata@mydbserv -------- Press CTRL-W for Help ----
To display the SELECT DBSPACE screen, as Figure 57 shows, select Dbspace from the STORAGE menu. Use the arrow keys to highlight a dbspace from the list of dbspaces in the current database and then press RETURN.
SELECT DBSPACE >>
Select a dbspace with the Arrow Keys, or enter a name, then press Return.
----- Page 1 of 1 ---- mydata@mydbserv --------- Press CTRL-W for Help ----
rootdbs
pers_dbs
empl_dbs
Select Fragment to set up fragmentation strategy in a series of additional menus. For instructions, see Fragmenting a New Table or Altering Fragmentation for an Existing Table.
To arrange fragmentation for a new table, display the FRAGMENT menu, as Figure 58 shows. You reach this menu through the following steps:
FRAGMENT new_acct: Round_robin eXpression rOwids Exit
Select and define a round robin fragmentation strategy.
----- Page 1 of 1 ----- mydata@mydbserv -------- Press CTRL-W for Help ----
Select the strategy that you want from the FRAGMENT menu, as the following table shows.
Option | Purpose | Instructions |
---|---|---|
Round_robin | Selects a round-robin strategy for fragmentation | Figure 71 |
eXpression | Selects an expression strategy for fragmentation | Expression Strategy Setup |
rOwids | Adds a column that contains rowids to a fragmented
table
(The database server does not automatically assign rowids when you insert rows in a fragmented table.) |
Press the o key to explicitly enable access by rowid |
Exit | Exits the FRAGMENT menu and returns to the STORAGE menu | Figure 56 |
DB–Access has no FRAGMENT menu option for hash or hybrid fragmentation. If you want this type of strategy, use the SQL menu to enter and run the CREATE TABLE or ALTER TABLE statement.
Extended Parallel Server does not support rowids for fragmented tables.
To display the ROUND_ROBIN menu, as Figure 59 shows, select the Round_robin option on the FRAGMENT menu.
ROUND_ROBIN new_acct: Add Modify Drop Screen Exit Add a dbspace to the fragmentation strategy above the line with the highlight. ----- Page 1 of 1 ----- mydata@mydbserv ----------- Press CTRL-W for Help ---- Dbspace Name dbspace1 dbspace2
The ROUND_ROBIN menu has the following options.
Use the arrow keys to highlight a dbspace from the list on the SELECT DBSPACE screen, as Figure 57 shows, and press RETURN. If you try to add a dbspace that is already part of another strategy, an error message appears.
When you return to the ROUND_ROBIN menu, the screen displays all dbspaces currently chosen for the strategy.
To display the EXPRESSION menu, as Figure 60 shows, select the eXpression option on the FRAGMENT menu.
EXPRESSION new_acct: Add Modify Drop Screen Exit Add a strategy definition. ----- Page 1 of 1 ----- mydata@mydbserv -------- Press CTRL-W for Help ---- Dbspace Name Expression dbspace1 field1 <100 dbspace2 field1 >=100 and field1 <200 dbspace3 remainder
The EXPRESSION menu has the following options.
The Add option on the EXPRESSION menu displays the SELECT DBSPACE screen, as Figure 57 shows. Use the arrow keys to highlight a dbspace from the list and press RETURN. If you try to add a dbspace that is already part of another strategy, an error message appears.
After you select a dbspace, the EDIT EXPRESSION menu appears, as Figure 61 shows. From this menu you can enter an expression that determines whether a particular record belongs in the highlighted dbspace.
EDIT EXPRESSION new_acct: New Modify Use-editor Exit Enter a new expression which will determine where a record will be stored. ----- Page 1 of 1 ----- mydata@mydbserv --------- Press CTRL-W for Help ---- Dbspace Name Expression dbspace1 field1<100 dbspace2 field1>=100 and field1<200 dbspace3 remainder
The EDIT EXPRESSION menu has the following options.
After you exit the editor, DB–Access displays the CONFIRM CHANGES menu, as Figure 62 shows.
CONFIRM CHANGES dbspace1: SAVE DISCARD Save changes. ----------------mydata@mydbserv----------------- Press CTRL-W for Help ------ field1<100
To save the edits to the expression, press RETURN. To discard the edits to the expression, select DISCARD. You return to the EXPRESSION menu.
If you are altering a table, you arrange or remove fragmentation with the ALTER FRAGMENT menu. To reach the ALTER FRAGMENT menu:
Figure 63 shows how the ALTER FRAGMENT menu displays a table with a round-robin fragmentation strategy. Figure 64 shows how the ALTER FRAGMENT menu displays a table with an expression-based fragmentation strategy.
ALTER FRAGMENT - new_acct: Add Drop Screen Init aTtach detaCh Exit Add one new dbspace to the end of the list. ----- Page 1 of 1 ---- newstores@mydbserv ------- Press CTRL-W for Help --- Dbspace Name dbspace1 dbspace2 dbspace3
ALTER FRAGMENT - new_acct: Add Modify Drop Screen Init aTtach detaCh Exit Add an expression to the fragmentation strategy above the line with the highlight. ----- Page 1 of 1 ----- newstores@mydbserv --------- Press CTRL-W for Help ---- Dbspace Name Expression dbspace1 field1 <100 dbspace2 field1 >=100 and field1 <200 dbspace3 remainder
The ALTER FRAGMENT menu has the following options.
Option | Purpose | Instructions |
---|---|---|
Add | Adds a dbspace to the round-robin scheme | Round-Robin Setup or Expression Strategy Setup, depending on the fragmentation type of the current table |
Drop | Drops one dbspace from those used for fragments of the current table | |
Screen | Scrolls more dbspaces onto the screen | none |
Init | Describes the fragmentation scheme (if any) of an existing table and enables you to change the strategy, attach fragments, detach fragments, or remove fragmentation | Fragmenting an Existing Table |
aTtach | Attaches one or more tables to the current table, modifies or deletes a selected attachment | Attaching a Dbspace |
detaCh | Detaches records from the current table from a specific dbspace and creates a new table with those records | Detaching a Dbspace |
Exit | Returns to the TABLE_OPTIONS menu | none |
Select the aTtach option on the ALTER FRAGMENT expression strategy menu, and the ATTACH TABLES menu appears. Figure 65 shows the ATTACH TABLES menu for a table that has expression fragmentation. The round-robin version of this screen shows only the table name for each fragment.
ATTACH TABLES new_acct: Add Modify Drop Screen Exit
Add one new table to the fragmentation strategy.
---- Page 1 of 1 ---- newstores@mydbserv -------- Press CTRL-W for Help ----
Table Name Expression Position Dbspace
acct field1 <100 BEFORE dbspace1
cur_acct field1 >=100
Select Add on the ATTACH TABLES menu to begin attaching a fragment. On the SELECT ATTACHING TABLE screen, highlight or type in the table name you want and press RETURN, as Figure 66 shows.
SELECT ATTACHING TABLE >>
Select a table with the Arrow Keys, or enter the name, then press Return.
---- Page 1 of 1 ---- newstores@mydbserv -------- Press CTRL-W for Help ----
acct
cur_acct
myacct
If the table uses round-robin strategy, the resulting new fragment or fragments will be positioned at the end of the fragmentation strategy and the ALTER FRAGMENT menu returns.
If the table uses expression strategy, complete the following steps:
ADD DEFINE ATTACH POSITION acct: Before After None
Define a position for an attaching fragment before a dbspace.
----- Page 1 of 1 ---- newstores@mydbserv -------- Press CTRL-W for Help ----
SELECT DBSPACE >>
Select a dbspace with the Arrow Keys, or enter a name, then press Return.
----- Page 1 of 1 ---- newstores@mydbserv -------- Press CTRL-W for Help ---
dbspace1
dbspace2
dbspace3
Select the dbspace before or after which you want to attach the added fragment.
The ATTACH TABLES menu reappears, as Figure 65 shows, and shows values for the Position and Dbspace fields.
The detaCh option from the ALTER FRAGMENT menu displays the DETACH DBSPACE screen, as Figure 69 shows.
DETACH DBSPACE >>
Select a dbspace with the Arrow Keys, or enter a name, then press Return.
----- Page 1 of 1 ---- newstores@mydbserv ------- Press CTRL-W for Help ----
dbspace1
dbspace2
dbspace3
Select the dbspace from which you want the records copied into a new, unfragmented table. You can select a dbspace from the list or type in a dbspace name. If you enter an invalid dbspace name, an error message appears.
After you correctly enter a dbspace on the DETACH DBSPACE screen, the NEW TABLE screen appears, as Figure 70 shows.
NEW TABLE >>
Enter the name you want assigned to the new table, then press Return.
---- Page 1 of 1 ---- newstores@mydbserv -------- Press CTRL-W for Help ----
Enter the name you want to assign to the new, unfragmented table. This table stores the records from the dbspace you previously selected through the DETACH DBSPACE screen. The display returns to the ALTER FRAGMENT menu.
If a table has no fragmentation strategy when you select the Fragment option on the STORAGE menu, the ALTER FRAGMENT menu appears, as Figure 71 shows.
ALTER FRAGMENT - new_acct: Init Attach Exit
Define a fragmentation strategy.
----- Page 1 of 1 ---- newstores@mydbserv ------- Press CTRL-W for Help ----
The ALTER FRAGMENT menu has the following options.
Option | Purpose | Instructions |
---|---|---|
Init | Provides the following options:
|
The ALTER FRAGMENT-INIT menu has the same options as the FRAGMENT menu under CREATE TABLE. For instructions, see Fragmenting a New Table. |
Attach | Enables you to define a fragmentation strategy and select the tables to fragment with the new strategy. This option has the same effect as the following statement: ALTER FRAGMENT ON TABLE table1... ATTACH table1, table2 | The ALTER FRAGMENT-ATTACH menu offers round-robin and expression fragmentation. For instructions on both types of strategy, see Fragmenting a New Table. |
Exit | Returns to the TABLE_OPTIONS menu | none |
When you create a table, you can specify how much initial disk space, or initial extent size, to reserve for the table. You can also specify the size of additional extents, or next extent spaces, the database server adds if the initial extent becomes full.
To specify an initial extent size, select the eXtent_size option on the TABLE_OPTIONS menu. DB–Access displays the Extent Size screen, as Figure 72 shows. After you set initial extent size, select the Next_size option from the TABLE_OPTIONS menu to display the Next Size screen, as Figure 73 shows.
Extent Size >>
Specify initial extent size in kilobytes.
----- Page 1 of 1 ----- mydata@mydbserv ----------- Press CTRL-W for Help ----
Column Name Type Length Index Nulls
Next Size >>
Specify next extent size in kilobytes.
----- Page 1 of 1 ----- mydata@mydbserv ---------- Press CTRL-W for Help ----
Column Name Type Length Index Nulls
To select extent size on either screen, perform one of the following actions:
The minimum extent size is 4 kilobytes.
When you select the Lock_mode option on the TABLE_OPTIONS menu, DB–Access displays the LOCK_MODE menu, as Figure 74 shows.
LOCK_MODE clients: Page Row Exit Locking is at page level. This is the default. ----- Page 1 of 1 ----- mydata@mydbserv ---------- Press CTRL-W for Help ---- Column Name Type Length Index Nulls
The LOCK_MODE menu lets you choose the mode to use when the database locks the rows in a table. The LOCK_MODE menu has the following options.
One row of a table is the smallest object that you can lock. A disk page contains one or more rows of a table. To determine if you will enhance performance by locking a disk page rather than individual rows on the page, see your IBM Informix: Performance Guide. Unless you specify row-level locking before you exit, DB–Access uses the default (Page).
You can add or delete rowids only when you alter an existing table. To reach the ALTER ROWID menu:
The ALTER ROWID menu has the following options.
If you select Add or Drop, another menu prompts you to verify your selection. Select Yes to execute the Add or Drop; select No to cancel the Add or Drop.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]