Re: Query in cache

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: Query in cache
Дата
Msg-id CAL_0b1t40UkK2JFBiR00oU1iXqbmvCe4dK+m1JpMWqDEHubaag@mail.gmail.com
обсуждение исходный текст
Ответ на Query in cache  (Rogerio Pereira <rogerio.pereira@riosoft.com.br>)
Список pgsql-performance
2013/11/18 Rogerio Pereira <rogerio.pereira@riosoft.com.br>
> I am need help, about subject "Query cache in  Postgres".
> how is it possible to put sql statements cached in postgres ?
> I did some tests and I can not get even with improved tuning
> parameters in the postgresql.conf.

Are you talking about prepared statements or about query result caching?

If former then you need to look at the PREPARE for execute statement
[1], though it is probably implemented in your data adapter, for
example like it is in DBD::Pg [2]. Also take a look at the pre_prepare
module [3], that can conveniently be used with pgbouncer.

If later then there is an extension named pgmemcache [4] that will
allow you to interact with memcached directly from postgres, so you
could implement cashing in stored functions, for example. However my
advice is to use application level caching with memcached in this
case, not the database level one.

[1] http://www.postgresql.org/docs/9.3/static/sql-prepare.html
[2] http://search.cpan.org/dist/DBD-Pg/Pg.pm#prepare
[3] https://github.com/dimitri/preprepare
[4] https://github.com/ohmu/pgmemcache/

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com


В списке pgsql-performance по дате отправления:

Предыдущее
От: salah jubeh
Дата:
Сообщение: Re: Query in cache
Следующее
От: "ktm@rice.edu"
Дата:
Сообщение: Re: Query in cache