1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<refentry id="fn_vacuum">
<refmeta>
<refentrytitle>DB.DBA.VACUUM</refentrytitle>
<refmiscinfo>admin</refmiscinfo>
</refmeta>
<refnamediv>
<refname>DB.DBA.VACUUM</refname>
<refpurpose>Compact the database</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis id="fsyn_vacuum">
<funcprototype id="fproto_vacuum">
<funcdef><function>DB.DBA.VACUUM</function></funcdef>
<paramdef>in <parameter>table_name</parameter> varchar (default %)</paramdef>
<paramdef>in <parameter>index_name</parameter> varchar (default %)</paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="desc_vacuum"><title>Description</title>
<para>This function reads through the specified tables and indices and finds groups of adjacent pages
holding data that will fit on fewer pages than it currently occupies. If such a compression can be made,
the pages are thus compacted.</para>
<para>The pages become part of the committed state and will be written to the checkpoint space on
the next checkpoint.</para>
<para>The vacuum operation is non-locking and can be run on a busy database. It will simply skip pages
with ongoing activity such as pending cursors or locks. The vacuum procedure returns only after it has read
through the indices it affects but it will not prevent other activity on the indices. The vacuum operation
may run out of disk space even if it makes net gains because the modified pages will not be final until
the next checkpoint and the originals will not be free until this same checkpoint. Thus manually running
a checkpoint after vacuum runs out of space will free the space and vacuum may be rerun.</para>
</refsect1>
<refsect1 id="params_vacuum">
<title>Parameters</title>
<refsect2>
<title>table_name</title>
<para>This is a LIKE pattern for tables to vacuum. The default is all tables. The name is case
sensitive and must have all the three parts given, e.g. APP.USER.DATA</para>
</refsect2>
<refsect2>
<title>index_name</title>
<para>This allows specifying an individual index to compress. The specified table(s) must have
this index. The index name is a LIKE pattern and if given should match the case and spelling of index
names as returned by the ODBC call SQLStatistics or equivalent, which is also the KEY_NAME column of
SYS_KEYS.</para>
</refsect2>
</refsect1>
<refsect1 id="examples_vacuum">
<title>Examples</title>
<example id="ex_vacuum">
<title>Simple example</title>
<para>Compact the entire database:</para>
<screen>
SQL> DB.DBA.vacuum ();
</screen>
</example>
</refsect1>
</refentry>
|