Re: Query is slow when run for first time; subsequent execution is fast

2018-01-17 Thread Michael Paquier
On Tue, Jan 16, 2018 at 09:18:25PM -0800, Jeff Janes wrote: > Oh. I've not seen that before. But then again I don't often restart my > server and then immediately run very large queries with a stringent time > deadline. > > You can try pg_prewarm, on pg_statistic table and its index. But I'd >

RE: Query is slow when run for first time; subsequent execution is fast

2018-01-17 Thread Nandakumar M
Hi, On 17 Jan 2018 12:55, "POUSSEL, Guillaume" wrote: Are you on Windows or Linux? I’m on Windows and wondering if the issue is the same on Linux? I have experienced this on Mac and Linux machines. You can try pg_prewarm, on pg_statistic table and its index. But I'd probably just put an entr