Re: For loop execution times in PostgreSQL 12 vs 15

2023-02-13 Thread Pavel Stehule
po 13. 2. 2023 v 22:22 odesílatel Andres Freund napsal: > Hi, > > On 2023-02-10 20:45:39 +0100, Pavel Stehule wrote: > > But for significant improvements it needs some form of JIT (Postgres has > JIT > > for SQL expressions, but it is not used for PLpgSQL expressions). On > second > > hand,

Re: Performance of UPDATE operation

2023-02-13 Thread Jeff Janes
On Mon, Feb 13, 2023 at 10:09 AM Mkrtchyan, Tigran wrote: > > 0.524 0 BEGIN; > 0.819 0 INSERT INTO t_inodes (inumber, icrtime, > igeneration) > 0.962 0 UPDATE t_inodes SET igeneration = igeneration > + 1 where inumber = :inumber; >

Re: For loop execution times in PostgreSQL 12 vs 15

2023-02-13 Thread Andres Freund
Hi, On 2023-02-10 20:45:39 +0100, Pavel Stehule wrote: > But for significant improvements it needs some form of JIT (Postgres has JIT > for SQL expressions, but it is not used for PLpgSQL expressions). On second > hand, PL/pgSQL is not designed (and usually) not used for extensive numeric >

Re: Performance of UPDATE operation

2023-02-13 Thread Oluwatobi Ogunsola
Maybe reconsider your expectation. Note: Every “update” have to “select” before modifying data. Even if the page is in memory, there still work…reading ,acquiring lock, modifying and request to write to disk. Regards, Tobi > On 13 Feb 2023, at 18:48, Laurenz Albe wrote: > > On Mon,

Re: Performance of UPDATE operation

2023-02-13 Thread Laurenz Albe
On Mon, 2023-02-13 at 16:09 +0100, Mkrtchyan, Tigran wrote: > Typically we expect that UPDATE is a slow operation in PostgreSQL, however, > there are cases where it's hard to understand why. In particular, I have a > table like > > ``` > CREATE SEQUENCE t_inodes_inumber_seq >     START WITH 1 >  

Performance of UPDATE operation

2023-02-13 Thread Mkrtchyan, Tigran
Dear Postgres Folks, Typically we expect that UPDATE is a slow operation in PostgreSQL, however, there are cases where it's hard to understand why. In particular, I have a table like ``` CREATE SEQUENCE t_inodes_inumber_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE