How pgpool handle concurrent sql query if they are the same?

251 Views Asked by At

In my case, it's possible that a lot of the same SQL query happen at some moment, so I want to ask that if this thing happens, how pgpool handle it? Will pgpool request a lot of the same querys to the backend postgresql server or it will queue all those same query and responds when just one query get finished from the server?

1

There are 1 best solutions below

0
On

Pgpool-II can cache select queries and they can be reused. You can enable this feature by setting memory_cache_enabled to true. You can set memqcache_method to shmem or memcached to further fine tune caching. See link here for detail: https://www.pgpool.net/docs/latest/en/html/runtime-in-memory-query-cache.html