Thread: Finding cardinality of an index

Finding cardinality of an index

From
Bill Chandler
Date:
All,

Is there a way to determine cardinality (size) of an
index?  In general how to you query the 'attributes'
(for lack of a better word) of an index.

thanks,

Bill

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Re: Finding cardinality of an index

From
"Jim C. Nasby"
Date:
http://www.postgresql.org/docs/8.0/static/catalog-pg-class.html

On Thu, Apr 21, 2005 at 08:11:09AM -0700, Bill Chandler wrote:
> All,
>
> Is there a way to determine cardinality (size) of an
> index?  In general how to you query the 'attributes'
> (for lack of a better word) of an index.
>
> thanks,
>
> Bill
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

--
Jim C. Nasby, Database Consultant               decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

Re: Finding cardinality of an index

From
"pgsql-general@diroussel"@xsmail.com
Date:
I know two ways:

1) Use DbVisualizer, very handy, but a bit slow.  For a give table go to
the indexes tab and it's show you the cardinality

2) Use this sql

SELECT relname, relkind, reltuples as cardinality, relpages
FROM pg_class
WHERE relname LIKE 'mytablename%';

David
----- Original message -----
From: "Bill Chandler" <billybobc1210@yahoo.com>
To: "pgsql-general" <pgsql-general@postgresql.org>
Date: Thu, 21 Apr 2005 08:11:09 -0700 (PDT)
Subject: [GENERAL] Finding cardinality of an index

All,

Is there a way to determine cardinality (size) of an
index?  In general how to you query the 'attributes'
(for lack of a better word) of an index.

thanks,

Bill

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings