Re: Memcached for Database server

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Memcached for Database server
Дата
Msg-id 4DD23F59.5030803@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Memcached for Database server  (Adarsh Sharma <adarsh.sharma@orkash.com>)
Список pgsql-general
On 05/17/2011 01:31 PM, Adarsh Sharma wrote:

> At what stage we need memcached & what is the purpose of using it.

You might not need it. Depends on the nature of your app, its
performance requirements, how strict it is about always getting
consistent & current data, and how much money you have to throw at hardware.

As for what the purpose of using it is: Read the documentation.
http://code.google.com/p/memcached/wiki/FAQ

memcached works best in environments where some data changes rarely and
is queried extremely frequently. To use memcached, you must modify your
software to check memcached for that data before querying postgresql for
it. You must also modify your software to clear the memcached copy of
the data when it changes the data in postgresql, otherwise you might get
outdated copies of the data from memcached.

Even then, you have to be very careful about managing the cache and
avoiding race conditions if you store anything in memcached that you
can't afford to have a bit out of date. In general, it's best for
caching frequently queried things that don't change very often, don't
change at all within a given user session, etc.

If you want more help from the people here, spend some of your own time
making an effort to more clearly explain what your app does, what your
needs are, what language & platform you use, etc etc etc.

--
Craig Ringer

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Memcached for Database server
Следующее
От: Gerhard Hintermayer
Дата:
Сообщение: Re: ordering of join using ON expression = any (array)