Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ref/pgbench.sgml`
2eb1554cc1f31a89f81fadb2bc82b4453bbfa78630a011bd0000000100000fa1
 id="pgbench-option-quiet">
      <term><option>-q</option></term>
      <term><option>--quiet</option></term>
      <listitem>
       <para>
        Switch logging to quiet mode, producing only one progress message per 5
        seconds. The default logging prints one message each 100,000 rows, which
        often outputs many lines per second (especially on good hardware).
       </para>
       <para>
        This setting has no effect if <literal>G</literal> is specified
        in <option>-I</option>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-scale-init">
      <term><option>-s</option> <replaceable>scale_factor</replaceable></term>
      <term><option>--scale=</option><replaceable>scale_factor</replaceable></term>
      <listitem>
       <para>
        Multiply the number of rows generated by the scale factor.
        For example, <literal>-s 100</literal> will create 10,000,000 rows
        in the <structname>pgbench_accounts</structname> table. Default is 1.
        When the scale is 20,000 or larger, the columns used to
        hold account identifiers (<structfield>aid</structfield> columns)
        will switch to using larger integers (<type>bigint</type>),
        in order to be big enough to hold the range of account
        identifiers.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-foreign-keys">
      <term><option>--foreign-keys</option></term>
      <listitem>
       <para>
        Create foreign key constraints between the standard tables.
        (This option adds the <literal>f</literal> step to the initialization
        step sequence, if it is not already present.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-index-tablespace">
      <term><option>--index-tablespace=<replaceable>index_tablespace</replaceable></option></term>
      <listitem>
       <para>
        Create indexes in the specified tablespace, rather than the default
        tablespace.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-partition-method">
      <term><option>--partition-method=<replaceable>NAME</replaceable></option></term>
      <listitem>
       <para>
        Create a partitioned <literal>pgbench_accounts</literal> table with
        <replaceable>NAME</replaceable> method.
        Expected values are <literal>range</literal> or <literal>hash</literal>.
        This option requires that <option>--partitions</option> is set to non-zero.
        If unspecified, default is <literal>range</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-partitions">
      <term><option>--partitions=<replaceable>NUM</replaceable></option></term>
      <listitem>
       <para>
        Create a partitioned <literal>pgbench_accounts</literal> table with
        <replaceable>NUM</replaceable> partitions of nearly equal size for
        the scaled number of accounts.
        Default is <literal>0</literal>, meaning no partitioning.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-tablespace">
      <term><option>--tablespace=<replaceable>tablespace</replaceable></option></term>
      <listitem>
       <para>
        Create tables in the specified tablespace, rather than the default
        tablespace.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-unlogged-tables">
      <term><option>--unlogged-tables</option></term>
      <listitem>
       <para>
        Create all tables as unlogged tables, rather than permanent tables.
       </para>
      </listitem>
     </varlistentry>

    </variablelist>
   </para>

 </refsect2>

 <refsect2 id="pgbench-run-options">
  <title>Benchmarking Options</title>

   <para>
    <application>pgbench</application> accepts the following command-line
    benchmarking arguments:

    <variablelist>

Title: pgbench Initialization Options: Scaling, Foreign Keys, Tablespaces, and Partitioning
Summary
This section of the pgbench documentation details options related to scaling the database size (-s), creating foreign key constraints (--foreign-keys), specifying tablespaces for indexes and tables (--index-tablespace, --tablespace), using unlogged tables (--unlogged-tables), and partitioning the pgbench_accounts table (--partition-method, --partitions).