Search Postgresql Archives

Re: Finding cardinality of an index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
To: "pgsql-general" <pgsql-general@xxxxxxxxxxxxxx>
Date: Thu, 21 Apr 2005 08:11:09 -0700 (PDT)
Subject:  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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux