Re: alter table xxx set unlogged take long time

2022-07-26 Thread Jim Mlodgenski
om: Tom Lane > Sent: Tuesday, July 26, 2022 8:43 PM > To: James Pang (chaolpan) > Cc: Jim Mlodgenski ; > pgsql-performance@lists.postgresql.org > Subject: Re: alter table xxx set unlogged take long time > > "James Pang (chaolpan)" writes: > > How to make it fast ?

Re: alter table xxx set unlogged take long time

2022-07-26 Thread Jim Mlodgenski
On Tue, Jul 26, 2022 at 4:53 AM James Pang (chaolpan) wrote: > Hi , > > We have PG v13.6 in RHEL8.4, we try to set table unlogged before load > data. There are a lot of existing data in this table, when ‘alter table > xxx set unlogged’, we found it take long time and spend time on IO > datafile

Re: Want function to be called only once in query

2021-09-16 Thread Jim Mlodgenski
On Thu, Sep 16, 2021 at 4:51 AM Steve Pritchard wrote: > > I have a PL/pgSQL function that I want to call within a query, but the > function is fairly expensive to execute so I only want it executed once > within the query. However the planner seems to reorganize my query so that it > calls the