Re: Memory size

2018-03-11 Thread Jeff Janes
On Sun, Mar 11, 2018 at 10:33 AM, dangal  wrote:

> jeff thank you very much for your time, I tell you, they are the same
> queries
> with the same parameters, I take 3 minutes for example, but I execute it
> and
> it takes me seconds, that's why I suspect it is the shared buffer
> The server had 16 GB and we increased it to 24, but I really do not know if
> it should continue to increase since they are not our own resources, we
> have
> to ask for them and justify them
>

If that is the only query that you have trouble with, it might be easiest
just to set up a cron job to run it periodically just to keep that data set
in cache.  Not very elegant, but it can be effective.

Cheers,

Jeff


Sv: Memory size

2018-03-11 Thread Andreas Joseph Krogh
På søndag 11. mars 2018 kl. 13:48:41, skrev dangal >:

 Dear some consultation, I have a base of about 750 GB in size and we are
 having problem of slowness in certain views of the application, so I have
 been seeing it is apparently a memory problem because if I run again the
 view runs fast, the base is in a virtual server with 24 GB of RAM and 8 GB
 of shared buffer, with this information how much would you recommend to put
 a memory in the server
 thank you very much
 
What is effective_cache_size ?
 

https://www.postgresql.org/docs/10/static/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE
 
-- Andreas Joseph Krogh