Thread: clear pg_stats

clear pg_stats

From
"Campbell, Lance"
Date:

How can I clear the pg_stats views without restarting PostgreSQL?  I thought there was a function.

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 

Re: clear pg_stats

From
Heikki Linnakangas
Date:
Campbell, Lance wrote:
> How can I clear the pg_stats views without restarting PostgreSQL?  I
> thought there was a function.

SELECT pg_stat_reset();

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Re: clear pg_stats

From
Magnus Hagander
Date:
Campbell, Lance wrote:
> How can I clear the pg_stats views without restarting PostgreSQL?  I
> thought there was a function.

pg_stat_reset()

//Magnus