Re: Persistent Plan Cache
От | Ivan Voras |
---|---|
Тема | Re: Persistent Plan Cache |
Дата | |
Msg-id | h8l5vi$ul6$2@ger.gmane.org обсуждение исходный текст |
Ответ на | Persistent Plan Cache (Joshua Rubin <jrubin@esoft.com>) |
Список | pgsql-performance |
Joshua Rubin wrote: > Hi, > > We have a very large, partitioned, table that we often need to query > from new connections, but frequently with similar queries. We have > constraint exclusion on to take advantage of the partitioning. This also > makes query planning more expensive. As a result, the CPU is fully > loaded, all the time, preparing queries, many of which have been > prepared, identically, by other connections. > > Is there any way to have a persistent plan cache that remains between > connections? If such a mechanism existed, it would give us a great > speedup because the CPU's load for planning would be lightened > substantially. It's not a great solution, but depending on the specific client technology you use, it can done on the client-side. For example, I've done it before in Java and PHP, and the principle extends to any environment that has any possibility of maintaining "persistent" connections to the database, if you create a thin wrapper for the connections. I have open-sourced such a wrapper for PHP, if you're interested.
В списке pgsql-performance по дате отправления: