Re: Query runs forever after upgrading to 9.3 - Mailing list pgsql-general

From Andrus
Subject Re: Query runs forever after upgrading to 9.3
Date
Msg-id B059C38DEDED4814A6634A825D9ADA6E@dell2
Whole thread Raw
In response to Re: Query runs forever after upgrading to 9.3  (bricklen <bricklen@gmail.com>)
Responses Re: Query runs forever after upgrading to 9.3
List 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.

pgsql-general by date:

Previous
From: bricklen
Date:
Subject: Re: Query runs forever after upgrading to 9.3
Next
From: bricklen
Date:
Subject: Re: Query runs forever after upgrading to 9.3