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

From Alvaro Herrera
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
Msg-id 20080723193048.GB3580@alvh.no-ip.org
Whole thread Raw
In response to 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>)
List pgsql-performance
Miernik wrote:
> I have a PostgreSQL database on a very low-resource Xen virtual machine,
> 48 MB RAM. When two queries run at the same time, it takes longer to
> complete then if run in sequence. Is there perhaps a way to install
> something like a query sequencer, which would process queries in a FIFO
> manner, one at a time, even if a new query comes before the last one
> running is finished, it would not give the new query to the server
> before the one running now finishes? That would greatly improve
> performance.

One idea I just had was to have a connection pooler (say pgpool) and
allow only one connection slot.  If the pooler is capable to be
configured to block new connections until the slot is unused, this would
do what you want.  (I don't know whether poolers allow you to do this).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-performance by date:

Previous
From: "Scott Marlowe"
Date:
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
Next
From: "Jeffrey Baker"
Date:
Subject: Re: Samsung 32GB SATA SSD tested