109 lines
6.9 KiB
HTML
109 lines
6.9 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="task" />
|
||
|
<meta name="DC.Title" content="Reorganize a table using iSeries Navigator" />
|
||
|
<meta name="abstract" content="This topic shows how to reorganize a table using iSeries Navigator and shows the options that you can specify on the Reorganize window." />
|
||
|
<meta name="description" content="This topic shows how to reorganize a table using iSeries Navigator and shows the options that you can specify on the Reorganize window." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafomngprgz.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafoconcrec.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbaforrgton" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Reorganize a table using iSeries Navigator</title>
|
||
|
</head>
|
||
|
<body id="rbaforrgton"><a name="rbaforrgton"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Reorganize a table using iSeries Navigator</h1>
|
||
|
<div><p>This topic shows how to reorganize a table using iSeries™ Navigator
|
||
|
and shows the options that you can specify on the Reorganize
|
||
|
window.</p>
|
||
|
<div class="section"> <p>Reorganizing a table restores the table to its ideal physical
|
||
|
organization. The ideal organization for a database table is for its rows
|
||
|
to be laid out on pages, ordered by their key values in some frequently used
|
||
|
index. You can reorganize a table by compressing out deleted records, by table
|
||
|
key, or by a selected index.</p>
|
||
|
<p>To reorganize a table using iSeries Navigator,
|
||
|
follow these steps:</p>
|
||
|
</div>
|
||
|
<ol><li><span>From iSeries Navigator,
|
||
|
expand the system you want to use.</span></li>
|
||
|
<li><span>Expand <span class="uicontrol">Databases</span>.</span></li>
|
||
|
<li><span>Expand the database folder that you want to work with.</span></li>
|
||
|
<li><span>Expand the <span class="uicontrol">Schemas</span> folder.</span></li>
|
||
|
<li><span>Click the schema that contains the table you want to reorganize.</span></li>
|
||
|
<li><span>Click <span class="uicontrol">Tables</span>.</span></li>
|
||
|
<li><span>In the detail pane, right-click the table you want to reorganize
|
||
|
and select <span class="uicontrol">Reorganize</span>.</span></li>
|
||
|
</ol>
|
||
|
<div class="section"> <div class="p">On the Reorganize window, select one of the following options
|
||
|
to specify how the rows are reorganized in the table: <ul><li>By compressing out deleted rows without preserving the arrival row sequence:
|
||
|
specify that valid rows at the end of the table are moved to deleted rows
|
||
|
until no deleted rows remain.</li>
|
||
|
<li>By compressing out deleted rows and preserving the arrival row sequence:
|
||
|
specify that all valid rows after the first deleted row in the table are moved
|
||
|
forward in the table to compress out any deleted rows.</li>
|
||
|
<li>By table key: specify that the rows of the table are rearranged by the
|
||
|
key values of the table's access path. The table must have a primary key or
|
||
|
must be a keyed physical file.</li>
|
||
|
<li>By a selected index from library: specify that the rows of the table are
|
||
|
rearranged by the key values of an index or keyed logical file that is built
|
||
|
over the specified table. You can select only an existing index. Your list
|
||
|
of indexes is determined by the library you select.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="p">You can specify other options on the Reorganize window to control
|
||
|
performance and concurrency of the reorganize operation:<ul><li>Specify which partition of a partitioned file (or which member of a multiple
|
||
|
member physical file) should be reorganized</li>
|
||
|
<li>Specify whether the reorganize operation can be suspended and subsequently
|
||
|
restarted. <p>If you do not specify that the reorganize operation can be suspended,
|
||
|
the table will be allocated exclusively for the duration of the reorganize
|
||
|
operation and can only be suspended by ending the job immediately.</p>
|
||
|
<div class="p">If
|
||
|
you specify that the reorganize can be suspended: <ul><li>The file must be journaled since the rows are moved under commitment control
|
||
|
to ensure that no rows are lost if the reorganize operation is suspended.</li>
|
||
|
<li>You can also specify whether other users can read the table or change
|
||
|
the table during the reorganize operation. Locks are acquired for short periods
|
||
|
of time on rows that are moved during the reorganize. If concurrent jobs also
|
||
|
acquire locks on rows, record lock time-outs might occur. You can change the
|
||
|
record lock wait time for the file, or you can use the Override with Database
|
||
|
File (OVRDBF) command to specify an appropriate record wait time.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</li>
|
||
|
<li>Specify how indexes are maintained: <ul><li>If you specify that the reorganize operation can be suspended, you can
|
||
|
also specify that all indexes should be maintained during the reorganize operation.
|
||
|
No index rebuilds are necessary.</li>
|
||
|
<li>Otherwise, you can specify that indexes be rebuilt synchronously or asynchronously.
|
||
|
You can see the progress of asynchronously built indexes by using the Edit
|
||
|
Rebuild of Access Paths (EDTRBDAP) command.</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafomngprgz.htm" title="These topics describe how to reorganize physical files on the i5/OS operating system, how to suspend or cancel reorganize operations and what type of reorganize operations you can choose. Considerations for reorganizing physical files are also included.">Reorganize a physical file</a></div>
|
||
|
</div>
|
||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="rbafoconcrec.htm" title="DB2 Universal Database for iSeries has built-in integrity for records. For example, if PGMA reads a record for update operation, it locks that record. Another program cannot read the same record for update operation until PGMA releases the record, but another program can read the record just for inquiry.">Lock records</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|