From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Checkpoint_segments optimal value |
Date: | 2014-07-17 23:45:27 |
Message-ID: | 53C86017.7020903@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
On 7/17/2014 4:26 PM, Prabhjot Sheena wrote:
> Here is the explain plan. There query time went backup up to 2 to 3
> minutes from 3 second in just 2 hrs. Can anyone suggest something on
> how to fix this or why this is happening
>
> explain SELECT account.id <http://account.id>,
> account.organization_id, run.application_id, work_unit.script,
> work_unit.id <http://work_unit.id>, work_unit.start_time, run.id
> <http://run.id>, work_unit.priority FROM work_unit, run, account
> WHERE work_unit.status = 3 AND work_unit.run_id = run.id
> <http://run.id> AND work_unit.type != 1 AND run.status = 1 AND
> run.account_id = account.id <http://account.id>;
you need to use EXPLAIN ANALYZE to get accurate data.
run it when the query is fast, and again when the query is slow, paste
both outputs here. also, you can paste them to
http://explain.depesz.com and that will give you a nice analysis of the
timing data included in the EXPLAIN ANALYZE output.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2014-07-17 23:51:33 | Re: Checkpoint_segments optimal value |
Previous Message | Prabhjot Sheena | 2014-07-17 23:39:40 | Re: Checkpoint_segments optimal value |
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2014-07-17 23:51:33 | Re: Checkpoint_segments optimal value |
Previous Message | Prabhjot Sheena | 2014-07-17 23:39:40 | Re: Checkpoint_segments optimal value |