From: | "Wong, Kam Fook (TR Technology)" <kamfook(dot)wong(at)thomsonreuters(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | How to delete column level Stats/Histogram |
Date: | 2024-05-30 21:27:56 |
Message-ID: | CH0PR03MB61008E885DA648855B38E273FEF32@CH0PR03MB6100.namprd03.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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_vals remain and most_common_freqs remain the same.
1. Any other ways or workaround such as wiping out a specific table level stat, then restore the stats but minus 1 column. And the future vacuum analyze/analyze will not be updating that specific column stat.
Thank you
This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website: https://www.thomsonreuters.com/en/resources/disclosures.html
From | Date | Subject | |
---|---|---|---|
Next Message | johnlumby@hotmail.com | 2024-05-30 22:34:23 | Re: Rules and Command Status - update/insert/delete rule with series of commands in action |
Previous Message | Adrian Klaver | 2024-05-30 21:19:52 | Re: Rules and Command Status - update/insert/delete rule with series of commands in action |