Home Explore Blog CI



postgresql

6th chunk of `doc/src/sgml/ref/pgbench.sgml`
169e1501df433dbb337bec7a979a98c7c4bd6295376fdf0f0000000100000fa0
    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>
     <varlistentry id="pgbench-option-builtin">
      <term><option>-b</option> <replaceable>scriptname[@weight]</replaceable></term>
      <term><option>--builtin</option>=<replaceable>scriptname[@weight]</replaceable></term>
      <listitem>
       <para>
        Add the specified built-in script to the list of scripts to be executed.
        Available built-in scripts are: <literal>tpcb-like</literal>,
        <literal>simple-update</literal> and <literal>select-only</literal>.
        Unambiguous prefixes of built-in names are accepted.
        With the special name <literal>list</literal>, show the list of built-in scripts
        and exit immediately.
       </para>
       <para>
        Optionally, write an integer weight after <literal>@</literal> to
        adjust the probability of selecting this script versus other ones.
        The default weight is 1.
        See below for details.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-client">
      <term><option>-c</option> <replaceable>clients</replaceable></term>
      <term><option>--client=</option><replaceable>clients</replaceable></term>
      <listitem>
       <para>
        Number of clients simulated, that is, number of concurrent database
        sessions.  Default is 1.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-connect">
      <term><option>-C</option></term>
      <term><option>--connect</option></term>
      <listitem>
       <para>
        Establish a new connection for each transaction, rather than
        doing it just once per client session.
        This is useful to measure the connection overhead.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-define">
      <term><option>-D</option> <replaceable>varname</replaceable><literal>=</literal><replaceable>value</replaceable></term>
      <term><option>--define=</option><replaceable>varname</replaceable><literal>=</literal><replaceable>value</replaceable></term>
      <listitem>
       <para>
        Define a variable for use by a custom script (see below).
        Multiple <option>-D</option> options are allowed.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="pgbench-option-file">
      <term><option>-f</option> <replaceable>filename[@weight]</replaceable></term>
      <term><option>--file=</option><replaceable>filename[@weight]</replaceable></term>
      <listitem>
       <para>
        Add a transaction script read from <replaceable>filename</replaceable>
        to the list of scripts to be executed.
       </para>
       <para>
        Optionally, write an integer weight after <literal>@</literal> to
        adjust the probability of selecting this script versus other ones.
        The default weight is 1.
        (To use a script file name that includes an <literal>@</literal>
        character, append a weight so that there is no ambiguity, for
   

Title: pgbench Benchmarking Options: Tablespaces, Unlogged Tables, Built-in Scripts, Clients, Connections, and Custom Scripts
Summary
This section outlines pgbench benchmarking options including specifying tablespaces for table creation, creating unlogged tables, using built-in scripts (tpcb-like, simple-update, select-only) or custom scripts with weights, setting the number of clients/concurrent sessions, establishing new connections per transaction to measure connection overhead, and defining variables for custom script usage.