> ## 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.

# collect_statistics

### collect\_statistics

<ul>
  <li>
    collect\_statistics(\
    &#x20;table\_name: string,\
    &#x20;column\_names: string\[],\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md),\
    ): Promise\<[CollectStatisticsResponse](https://docs.kinetica.com/content/api/typescript/interfaces/CollectStatisticsResponse.md)>

    Collect statistics for a column(s) in a specified table.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of a table, in \[schema\_name.]table\_name format, using standard name resolution rules. 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, `column_names` must be ''.
      </li>

      <li>
        column\_names: string\[]

        List of one or more column names in `table_name` 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).
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CollectStatisticsResponse](https://docs.kinetica.com/content/api/typescript/interfaces/CollectStatisticsResponse.md)>

    Promise\<Types.CollectStatisticsResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:5612](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L5612)</li>
    </ul>
  </li>
</ul>

### collect\_statistics\_request

<ul>
  <li>
    collect\_statistics\_request(\
    &#x20;request: [CollectStatisticsRequest](https://docs.kinetica.com/content/api/typescript/interfaces/CollectStatisticsRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md),\
    ): Promise\<[CollectStatisticsResponse](https://docs.kinetica.com/content/api/typescript/interfaces/CollectStatisticsResponse.md)>

    Collect statistics for a column(s) in a specified table.

    #### Parameters

    <ul>
      <li>
        request: [CollectStatisticsRequest](https://docs.kinetica.com/content/api/typescript/interfaces/CollectStatisticsRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CollectStatisticsResponse](https://docs.kinetica.com/content/api/typescript/interfaces/CollectStatisticsResponse.md)>

    Promise\<Types.CollectStatisticsResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:5580](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L5580)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.