Re: Limit clause not using index

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Limit clause not using index
Дата
Msg-id 20050621210819.GA82792@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Limit clause not using index  (Tobias Brox <tobias@nordicbet.com>)
Список pgsql-performance
On Tue, Jun 21, 2005 at 09:46:39PM +0200, Tobias Brox wrote:
> [John A Meinel - Tue at 10:14:24AM -0500]
> > I believe if you drop the indexes inside a transaction, they will still
> > be there for other queries, and if you rollback instead of commit, you
> > won't lose anything.
>
> Has anyone tested this?

Observations from tests with 8.0.3:

DROP INDEX acquires an AccessExclusiveLock on the table and on the
index.  This will cause the transaction executing the DROP INDEX
to block until no other transaction holds any kind of lock on either,
and once the locks are acquired, no other transaction will be able
to access the table or the index until the transaction doing the
DROP INDEX commits or rolls back.  Rolling back leaves the index
in place.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: Tobias Brox
Дата:
Сообщение: Re: Prepared statements vs. Stored Procedures
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Limit clause not using index