Re: Plan time Improvement - 64bit bitmapset

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Plan time Improvement - 64bit bitmapset
Дата
Msg-id 25273.1244064263@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Plan time Improvement - 64bit bitmapset  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Plan time Improvement - 64bit bitmapset  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Jun 3, 2009 at 3:18 PM, Kevin Grittner
> <Kevin.Grittner@wicourts.gov> wrote:
>> I'm finding that even the ones that had a plan time in the range of
>> 260 ms go down to 15 ms to 85 ms once the statistics are cached.

> I had some performance results back when we were last looking at
> default_statistics_target that indicated that the time to repeatedly
> decompress a toasted statistics array contributed significantly to the
> total planning time, but my suggestion to disable compression for
> pg_statistic was summarily poo-poohed for reasons that still aren't
> quite clear to me.

Well, smaller is better.  Kevin's example demonstrates that it's good
to have the stats sucked into cache.  If they were uncompressed then
less of them would fit in however much cache space you have, and
whatever CPU savings you get would be lost to more I/O to read in
stats entries.

Of course, this all depends on total database size vs total RAM,
but that's how I'd interpret the observation.  PG is still mostly
optimized for databases bigger than RAM, so this decision still
makes sense.

(I think you could try marking the columns of pg_statistic as "don't
compress" if you have a DB you want to optimize for all-in-memory
behavior.)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Plan time Improvement - 64bit bitmapset
Следующее
От: Emmanuel Cecchet
Дата:
Сообщение: Re: Locks on temp table and PREPARE