Re: view reading information_schema is slow in PostgreSQL 12

2020-06-13 Thread Tom Lane
David Rowley writes: > On Sat, 13 Jun 2020 at 19:52, David Rowley wrote: >> On Sat, 13 Jun 2020 at 16:07, Tom Lane wrote: >>> Hm. Maybe we could reasonably assume that the equality operators used >>> for such constructs are error-and-side-effect-free, thus dodging the >>> semantic problem I men

Re: view reading information_schema is slow in PostgreSQL 12

2020-06-13 Thread David Rowley
On Sat, 13 Jun 2020 at 19:52, David Rowley wrote: > > On Sat, 13 Jun 2020 at 16:07, Tom Lane wrote: > > > > David Rowley writes: > > > I wondered if it would be more simple to add some smarts to look a bit > > > deeper into case statements for selectivity estimation purposes. An > > > OpExpr lik

Re: view reading information_schema is slow in PostgreSQL 12

2020-06-13 Thread David Rowley
On Sat, 13 Jun 2020 at 16:07, Tom Lane wrote: > > David Rowley writes: > > I wondered if it would be more simple to add some smarts to look a bit > > deeper into case statements for selectivity estimation purposes. An > > OpExpr like: > > CASE c.contype WHEN 'c' THEN 'CHECK' WHEN 'f' THEN 'FOREIG