Re: Column Statistics - How to dertermine for whole database

From: "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>
To: "'Ow Mun Heng'" <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Column Statistics - How to dertermine for whole database
Date: 2008-03-13 02:33:53
Message-ID: 031701c884b2$b15ff480$141fdd80$@r@sbcglobal.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Is there a query to pg_catalog tables to find out which table/column
> has
> the stat level not at default in 1 sweep?

Try this:

select c.relname, a.attname, attstattarget
from pg_catalog.pg_attribute a, pg_catalog.pg_class c,
pg_catalog.pg_namespace n
where a.attrelid = c.oid and c.relnamespace=n.oid
and n.nspname = 'public' and a.attnum > 0

The value "-1" means to use the default (set in postgreql.conf)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-03-13 03:37:42 Re: postgre vs MySQL
Previous Message Craig Ringer 2008-03-13 02:26:37 Re: porting vb6 code to pgplsql, referencing fields