Re: What's faster?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What's faster?
Дата
Msg-id 9344.1072497603@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: What's faster?  (Mike Nolan <nolan@gw.tssi.com>)
Список pgsql-performance
Mike Nolan <nolan@gw.tssi.com> writes:
>> Because Postgres requires VACUUM ANALYZE more frequently on updated tables,
>> should I break this single field out into its own table, and if so what kind
>> of a speed up can I expect to achieve. I would be appreciative of any
>> guidance offered.

> Unless that field is part of the key, I wouldn't think that a vacuum
> analyze would be needed, as the key distribution isn't changing.

The "analyze" wouldn't matter ... but the "vacuum" would.  He needs to
get rid of the dead rows in a timely fashion.  The wider the rows, the
more disk space is at stake.

Also, if he has more than just a primary index on the main table,
the cost of updating the secondary indexes must be considered.
A balance-only table would presumably have just one index to update.

Against all this you have to weigh the cost of doing a join to get the
balance, so it's certainly not a no-brainer choice.  But I think it's
surely worth considering such a design.

            regards, tom lane

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

Предыдущее
От: Mike Nolan
Дата:
Сообщение: Re: What's faster?
Следующее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: Re: What's faster?