Re: Update table performance

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Update table performance
Дата
Msg-id b42b73150708090534n3c5dfba6qbabf6dc1b2e0011e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Update table performance  (Mark Makarowsky <bedrockconstruction@yahoo.com>)
Ответы Re: Update table performance
Re: Update table performance
Список pgsql-performance
On 8/8/07, Mark Makarowsky <bedrockconstruction@yahoo.com> wrote:
> Can you provide more detail on what you mean by your
> two suggestions below:
>
> Yeah, I've used "vertical partitioning" very
> successfully in the past, though I've never done it
> for just a single field. I'll typically leave the few
> most common fields in the "main" table and pull
> everything else into a second table.
>
> I should mention that if you can handle splitting the
> update into multiple transactions, that will help a
> lot since it means you won't be doubling the size of
> the table.
>
> I guess I was just surprised by the speed it takes to
> update the field in Postgres since on an almost
> identical table in FoxPro (400,000 records less), it
> updates the table with the same exact update table
> statement in about 4 minutes.

FoxPro is a single process DBF based system with some sql access.
When you update th records, it updates them in place since all the
records are fixed size and padded.  Be careful with this
comparison...while certain operations like the above may feel faster,
the locking in foxpro is extremely crude compared to PostgreSQL.
There are many other things about dbf systems in general which are
pretty lousy from performance perspective.

That said, 'update' is the slowest operation for postgresql relative
to other databases that are not MVCC.  This is balanced by extremely
efficient locking and good performance under multi user loads.
PostgreSQL likes to be used a certain way...you will find that when
used properly it is extremely fast.

keep an eye for the HOT feature which will hopefully make 8.3 that
will highly reduce the penalty for (small) updates in many cases.

merlin

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

Предыдущее
От: justin
Дата:
Сообщение: Re: mid 2007 "best bang for the buck" hardware opinions
Следующее
От: Bill Moran
Дата:
Сообщение: Re: When/if to Reindex