Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?

Поиск
Список
Период
Сортировка
От Stefan Keller
Тема Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Дата
Msg-id CAFcOn28oCqoNJFVL8wdc6+QcMNuzLC5YuoamCJGF5npe8JT+WA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?  (Andy Colson <andy@squeakycode.net>)
Ответы Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-performance
2012/2/26 Andy Colson <andy@squeakycode.net> wrote:
>>> How about after you load the data, vacuum freeze it, then do something
>>> like:
>>>
>>> SELECT count(*) FROM osm_point WHERE tags @>  'tourism=>junk'
>>>
>>> -Andy
>>
>>
>> That good idea is what I proposed elsewhere on one of the PG lists and
>> got told that this does'nt help.
>>
...
> I don't buy that.  Did you test it?  Who/where did you hear this?  And...
> how long does it take after you replace the entire table until things are
> good and cached?  One or two queries?
>
> After a complete reload of the data, do you vacuum freeze it?

Yes.

> After a complete reload of the data, how long until its fast?

Just after the second query. You can try it yourself online here:
http://bit.ly/A8duyB

-Stefan

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

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Следующее
От: Stefan Keller
Дата:
Сообщение: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?