"Bug" in statistics for v7.2? - Mailing list pgsql-hackers

From Marc G. Fournier
Subject "Bug" in statistics for v7.2?
Date
Msg-id 20020213095031.H19107-100000@mail1.hub.org
Whole thread Raw
Responses Re: "Bug" in statistics for v7.2?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Okay, if I'm understanding pg_stats at all, which I may not be, n_distinct
should represent # of distinct values in that row, no?

But, I have one field that has 5 distinct values:

iwantu=# select distinct(profiles_faith) from iwantu_profiles;profiles_faith
----------------             0             1             2             7             8
(5 rows)

But pg_stats is reporting 1:
   tablename    |        attname         | avg_width | n_distinct
-----------------+------------------------+-----------+------------iwantu_profiles | profiles_faith         |         2
|         1
 

So am I reading n_distinct wrong?



pgsql-hackers by date:

Previous
From: mlw
Date:
Subject: Re: benchmarking postgres
Next
From: Doug McNaught
Date:
Subject: Re: Connection Pooling