【问题标题】:How pgpool handle concurrent sql query if they are the same?如果它们相同,pgpool 如何处理并发 sql 查询?
【发布时间】:2021-05-11 21:15:21
【问题描述】:

在我的情况下,可能在某个时刻会发生很多相同的 SQL 查询,所以我想问一下,如果发生这种情况,pgpool 是如何处理的? pgpool 会向后端 postgresql 服务器请求大量相同的查询,还是会将所有这些相同的查询排队并在服务器仅完成一个查询时做出响应?

【问题讨论】:

    标签: pgpool


    【解决方案1】:

    Pgpool-II 可以缓存选择查询并且可以重复使用。您可以通过将memory_cache_enabled 设置为true 来启用此功能。您可以将memqcache_method 设置为shmemmemcached 以进一步微调缓存。 详情见此处链接:https://www.pgpool.net/docs/latest/en/html/runtime-in-memory-query-cache.html

    【讨论】:

      猜你喜欢
      • 2019-10-29
      • 2020-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多