Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Pengelompokan koneksi memungkinkan penggunaan kumpulan koneksi yang telah dikonfigurasi sebelumnya pada dialek database PostgreSQL dan Snowflake.
Jika dialek Anda mendukungnya, penggabungan koneksi database memungkinkan Looker menggunakan kumpulan koneksi melalui driver JDBC. Pengelompokan koneksi database memungkinkan performa kueri yang lebih cepat; kueri baru tidak perlu membuat koneksi database baru, tetapi dapat menggunakan koneksi yang ada dari kumpulan koneksi. Kemampuan penggabungan koneksi memastikan bahwa koneksi dibersihkan setelah eksekusi kueri dan tersedia untuk digunakan kembali setelah eksekusi kueri berakhir.
Opsi Penggabungan Koneksi Database diaktifkan di koneksi Looker.
Anda telah mengonfigurasi kumpulan koneksi di database.
Berikut beberapa hal yang perlu dipertimbangkan saat Anda menggunakan kumpulan koneksi:
Beberapa pengguna berbagi kumpulan koneksi jika nilai atribut pengguna mereka identik. Pengguna yang memiliki nilai unik atau berbeda dalam kumpulan atribut pengguna mereka akan menggunakan kumpulan koneksi unik saat terhubung ke database.
Jumlah maksimum koneksi yang dapat dibuat ke kumpulan koneksi di semua node database dibatasi oleh nilai di kolom Max connections per node di halaman Connection database.
Jika jumlah kueri serentak yang dikeluarkan ke kumpulan koneksi melebihi jumlah maksimum koneksi, kueri akan dimasukkan ke dalam antrean di Looker hingga kueri sebelumnya dijalankan.
String koneksi JDBC yang unik akan membuat kumpulan koneksi yang unik. Misalnya, nama pengguna database atau nama grup database unik yang menentukan kontrol akses berbasis peran ke database akan membuat string koneksi JDBC unik, yang kemudian membuat kumpulan koneksi unik. Misalnya, grup keuangan di perusahaan mungkin memiliki peran database yang memberi mereka akses ke semua tabel dalam database, tetapi tim penjualan dan pemasaran mungkin memiliki peran database yang memberi mereka akses hanya ke sebagian tabel database. Dalam hal ini, setiap grup akan memiliki string koneksi JDBC yang unik dan kumpulan koneksi yang unik. Grup ketiga mungkin adalah sekumpulan pelanggan analisis tersemat yang memiliki hak akses mereka sendiri ke database. Pelanggan analisis tersemat juga akan memiliki string JDBC unik dan kumpulan koneksi unik, sehingga mereka juga akan memiliki kumpulan koneksi unik yang tidak digunakan oleh grup keuangan atau penjualan dan pemasaran.
Klausa WHERE dalam kueri SQL tidak menyebabkan kumpulan koneksi baru. Klausa WHERE tidak memengaruhi string koneksi JDBC, sehingga kumpulan koneksi baru tidak dibuat. Misalnya, filter akses unik mengubah klausa WHERE SQL dalam kueri, bukan string koneksi JDBC, sehingga filter akses unik tidak akan membuat kumpulan koneksi baru.
Saat beberapa kumpulan koneksi dibuat, jumlah maksimum koneksi akan dipecah menjadi beberapa kumpulan, dengan setiap kumpulan berisi subkumpulan koneksi yang tersedia. Hal ini terjadi karena jumlah total koneksi tidak boleh melebihi nilai koneksi maksimum.
Dukungan dialek untuk penggabungan koneksi database
Kemampuan untuk menggunakan penggabungan koneksi database bergantung pada dialek database yang digunakan koneksi Looker Anda. Dalam rilis Looker terbaru, dialek berikut mendukung penggabungan koneksi database:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 UTC."],[],[],null,["# Database connection pooling\n\nConnection pooling enables the use of preconfigured connection pools on [PostgreSQL](/looker/docs/db-config-postgresql) and [Snowflake](/looker/docs/db-config-snowflake) database dialects.\n\n[If your dialect supports it](#dialect_support_for_database_connection_pooling), database connection pooling enables Looker to 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.\n\nYou can enable connection pooling using the [**Database Connection Pooling**](/looker/docs/admin-panel-general-labs#database_connection_pooling) option when you [create](/looker/docs/connecting-to-your-db) or [edit](/looker/docs/admin-panel-database-connections#editing_connections) a database connection in Looker.\n| **Note:** Database connection pooling was previously a Looker [Labs](/looker/docs/admin-panel-general-labs) feature. When **Database Connection Pooling** moved out of Labs, Looker automatically applied the **Database Connection Pooling** Labs setting to the **Database Connection Pooling** connection setting for any database connections on your instance that support connection pooling.\n\nLooker will use connection pooling on your connection if all of the following are true:\n\n- You are using one of the [dialects that support database connection pooling](#dialect_support_for_database_connection_pooling).\n- The **Database Connection Pooling** option is enabled on the Looker connection.\n- You have configured connection pools on your database.\n\nHere are some things to consider when you're using connection pools:\n\n- 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.\n\n- 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 per node**](/looker/docs/connecting-to-your-db#max_connections) field in the database's **Connection** page.\n\n- 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.\n\n- 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 [embedded analytics](/looker/docs/single-sign-on-embedding) customers who have their own access rights to the database. The embedded analytics 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.\n\n- The `WHERE` clause in a SQL query does not cause new connection pools. The `WHERE` clause has no impact on the JDBC connection string, so a new connection pool is not created. For example, unique [access filters](/looker/docs/reference/param-explore-access-filter) modify the SQL `WHERE` clause in a query, not the JDBC connection string, so unique access filters won't create new connection pools.\n\n- 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.\n\nDialect support for database connection pooling\n-----------------------------------------------\n\nThe ability to use database connection pooling depends on the database dialect your Looker connection is using. In the latest release of Looker, the following dialects support database connection pooling:"]]