WITH and exclusive locks

Поиск
Список
Период
Сортировка
От Jayadevan M
Тема WITH and exclusive locks
Дата
Msg-id CAFS1N4h1PfYZrEKbp-3FHXEZoE4NN6u2WskGRm50Vsf6ae0Y=Q@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi,

When conducting performance tests of our application, I saw quite a few exclusive locks in SELECTs with WITH clause. So I created a big table and executed a query which takes time.
with x as (select * from emp where first_name like 'Sco%')
select * from x;   
I got 2 locks - one accesshare lock against the table and one ExclusiveLock with out  any database/relation.
2417            postgres    10/95    10/95    ExclusiveLock    Yes    2013-11-23 17:38:58+05:30   

My guess is that the Exclusive lock is against some in-memory structure (the temp table created by the WITH clause) and hence is not an issue. Is that correct?
Regards,
Jayadevan

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Recursive function
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Getting non_NULL right-side values on a non-matching join?