DEVFYI - Developer Resource - FYI

What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?

JDBC Interview Questions and Answers


(Continued from previous question...)

What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?

To answer the second question first, the tableIndexStatistic constant in the TYPE column will identify one of the rows in the ResultSet returned when DatabaseMetaData.getIndexInfo() is invoked. If you analyze the wordy API, a tableIndexStatistic row will contain the number of rows in the table in the CARDINALITY column and the number of pages used for the table in the PAGES column.

(Continued on next question...)

Other Interview Questions