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

From: Theo Kramer <theo(at)flame(dot)co(dot)za>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence
Date: 2008-07-31 08:46:52
Message-ID: EBC62B4F-E492-4036-9BD6-F1D22B9FBF4F@flame.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On 31 Jul 2008, at 10:29AM, Miernik wrote:

> Richard Huxton <dev(at)archonet(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Miernik 2008-07-31 09:17:20 Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence
Previous Message Miernik 2008-07-31 08:29:30 Re: how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence