> "Richard Winston" <rwinstonNOPSPAM.ORG> wrote in message
>>Mark, I know you're trying to be helpful in your own way, but what
>>exactly is not specific about wanting a query "to find cardinality of
>>indexed columns" ?
> I apologize, I lost track of your details contained in the subject line, and
> got sidetracked on your problems with the tool.
> It might be easier (and more accurate) to write SQL statements to go against
> the tables to determine the cardinality. They will be fairly efficient if
> they use indexed columns.
> This example assumes two columns taken together as might be with a composite
> with temp as
> select distinct col1, col2 from table_name
> select count(*) from temp ;
> The SYSIBM.SYSINDEXSTATS table has the following information if you know the
> names of the indexes.
> FIRSTKEYCARDF - number of distinct values of the first key column.
> FULLKEYCARDF - number of distinct values of the entire key (for multi-column
> Use OWNER (Authorization ID of the owner of the index) and NAME (Name of the
> index) in your WHERE clause to find the index you want. Index names for a
> table can be found in the SYSIBM.SYSINDEXES table (you can join this table
> with the other one).
> A value of -1 means the statistics have not been gathered since the object
> was last created. Remember that if a change is made to an object, it may
> have been dropped and recreated.