Re: Will Postgres ever lock with read only queries?

Поиск
Список
Период
Сортировка
От Robert James
Тема Re: Will Postgres ever lock with read only queries?
Дата
Msg-id e09785e00907280617n3d2b32ccy47f46039fb92d7ab@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Will Postgres ever lock with read only queries?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Will Postgres ever lock with read only queries?  (Nikolas Everett <nik9000@gmail.com>)
Re: Will Postgres ever lock with read only queries?  (Chris <dmagick@gmail.com>)
Список pgsql-performance
Thanks for the replies.  I'm running Postgres 8.2 on Windows XP, Intel Core Duo (though Postgres seems to use only one 1 core).
The queries are self joins on very large tables, with lots of nested loops.

On Mon, Jul 27, 2009 at 9:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Chris <dmagick@gmail.com> writes:
> Robert James wrote:
>> Hi.  I'm seeing some weird behavior in Postgres.  I'm running read only
>> queries (SELECT that is - no UPDATE or DELETE or INSERT is happening at
>> all).  I can run one rather complicated query and the results come
>> back... eventually.  Likewise with another.  But, when I run both
>> queries at the same time, Postgres seems to ground to a halt.

> They're probably not blocking each other but more likely you're
> exhausting your servers resources. If they return "eventually"
> individually, then running both at the same time will take at least
> "eventually x2".

It could be a lot more than x2.  If the two queries together eat enough
RAM to drive the machine into swapping, where it didn't swap while
doing one at a time, the slowdown could be orders of magnitude.

Watching vmstat output might be informative --- it would at least give
an idea if the bottleneck is CPU, I/O, or swap.

                       regards, tom lane

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

Предыдущее
От: Matthew Wakeling
Дата:
Сообщение: Re: hyperthreaded cpu still an issue in 8.4?
Следующее
От: Nikolas Everett
Дата:
Сообщение: Re: Will Postgres ever lock with read only queries?