Re: Telling When Statistics Present
Date: 1995/10/24
Message-ID: <308D0D70.1211_at_Bentley.nl>#1/1
Ari Kaplan wrote:
(stuff deleted)
> Dave,
>
> First, even if you have statistics on objects in the database,
as long as
> you specify "choose" in the init.ora file, Oracle will use
rule-based
> optimization.
Sorry, this is not true. Cost-based optimization will be used if any of the tables involved in the statements has statistics. The optimizer will make some guesses about tables without statistics.
>
> As far as I know, there are two ways to that statistics get
computed on
> objects:
>
> 1) Someone explicitly uses the "ANALYZE ..." commands
> 2) Doing an import analyzes the tables imported, estimating
statistics. This
> is performed after the data has been loaded and any
indexes/constraints
> created.
3 a quick way to do this in sqlplus is this command: execute dbms_utility.analyze_schema('<schemaowner>','COMPUTE') Your temporary tablespace has to be big enough though. If you don't really need it, do not use 'ESTIMATE', the estimates can be very inaccurate.
>
> Hope this helps!
>
> -Ari Kaplan
> Oracle consultant
> akaplan_at_interaccess.com
Sybrand Bakker
Senior IS Analyst
Bentley Systems Europe
Received on Tue Oct 24 1995 - 00:00:00 CET