Why is n_distinct always -1 for range types?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Why is n_distinct always -1 for range types?
Date: 2013-09-19 20:47:11
Message-ID: 523B62CF.5080502@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Test:

1. create a table with a range type column.
2. insert 1000 identical values into that column.
3. analyze
4. n-distinct will still be listed as -1 (unique) for the column.

Why?

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2013-09-19 21:36:53 Re: [PERFORM] encouraging index-only scans
Previous Message Robert Haas 2013-09-19 18:39:43 Re: [PERFORM] encouraging index-only scans