Postgresql cache (memory) performance + how to warm up the cache

Поиск
Список
Период
Сортировка
От Shaul Dar
Тема Postgresql cache (memory) performance + how to warm up the cache
Дата
Msg-id 234efe30906010405p48b55a91u83bccefc09271601@mail.gmail.com
обсуждение исходный текст
Ответы Re: Postgresql cache (memory) performance + how to warm up the cache  (Greg Smith <gsmith@gregsmith.com>)
Список pgsql-performance
I have a DB table with 25M rows, ~3K each (i.e. ~75GB), that together with multiple indexes I use (an additional 15-20GB) will not fit entirely in memory (64GB on machine). A typical query locates 300 rows thru an index,  optionally filters them down to ~50-300 rows using other indexes, finally fetching the matching rows. Response times vary between 20ms on a warm DB to 20 secs on a cold DB. I have two related questions:

1. At any given time how can I check what portion (%) of specific tables and indexes is cached in memory?

2. What is the best way to warm up the cache before opening the DB to queries? E.g. "select *" forces a sequential scan (~15 minutes on cold DB) but response times following it are still poor. Is there a built-in way to do this instead of via queries?a

Thanks, feel free to also reply by email (info@shauldar.com])

-- Shaul

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

Предыдущее
От: S Arvind
Дата:
Сообщение: Vacuuming technique doubt
Следующее
От: David Rees
Дата:
Сообщение: Re: Vacuuming technique doubt