Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence

Поиск
Список
Период
Сортировка
От Theo Kramer
Тема Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence
Дата
Msg-id EBC62B4F-E492-4036-9BD6-F1D22B9FBF4F@flame.co.za
обсуждение исходный текст
Ответ на Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence  (Miernik <public@public.miernik.name>)
Список pgsql-performance
On 31 Jul 2008, at 10:29AM, Miernik wrote:

> Richard Huxton <dev@archonet.com> wrote:
>>> I just installed pgpool2 and whoaaa! Everything its like about 3
>>> times
>>> faster! My application are bash scripts using psql -c "UPDATE ...".
>>
>> Probably spending most of their time setting up a new connection,
>> then
>> clearing it down again.
>
> If I do it in Python it could do all queries in the same connection,
> so
> should be faster? Besides that 'psql' is written in perl, so its also
> heavy, by not using psql I get rid of perl library in RAM. Also the
> script uses wget to poll some external data sources a lot, also
> needlessly opening new connection to the webserver, so I want to make
> the script save the http connection, which means I must get rid of
> wget.
> Maybe I should write some parts in C?
>
> BTW, doesn't there exist any tool does what "psql -c" does, but is
> written in plain C, not perl? I was looking for such psql replacement,
> but couldn't find any.


?

file `which psql`
/usr/bin/psql: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9,
stripped

--
Regards
Theo


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

Предыдущее
От: Miernik
Дата:
Сообщение: Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence