> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# collectStatistics

<div className="kinetica-doxygen">
  <div id="a71a881b85611086a22694f352810dc45" />

  <h2 className="memtitle"><span className="permalink"><a href="#a71a881b85611086a22694f352810dc45">◆ </a></span>collectStatistics() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">CollectStatisticsResponse</a> gpudb::GPUdb::collectStatistics </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsRequest">CollectStatisticsRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Collect statistics for a column(s) in a specified table. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a8658d61bf4e34f6ae3b01b3fad968b35" />

  <h2 className="memtitle"><span className="permalink"><a href="#a8658d61bf4e34f6ae3b01b3fad968b35">◆ </a></span>collectStatistics() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">CollectStatisticsResponse</a> & gpudb::GPUdb::collectStatistics </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsRequest">CollectStatisticsRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">CollectStatisticsResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Collect statistics for a column(s) in a specified table. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="af9b91d47a757a26bd1ba21d88fed6307" />

  <h2 className="memtitle"><span className="permalink"><a href="#af9b91d47a757a26bd1ba21d88fed6307">◆ </a></span>collectStatistics() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">CollectStatisticsResponse</a> gpudb::GPUdb::collectStatistics </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">columnNames</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Collect statistics for a column(s) in a specified table. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>Name of a table, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table. A value of '\*' collects statistics on every user table the caller may read (excluding system schemas, views, and temporary tables); when used, <span className="em arg">columnNames</span> must be '\*'. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">columnNames</td>
              <td>List of one or more column names in <span className="em arg">tableName</span> for which to collect statistics (cardinality, mean value, etc.). A single entry of '\*' expands to every collectable column on the table (geometry, vector, JSON, and array columns are skipped). </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>
              <td>Optional parameters. The default value is an empty map.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a359611cda560b55497bb44388a699f80" />

  <h2 className="memtitle"><span className="permalink"><a href="#a359611cda560b55497bb44388a699f80">◆ </a></span>collectStatistics() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">CollectStatisticsResponse</a> & gpudb::GPUdb::collectStatistics </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">columnNames</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">CollectStatisticsResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Collect statistics for a column(s) in a specified table. </p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>Name of a table, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table. A value of '\*' collects statistics on every user table the caller may read (excluding system schemas, views, and temporary tables); when used, <span className="em arg">columnNames</span> must be '\*'. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">columnNames</td>
              <td>List of one or more column names in <span className="em arg">tableName</span> for which to collect statistics (cardinality, mean value, etc.). A single entry of '\*' expands to every collectable column on the table (geometry, vector, JSON, and array columns are skipped). </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>
              <td>Optional parameters. The default value is an empty map. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1CollectStatisticsResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
