Connection pooling enables the use of preconfigured connection pools on the Amazon Redshift, PostgreSQL, and Snowflake database dialects.
This option lets Looker use pools of connections through the JDBC driver. Database connection pooling enables faster query performance; a new query does not need to create a new database connection but can instead use an existing connection from the connection pool. The connection pooling capability ensures that a connection is cleaned up after a query execution and is available for reuse after the query execution ends.
To enable connection pooling, turn on the Database Connection Pooling Labs feature. When the Labs feature is on, if you have configured connection pools on your database and are using one of the dialects listed above, Looker will use connection pooling.
Some things to consider when using connection pools:
Multiple users share a connection pool if their user attribute values are identical. Users who have unique or differing values in their set of user attributes will use unique connection pools when connecting to the database.
The maximum number of connections that can be made to connection pools across all database nodes is limited by the value in the Max Connections field in the database’s Connection page.
If the number of concurrent queries being issued to a connection pool exceeds the maximum number of connections, queries are queued in Looker until prior queries are executed.
Unique JDBC connection strings create unique connection pools. For example, unique database usernames or database group names that dictate role-based access control to the database will create unique JDBC connection strings, which then create unique connection pools. For example, a finance group in a company may have a database role that grants them access to all tables in the database, but the sales and marketing team may have a database role that grants them access to only a subset of the database tables. In this case, each group would have a unique JDBC connection string and a unique connection pool. A third group might be a set of Powered-by-Looker (PBL) customers who have their own access rights to the database. The PBL customers would also have a unique JDBC string and a unique connection pool, so they would also have a unique set of connections that are not in use by the finance or sales and marketing groups.
WHEREclause in a SQL query does not cause new connection pools. The
WHEREclause has no impact on the JDBC connection string, so a new connection pool is not created. For example, unique access filters modify the SQL
WHEREclause in a query, not the JDBC connection string, so unique access filters will not create new connection pools.
When multiple connection pools are created, the maximum number of connections is fragmented into multiple pools, with each pool containing a subset of available connections. This occurs because the total number of connections cannot exceed the maximum connections value.