Re: [EXT] Re: How to delete column level Stats/Histogram

2024-05-30 Thread David Rowley
(please keep communication on the list) On Fri, 31 May 2024 at 13:43, Wong, Kam Fook (TR Technology) wrote: > > Silly question why did I run into this problem below? Will the autovacuum > analyze abc reset it back which I don't want it to. > > DELETE FROM pg_statistic WHERE starelid = 'abc'::re

Re: How to delete column level Stats/Histogram

2024-05-30 Thread David Rowley
On Fri, 31 May 2024 at 09:28, Wong, Kam Fook (TR Technology) wrote: > Is there a way to delete a specific column level stats/histogram. The > following approach does not work. > > alter table abc alter column bg_org_partner set statistics 0; > analyze abc; You'd have to: DELETE FROM pg_stati

How to delete column level Stats/Histogram

2024-05-30 Thread Wong, Kam Fook (TR Technology)
1. Is there a way to delete a specific column level stats/histogram. The following approach does not work. alter table abc alter column bg_org_partner set statistics 0; analyze abc; select * FROM pg_stats where tablename in ('abc' ) and attname = 'bg_org_partner'; the most_common_