In Memory Query Caching
pgpool-II 4.1.9 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 7. Performance Considerations | Next |
Pgpool-II allows to cache read query results for later use. This will bring huge benefit for a type of applications which issue same read queries many times. If there are two queries and the query strings (parameter for prepared statements if any) are identical, two queries are regarded as "same". For the first time the query is sent, Pgpool-II saves the query result, and use it for the second query without asking anything to PostgreSQL . This technique is explained in Section 5.12 .
7.4.1. When not to Use in Memory Query Caching
When a table is modified, query results against the table could be changed. To avoid inconsistency, Pgpool-II discards query cache data when corresponding table is modified. So frequently updated database will not be suitable to use in memory query caching. You can check if your database is suitable to use query caching or not, you could use SHOW POOL_CACHE . If query cache hit ration is lower than 70%, probably you want to avoid using the query cache.