From: Alexander P. <ale...@re...> - 2009-03-05 17:48:30
|
Bill Oliver wrote: > CARDINALITY - Cardinality of table or index; number of rows in table if TYPE > is SQL_TABLE_STAT; number of unique values in the index if TYPE is not > SQL_TABLE_STAT; NULL is returned if the value is not available from the data > source. > > I know that you can retrieve cardinality for an INDEX, using RDB$STATISTICS > in RDB$INDICES, computing it like > CAST((CASE WHEN idx.rdb$statistics = 0 then 0 else 1 / idx.rdb$statistics > END) AS BIGINT) as CARDINALITY. This is provided your statistics are up to > date. I looked at the ODBCJDBC driver, and it doesn't seem to return this > information, though. > > Hi Bill, For that matter, I can add this logic into the ODBC driver in RC2 version maybe. Regards, Alexander Potapchenko |