Re: [HACKERS] Postgres Performance

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: [HACKERS] Postgres Performance
Дата
Msg-id 37CFF291.3B2FBBD2@alumni.caltech.edu
обсуждение исходный текст
Ответ на Re: University Masters Project  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Postgres Performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> I have a couple of large(?) tables which I would like to keep them in
> memory (cached) so that searches are performed as fast as possible.
> Is it possible to 'pin' the tables and it's indexes in memory?

Not explicitly. We rely on the OS to do that.

> Are there any other options/values which would yield better performance?

By default, the backend "fsyncs" for every query. You can disable
this, which would then allow the tables to hang around in memory until
the OS decides to flush to disk. Not everyone should do this, since
there is a (small) risk that if your computer crashes after some
updates but before things are flushed then the db might become
inconsistant. afaik we have never had an unambiguous report that this
has actually happened (but others might remember differently). There
is already that risk to some extent, but instead of the window being
O(1sec) it becomes O(30sec).

Run the backend by adding '-o -F' (or just '-F' to your existing list
of "-o" options). 
                   - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


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

Предыдущее
От: Edwin Ramirez
Дата:
Сообщение: Postgres Performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Postgres Performance