Re: How to improve insert speed with index on text column

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: How to improve insert speed with index on text column
Дата
Msg-id CAGTBQpYAbJmTxSgUuhdbCMHq5Hnup5CCuQE7gk2jJ3+6=8T5Gw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to improve insert speed with index on text column  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-performance
On Wed, Feb 1, 2012 at 12:49 AM, Claudio Freire <klaussfreire@gmail.com> wrote:
> On Wed, Feb 1, 2012 at 12:29 AM, Rosser Schwarz
> <rosser.schwarz@gmail.com> wrote:
>> Remember, DDL is transactional in PostgreSQL.  In principle, you
>> should be able to drop the index, do your inserts, and re-create the
>> index without affecting concurrent users, if you do all of that inside
>> an explicit transaction.  Doing the inserts inside a transaction may
>> speed them up, as well.
>
> Creating an index requires an update lock on the table, and an
> exclusive lock on the system catalog.
> Even though with "CONCURRENTLY" it's only for a short while.
> So it does affect concurrent users.

Forgot to mention that if you don't commit the drop, you see no
performance increase.
So:

begin
drop
insert
create
commit

Does not work to improve performance. At all.

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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: How to improve insert speed with index on text column
Следующее
От: Gudmundur Johannesson
Дата:
Сообщение: Index with all necessary columns - Postgres vs MSSQL