From: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> |
---|---|
To: | Yan Chunlu <springrider(at)gmail(dot)com> |
Cc: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: how could select id=xx so slow? |
Date: | 2012-07-12 06:56:29 |
Message-ID: | 4FFE751D.3050105@ringerc.id.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 07/12/2012 01:10 PM, Yan Chunlu wrote:
> after check out the wiki page Maciek mentioned, turns out that heavy
> connection also burden the disk hardly.
> looks like I am in the vicious circle:
> 1, slow query cause connection blocked so the client request more
> connection.
> 2, more connection cause high disk io and make even the simplest query
> slow and block.
While true, you can often control this by making sure you don't
completely overload your hardware, queuing queries instead of running
them all at once.
You may still discover that your hardware can't cope with the workload
in that your queues may just keep on getting deeper or time out. In that
case, you certainly need to optimise your queries, tune your database,
and/or get bigger hardware.
--
Craig Ringer
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2012-07-12 07:45:53 | Re: DELETE vs TRUNCATE explanation |
Previous Message | Daniel Farina | 2012-07-12 06:12:35 | Re: DELETE vs TRUNCATE explanation |