Re: [HACKERS] auto_explain : log queries with wrong estimation

2017-08-28 Thread Adrien Nayrat
On 08/24/2017 03:08 PM, Maksim Milyutin wrote: [...] > > AFAICS you want to introduce two additional per-node variables: >  - auto_explain_log_estimate_ratio that denotes minimum ratio (>= 1) between > real value and planned one. I would add 'min' prefix before 'ratio'. >  -

Re: [HACKERS] auto_explain : log queries with wrong estimation

2017-08-24 Thread Maksim Milyutin
On 24.08.2017 14:56, Adrien Nayrat wrote: Hi hackers, Hi, I try to made a patch to auto_explain in order to log queries with wrong estimation. I compare planned row id : queryDesc->planstate->plan->plan_rows Vs ntuples : queryDesc->planstate->instrument->ntuples; AFAICS you want to

[HACKERS] auto_explain : log queries with wrong estimation

2017-08-24 Thread Adrien Nayrat
Hi hackers, I try to made a patch to auto_explain in order to log queries with wrong estimation. I compare planned row id : queryDesc->planstate->plan->plan_rows Vs ntuples : queryDesc->planstate->instrument->ntuples; If I understand, instrumentation is used only with explain. So my patch