Re: Insert performance vs Table size

Поиск
Список
Период
Сортировка
От Praveen Raja
Тема Re: Insert performance vs Table size
Дата
Msg-id 001301c57b0e$643942c0$4c0ca8c0@sto.netlight.se
обсуждение исходный текст
Ответ на Re: Insert performance vs Table size  (Jacques Caron <jc@directinfos.com>)
Ответы Re: Insert performance vs Table size  (Jacques Caron <jc@directinfos.com>)
Список pgsql-performance
Just to clear things up a bit, the scenario that I'm interested in is a
table with a large number of indexes on it (maybe 7-8). In this scenario
other than the overhead of having to maintain the indexes (which I'm
guessing is the same regardless of the size of the table), does the size
of the table play a role in determining insert performance (and I mean
only insert performance)?

-----Original Message-----
From: Jacques Caron [mailto:jc@directinfos.com]
Sent: 27 June 2005 13:40
To: Praveen Raja
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Insert performance vs Table size

Hi,

At 13:24 27/06/2005, Praveen Raja wrote:
>I'm wondering if and how the size of a table affects speed of inserts
>into it? What if the table has indexes, does that alter the answer?

Many parameters will affect the result:
- whether there are any indexes (including the primary key, unique
constraints...) to update or not
- whether there are any foreign keys from or to that table
- the size of the rows
- whether the table (or at least the bits being updated) fit in RAM or
not
- whether the table has "holes" (due to former updates/deletes and
vacuum)
and how they are placed
- and probably a bunch of other things...

Obviously, if you have an append-only (no updates, no deletes) table
with
no indexes and no foreign keys, the size of the table should not matter
much. As soon as one of those conditions is not met table size will have
an
impact, probably small as long as whatever is needed can be held in RAM,
a
lot bigger once it's not the case.

Hope that helps,

Jacques.



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

Предыдущее
От: Jacques Caron
Дата:
Сообщение: Re: Insert performance vs Table size
Следующее
От: Jacques Caron
Дата:
Сообщение: Re: Insert performance vs Table size