Re: Inserts or Updates

Поиск
Список
Период
Сортировка
От Andy Colson
Тема Re: Inserts or Updates
Дата
Msg-id 4F31397A.5090304@squeakycode.net
обсуждение исходный текст
Ответ на Inserts or Updates  (Ofer Israeli <oferi@checkpoint.com>)
Ответы Re: Inserts or Updates
Список pgsql-performance
On 2/7/2012 4:18 AM, Ofer Israeli wrote:
> Hi all,
>
> We are currently “stuck” with a performance bottleneck in our server
> using PG and we are thinking of two potential solutions which I would be
> happy to hear your opinion about.
>
> Our system has a couple of tables that hold client generated
> information. The clients communicate *every* minute with the server and
> thus we perform an update on these two tables every minute. We are
> talking about ~50K clients (and therefore records).
>
> These constant updates have made the table sizes to grow drastically and
> index bloating. So the two solutions that we are talking about are:
>

You dont give any table details, so I'll have to guess.  Maybe you have
too many indexes on your table?  Or, you dont have a good primary index,
which means your updates are changing the primary key?

If you only have a primary index, and you are not changing it, Pg should
be able to do HOT updates.

If you have lots of indexes, you should review them, you probably don't
need half of them.


And like Kevin said, try the simple one first.  Wont hurt anything, and
if it works, great!

-Andy

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Inserts or Updates
Следующее
От: "Igor Neyman"
Дата:
Сообщение: Re: Index with all necessary columns - Postgres vs MSSQL