Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-09 Thread Peter J. Holzer
On 2021-09-06 07:13:07 -0700, David G. Johnston wrote: > On Monday, September 6, 2021, Philippe Doussot > wrote: > > I whas hopping the same optimisation as you: Write in place. > > How exactly would you expect “update-in-place” to work given the nature of > MVCC? Some databases (e.g. Oracl

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-07 Thread Philippe Doussot
On 06/09/2021 16:13, David G. Johnston wrote: On Monday, September 6, 2021, Philippe Doussot mailto:philippe.dous...@up.coop>> wrote: I whas hopping the same optimisation as you: Write in place. How exactly would you expect “update-in-place” to work given the nature of MVCC? David J.

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-06 Thread David G. Johnston
On Monday, September 6, 2021, Philippe Doussot wrote: > I whas hopping the same optimisation as you: Write in place. > > > How exactly would you expect “update-in-place” to work given the nature of MVCC? David J.

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-06 Thread Philippe Doussot
On 05/09/2021 17:21, Tom Lane wrote: "David G. Johnston" writes: On Friday, September 3, 2021, Philippe Doussot wrote: I don't understand why disabling all index from the table speed up the update because the boolean column is not indexed Index entries point to physical records. You just del

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-06 Thread Philippe Doussot
On 06/09/2021 10:21, rob stone wrote: On Sun, 2021-09-05 at 11:21 -0400, Tom Lane wrote: "David G. Johnston" writes: On Friday, September 3, 2021, Philippe Doussot < philippe.dous...@up.coop> wrote: I don't understand why disabling all index from the table speed up the update because the boo

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-06 Thread rob stone
On Sun, 2021-09-05 at 11:21 -0400, Tom Lane wrote: > "David G. Johnston" writes: > > On Friday, September 3, 2021, Philippe Doussot < > > philippe.dous...@up.coop> > > wrote: > > > I don't understand why disabling all index from the table speed > > > up the > > > update because the boolean colu

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-05 Thread Tom Lane
"David G. Johnston" writes: > On Friday, September 3, 2021, Philippe Doussot > wrote: >> I don't understand why disabling all index from the table speed up the >> update because the boolean column is not indexed > Index entries point to physical records. You just deleted one physical > record a

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-05 Thread David G. Johnston
On Friday, September 3, 2021, Philippe Doussot wrote: > > One UPDATE of one boolean value which is non-indexed take some time ( for > many tuples .. 3 Millions ). > > But if we disable all indexes/fk the UPDATE is 10x faster and do 10x less > shared hit . > > I don't understand why disabling all i

update non-indexed value is slow if some non-related index/fk are enabled

2021-09-05 Thread Philippe Doussot
Hi all, I'm look for some hint about this behaviour : One UPDATE of one boolean value which is non-indexed take some time ( for many tuples .. 3 Millions ). But if we disable all indexes/fk the UPDATE is 10x faster and do 10x less shared hit . I don't understand why disabling all index from