Re: [PERFORM] Speeding up JSON + TSQUERY + GIN - Mailing list pgsql-performance

From Jeff Janes
Subject Re: [PERFORM] Speeding up JSON + TSQUERY + GIN
Date
Msg-id CAMkU=1xyf5ypGew=cgFuczQHqtc59J1CTf2EugF0hwSWu65ZCA@mail.gmail.com
Whole thread Raw
In response to [PERFORM] Speeding up JSON + TSQUERY + GIN  ("Sven R. Kunze" <srkunze@mail.de>)
Responses Re: [PERFORM] Speeding up JSON + TSQUERY + GIN
List pgsql-performance
On Sun, Feb 26, 2017 at 5:28 AM, Sven R. Kunze <srkunze@mail.de> wrote:


Using "select pg_prewarm('docs');" and on any of the indexes doesn't help either.
After a "systemctl stop postgresql.service && sync && echo 3 > /proc/sys/vm/drop_caches && systemctl start postgresql.service" the age=20, 30 or name=john queries are slow again.


Is there a way to speed up or to warm up things permanently?


If by 'permanently', you mean even when you intentionally break things, then no.  You will always be able to intentionally break things.  There is on-going discussion of an auto-prewarm feature.  But that doesn't yet exist; and once it does, a super user will always be able to break it.

Presumably you have a use-case in mind other than intentional sabotage of your caches by root.  But, what is it?  If you reboot the server frequently, maybe you can just throw 'select pg_prewarm...' into an init script?

Cheers,

Jeff

pgsql-performance by date:

Previous
From: "Sven R. Kunze"
Date:
Subject: Re: [PERFORM] Speeding up JSON + TSQUERY + GIN
Next
From: "Sven R. Kunze"
Date:
Subject: Re: [PERFORM] Speeding up JSON + TSQUERY + GIN