Re: For loop execution times in PostgreSQL 12 vs 15

2023-02-10 Thread Pavel Stehule
Hi > Please, don't send screenshots - we believe you :-) > > Your code can be little bit faster if you use flag IMMUTABLE > > There were more patches that reduced the overhead of expression's > evaluation in PL/pgSQL. > > History > > https://github.com/postgres/postgres/commits/master/src/pl/plpg

Re: For loop execution times in PostgreSQL 12 vs 15

2023-02-10 Thread Pavel Stehule
Hi pá 10. 2. 2023 v 19:53 odesílatel Adithya Kumaranchath < akumaranch...@live.com> napsal: > Hi all, > > I am running a simple test and am curious to know why a difference in > execution times between PostgreSQL 12 vs PostgreSQL 15. > > *I have this function:* > CREATE function test() returns i

For loop execution times in PostgreSQL 12 vs 15

2023-02-10 Thread Adithya Kumaranchath
Hi all, I am running a simple test and am curious to know why a difference in execution times between PostgreSQL 12 vs PostgreSQL 15. I have this function: CREATE function test() returns int language plpgsql as $$ declare v_number bigint; v_multiplier float = 3.14159; loop_cnt

Re: Domain check taking place unnecessarily?

2023-02-10 Thread Mark Hills
On Thu, 9 Feb 2023, Tom Lane wrote: > Mark Hills writes: > > On Wed, 8 Feb 2023, Laurenz Albe wrote: > >> It takes 30 seconds to schan the table and determine that all existing > >> rows satisky the constraint. > > > But there's no existing data (note this is adding column, not constraint) > >