Re: Accessing view USER_TABLES

From: Murray Kaiser <ae873_at_cfn.cs.dal.ca>
Date: Mon, 20 Mar 1995 13:04:18 GMT
Message-ID: <D5qpn8.pM_at_cs.dal.ca>


Robert Martin (rmartin_at_mindspring.com) wrote:

: I am using the NUM_ROWS column from the built in view USER_TABLES.  It works 
: well most of the time, but sometimes the NUM_ROWS value is NULL, even when the 
: table actually has rows.
 

: Are the tables that make up the view only updated periodically? How can I : ensure from within a PL/SQL program unit that the NUM_ROWS value is correct?

--

As I understand it:

The NUM_ROWS column, along with other statistical columns would only be 
updated after you issue the following SQL command


>ANALYZE TABLE tablename COMPUTE STATISTICS;
or
>ANALYZE TABLE tablename ESTIMATE STATISTICS;
If you insert or delete a lot of rows, run the ANALYZE statement again. Murray Kaiser | Usual gutless disclaimer.. Nova Scotia Power | Opinions are mine and not necessarily (Murray.Kaiser_at_NSPower.NS.CA) | shared by my employer
Received on Mon Mar 20 1995 - 14:04:18 CET

Original text of this message