From: Michael Fuhr <mike@fuhr.org>
To: Nimesh Satam <nimesh.zedo@gmail.com>
Cc: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: pgsql-performance@postgresql.org
Cc: database@zedo.com
Subject: Re: pg_statistic doesnt contain details for specific table
Date: Mon, 11 Jun 2007 08:34:23 -0600
Message-ID: <20070611143423.GA33335@winnie.fuhr.org> (raw)
In-Reply-To: <965aa3ed0706110652k496af68di8217d488fa6e297a@mail.gmail.com>
References: <965aa3ed0706110150g6f5e85bevfb4be0b50b649271@mail.gmail.com>
<466D0DB4.2080404@enterprisedb.com>
<965aa3ed0706110158r27c9c19aj32a87d9ccf7e2383@mail.gmail.com>
<20070611132953.GA32879@winnie.fuhr.org>
<965aa3ed0706110652k496af68di8217d488fa6e297a@mail.gmail.com>
On Mon, Jun 11, 2007 at 07:22:24PM +0530, Nimesh Satam wrote:
> INFO: analyzing "public.cam_attr"
> INFO: "cam_attr": scanned 103 of 103 pages, containing 11829 live rows and
> 0 dead rows; 6000 rows in sample, 11829 estimated total rows
Looks reasonable.
> Also how do we check if the statistics are set to Zero for the table?
SELECT attname, attstattarget
FROM pg_attribute
WHERE attrelid = 'public.cam_attr'::regclass
AND attnum > 0
AND NOT attisdropped;
If nobody has changed the statistics targets then they're all
probably -1. Negative attstattarget values mean to use the system
default, which you can see with:
SHOW default_statistics_target;
How exactly are you determining that no statistics are showing up
for this table? Are you running a query like the following?
SELECT *
FROM pg_stats
WHERE schemaname = 'public' AND tablename = 'cam_attr';
--
Michael Fuhr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mike@fuhr.org, nimesh.zedo@gmail.com, heikki@enterprisedb.com, database@zedo.com
Subject: Re: pg_statistic doesnt contain details for specific table
In-Reply-To: <20070611143423.GA33335@winnie.fuhr.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox