missing estimation for coalesce function

2019-11-26 Thread Pavel Stehule
Hi I have a report from my customer about migration his application from Oracle to Postgres. The most significant issue was missing correct estimation for coalesce function. He had to rewrite coalesce(var, X) = X to "var IS NULL or var = X". Then the result was very satisfactory. Example: creat

Re: missing estimation for coalesce function

2019-11-27 Thread David Fetter
On Wed, Nov 27, 2019 at 08:47:56AM +0100, Pavel Stehule wrote: > Hi > > I have a report from my customer about migration his application from > Oracle to Postgres. > > The most significant issue was missing correct estimation for coalesce > function. He had to rewrite coalesce(var, X) = X to "var

Re: missing estimation for coalesce function

2019-11-27 Thread Pavel Stehule
Hi čt 28. 11. 2019 v 3:56 odesílatel David Fetter napsal: > On Wed, Nov 27, 2019 at 08:47:56AM +0100, Pavel Stehule wrote: > > Hi > > > > I have a report from my customer about migration his application from > > Oracle to Postgres. > > > > The most significant issue was missing correct estimatio

Re: missing estimation for coalesce function

2019-11-27 Thread Pavel Stehule
čt 28. 11. 2019 v 4:48 odesílatel Pavel Stehule napsal: > Hi > > čt 28. 11. 2019 v 3:56 odesílatel David Fetter napsal: > >> On Wed, Nov 27, 2019 at 08:47:56AM +0100, Pavel Stehule wrote: >> > Hi >> > >> > I have a report from my customer about migration his application from >> > Oracle to Postg

Re: missing estimation for coalesce function

2019-11-28 Thread Laurenz Albe
On Wed, 2019-11-27 at 08:47 +0100, Pavel Stehule wrote: > The most significant issue was missing correct estimation for coalesce > function. > He had to rewrite coalesce(var, X) = X to "var IS NULL or var = X". > Then the result was very satisfactory. > > postgres=# explain analyze select * from

Re: missing estimation for coalesce function

2019-11-28 Thread Pavel Stehule
čt 28. 11. 2019 v 15:51 odesílatel Laurenz Albe napsal: > On Wed, 2019-11-27 at 08:47 +0100, Pavel Stehule wrote: > > The most significant issue was missing correct estimation for coalesce > function. > > He had to rewrite coalesce(var, X) = X to "var IS NULL or var = X". > > Then the result was