Re: High memory usage in CachedPlan for large IN clauses in partitioned table updates

2025-03-24 Thread Tom Lane
"=?UTF-8?B?6LW15bqt5rW3KOW6reeroCk=?=" writes: > The testing query (more than 1000 condition after in clause): > UPDATE test SET migrate_account_batch_id = 'newtest2' WHERE (id, store_id) IN > (xxx); As you've discovered, this is a lousy way to write such a query. You'd get a better result by pu

High memory usage in CachedPlan for large IN clauses in partitioned table updates

2025-03-24 Thread 赵庭海(庭章)
Hi, Recently, I noticed that while I used pgjdbc to batch update a partition table, Cacheplan can sometimes use a lot of memory, this problem occurs in more Postgresql backend processes, which amplifies the impact. I tried to repeat this question in my test environment. The testing query (more t