On Tue, Dec 16, 2014 at 4:18 PM, Cristian Iturrieta <citurrieta@bbr.cl> wrote:
Dear pgadmin-hackers,
I have the following query: What could be due to a single query sql one day run fast and another slow.
Hi Cristian. Since your question concerns the PostgreSQL database and not the pgAdmin client (they are separate efforts), it would be more appropriately asked in the Postgres General list: <pgsql-general@postgresql.org>. I believe you will have greater success getting answers there.
The database has massive loads overnight and the next day serves datawarehouse. This causes the first query is slower by having to go find all the information to disk. With a new process is achieved load data from disk cache operating system that is able to improve response times. I have doubts as to refresh cache and as the LRU (least recently used) works. One way to optimize the query was generating "Common Table Expressions", here is my other question, where are CTE's stored?, Work_mem?, Buffer cache?, Temporary tablespace ?, etc ..