Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How I can determine whether table, index or column statistics are missing?

0
Posted

How I can determine whether table, index or column statistics are missing?

0

During its statistics runs, BRCONNECT checks only the tables and index tables. This means that missing column statistics can no longer be created over a long period of time. In addition, up until Release 6.20, BRCONNECT created statistics only for indexed columns. In the meantime, however, it is advisable to create statistics for all columns (Note 723894). The following SQL statements allow you to determine the missing statistics manually: * Indexes with missing statistics: SELECT T.TABLE_NAME, I.INDEX_NAME FROM DBA_TABLES T, DBA_INDEXES I WHERE I.OWNER = T.OWNER AND I.TABLE_NAME = T.TABLE_NAME AND T.LAST_ANALYZED IS NOT NULL AND I.LAST_ANALYZED IS NULL AND INDEX_TYPE != ‘LOB’; * Indexed columns with missing statistics: SELECT SUBSTR(T.OWNER, 1, 15) OWNER, SUBSTR(T.TABLE_NAME, 1, 30) TABLE_NAME, SUBSTR(TC.COLUMN_NAME, 1, 15) COLUMN_NAME, T.NUM_ROWS NUM_ROWS FROM DBA_TABLES T, DBA_TAB_COLUMNS TC, DBA_IND_COLUMNS IC WHERE T.OWNER = IC.TABLE_OWNER AND TC.OWNER = IC.TABLE_OWNER AND T.TABLE

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123