Re: Column Index vs Record Insert Trade-off?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Column Index vs Record Insert Trade-off?
Дата
Msg-id 43EB18B7.4060006@archonet.com
обсуждение исходный текст
Ответ на Column Index vs Record Insert Trade-off?  (Ken Hill <ken@scottshill.com>)
Список pgsql-sql
Ken Hill wrote:
> Is there a performance trade-off between column indexes and record
> inserts?
> 
> I know that in MS Access there is such a trade-off. This being indexes
> make SQL queries perform faster at the cost of record insert speed. Put
> another way, the more column indexes in a table, the slower a record
> insert in that table performs.
> 
> Is there a similar trade-off in PostgreSQL?

The tradeoff is made in every system. The more indexes you have on a 
table, the more indexes need to be updated when you update/insert/delete 
rows.

So - a unique constraint automatically implies an index in PostgreSQL 
(it's how it implements its unique checks). Other than that, you should 
only index those columns where you will want a small number of rows or 
quick ordering.

--   Richard Huxton  Archonet Ltd


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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Concatenate strings using GROUP BY
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: unique constraint instead of primary key? what