# Define connection pooling

You can use the **Pooling** option in the Database Connection dialog box to set up a connection pool and define options like the initial pool size, maximum pool size, and connection pool parameters. By default, a connection remains open for each individual report or set of reports in PUC and for each individual step in a transformation in PDI. For example, you might start by specifying a pool of ten or fifteen connections, and as you run reports in PUC or transformations in PDI, the unused connections drop off. Pooling helps control database access, especially if you have dashboards that contain many reports and require a large number of connections. Pooling can also be implemented when your database licensing restricts the number of active concurrent connections.

Perform the following steps to specify pooling options:

1. Open the Database Connection dialog box in [PUC](https://github.com/pentaho/documentation/blob/main/PDIA/10.2/Install/Pentaho%20configuration/Pentaho%20Configuration%20-%20Config%20Overview%20\(article%20cp\)/Tasks%20to%20be%20Performed%20by%20a%20Pentaho%20Administrator%20-%20Config%20Overview/Define%20Data%20Connections%20\(article%20cp\)/Open%20the%20Connection%20Dialog%20Box%20-%20Database%20Connections/Open%20the%20Database%20Connection%20dialog%20box%20from%20PUC=GUID-16E92667-FDF1-45F6-AC98-15C69E978DB2=2=en=.md) or [PDI](/install/10.2-install/pentaho-configuration/tasks-to-be-performed-by-a-pentaho-administrator/define-data-connections/open-the-connection-dialog-box/open-the-database-connection-dialog-box-from-pdi.md).
2. Click **Pooling** in the left pane.

   Options appear for your JDBC driver as shown in the example below:![Pooling options in the PUC and PDI Database Connection dialog boxes](/files/5JNJM7A6Y9ZrwtD1BP4X)

   The following table shows an example of **Pooling** options that might be available in a typical JDBC driver. Check your driver documentation for driver-specific pooling details.

| Option                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Enable Connection Pooling** | Enables connection pooling.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Pool Size**                 | <ul><li><strong>Initial</strong></li></ul><p>Set the initial size of the connection pool.</p><ul><li><strong>Maximum</strong></li></ul><p>Set the maximum number of connections in the connection pool.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Parameters**                | <p>You can define additional custom pool parameters. Click on any parameter to view a short description of that parameter. Click <strong>Restore Defaults</strong> when to restore the default values for selected parameters.</p><p>The most commonly-used parameter is <strong>validationQuery</strong>. The parameter differs slightly depending on your RDBMS connection. The basic set of Pentaho databases use the following values for <strong>validationQuery</strong>:</p><ul><li>For Oracle and PostgreSQL, use <strong>Select 1 from dual</strong>.</li><li>For MS SQL Server and MySQL, use <strong>Select 1</strong>.</li></ul> |
| **Description**               | Enter a description for your parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

3\. Click \*\*Test\*\*.

```
A success message appears if the connection is established.
```

4\. Click **OK** to close the connection test dialog box.

5. To save the connection, click **OK** to close the Database Connection dialog box.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/install/10.2-install/pentaho-configuration/tasks-to-be-performed-by-a-pentaho-administrator/define-data-connections/define-connection-pooling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
