Re: [External] Re: FDW, too long to run explain

2019-02-18 Thread Vijaykumar Jain
Oh Wow, i guess you are right. I just ran example where local runs make use of parallel setup, but not FDW. i have three servers 2 x pg10 1 x pg11 i run queries on coordinator node ( pg11 ) which makes calls to foreign server to do a simple count. the individual nodes run the query in parallel,

Re: [External] Re: FDW, too long to run explain

2019-02-17 Thread Jeff Janes
On Sun, Feb 17, 2019 at 6:32 AM Vijaykumar Jain wrote: > I am yet to figure out the reason, what we have done is implement fake > columns to represent samples and giving them random numbers and keeping > other bulls to fake limit. > > Most of the queries that were impacted were the ones that did

Re: [External] Re: FDW, too long to run explain

2019-02-17 Thread Jeff Janes
On Sun, Feb 17, 2019 at 2:37 PM Vijaykumar Jain wrote: > > Ok, i raked this from the logs where enabled log_min_duration_statement = > 10s > > 2019-01-31 12:48:18 UTC LOG: duration: 29863.311 ms statement: EXPLAIN > SELECT blah, FROM public.view WHERE ((scheduled_bdt >= '2019-01-20'::date)) >

Re: [External] Re: FDW, too long to run explain

2019-02-17 Thread Vijaykumar Jain
Regards, Vijay On Mon, Feb 18, 2019 at 12:56 AM Jeff Janes wrote: > On Sun, Feb 17, 2019 at 1:52 PM Vijaykumar Jain > wrote: > >> Assuming your questions as 1,2,3, please find my answers below. >> >> 1)"explain" on foreign servers run as "idle in transactions". coz they >> were running very

Re: [External] Re: FDW, too long to run explain

2019-02-17 Thread Vijaykumar Jain
Hey Jeff, yes, we now relaxed the idle in transaction setting to 15 mins. i was hesitant to increase the settings as it blocked auto vaccum. We use hot_standby_feedback = true also as we split reads/writes and allow long running queries on read replicas, this too affects auto vaccum. so overall,

Re: [External] Re: FDW, too long to run explain

2019-02-17 Thread Jeff Janes
On Sun, Feb 17, 2019 at 1:52 PM Vijaykumar Jain wrote: > Assuming your questions as 1,2,3, please find my answers below. > > 1)"explain" on foreign servers run as "idle in transactions". coz they > were running very long (in the order of some minutes) , pgbouncer (in tx > level pooling) setting

Re: [External] Re: FDW, too long to run explain

2019-02-17 Thread Vijaykumar Jain
I am yet to figure out the reason, what we have done is implement fake columns to represent samples and giving them random numbers and keeping other bulls to fake limit. Most of the queries that were impacted were the ones that did not push order by and limit to foreign servers. I am also trying