"Bug" in statistics for v7.2?

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: "Bug" in statistics for v7.2?
Date: 2002-02-13 13:53:43
Message-ID: 20020213095031.H19107-100000@mail1.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2002-02-13 14:41:34 Re: Odd statistics behaviour in 7.2
Previous Message mlw 2002-02-13 13:44:10 Re: benchmarking postgres