Re: Query runs forever after upgrading to 9.3

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "bricklen" <bricklen(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query runs forever after upgrading to 9.3
Date: 2013-09-23 16:12:52
Message-ID: B059C38DEDED4814A6634A825D9ADA6E@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
>>21 shared_buffers 2400MB configuration file
>What are effective_cache_size and work_mem set to? The defaults?

Yes.

>They are good candidates to be increased. effective_cache_size could be set to (for example) 10GB, depending on >how much memory gets consumed by the other application(s) running on that server.

There are 10 human users and one web service user. Windows Task Manager cached value shows 10 GB
in evening when nobody is working in server.

I changed those to

effective_cache_size= 10GB
work_mem = 400MB

Hope that this is OK.

>The EXPLAIN ANALYZE plan of your query will show if work_mem needs to be increased, as there will be a line saying >something like "External merge: disk sort" (or something like that, can't recall the exact message off the top of my >head).

After adding indexes log contains

LOG: duration: 11045.000 ms statement: create index on tempkaive(toode);create index on tempalgsemu(toode);SELECT * FROM toode o WHERE exists (SELECT toode FROM tempkaive i where o.toode=i.toode) OR EXISTS (SELECT toode FROM tempalgsemu i WHERE o.toode = i.toode)

In development computer from where explain was posted and problem with copy of database also occurs:

"shared_buffers";"128MB";"configuration file"

> You likely want to bump that up closer to 1GB.

I changed it. Thank you very much.

Andrus.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message bricklen 2013-09-23 16:16:29 Re: Query runs forever after upgrading to 9.3
Previous Message bricklen 2013-09-23 15:49:07 Re: Query runs forever after upgrading to 9.3