Re: Drop indexes inside transaction?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Drop indexes inside transaction?
Дата
Msg-id 24577.1076048581@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Drop indexes inside transaction?  (Steve Lane <slane@moyergroup.com>)
Ответы Re: Drop indexes inside transaction?  (Steve Lane <slane@moyergroup.com>)
Список pgsql-admin
Steve Lane <slane@moyergroup.com> writes:
> Now we want to use COPY to bring the data in. The target table has 6
> indexes. Without indexes, naturally, we can load 80K rows in 2 seconds. With
> indexes, 46 seconds. (oddly, ONE index contributes 40+ seconds of that, yet
> they're all similar, single-column indexes. Anyway, that's another story).

No, I'd say that's the key part of the story.  Details?

> So I hit on the idea of doing the same thing, but inside a transaction. In
> theory that should affect no one else.

... other than locking them out of the table while the transaction runs.
That doesn't sound like what you want to do.  In any case, reindexing
the table will get slower and slower as the pre-existing data in the
table expands.

            regards, tom lane

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

Предыдущее
От: Steve Lane
Дата:
Сообщение: Index (re)-creation speed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Index (re)-creation speed