Home » RDBMS Server » Performance Tuning » Analyze Table
icon9.gif  Analyze Table [message #159549] Mon, 20 February 2006 04:25 Go to next message
vikashbansal
Messages: 2
Registered: February 2006
Junior Member
Hi Gurus ,

I have analyzed two base tables in oracle schema by using the conventional SQL as

analyze table table_name compute statistics

After that when i try to fetch data from the views that are using the base tables , repond much slowly.

Ideally the fetch time should get decreased or remail same .But in mine case it is increased.

So please suggest me what could be the possible reasons for the same.
Re: Analyze Table [message #159569 is a reply to message #159549] Mon, 20 February 2006 06:03 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>Ideally the fetch time should get decreased or remail same .But in mine case it is increased.
Not a hardrule. CBO will not magically increase the performance.
It will just identify the best plan according to the available statistics.
Post your explain plan output and you need to collect histograms.
Either use DBMS_STATS
or
atleast
analyze table tname compute statistics for all indexes for all indexed columns size 250
(refer sticky)

Regards
Re: Analyze Table [message #159671 is a reply to message #159569] Mon, 20 February 2006 20:40 Go to previous messageGo to next message
vikashbansal
Messages: 2
Registered: February 2006
Junior Member
Hi Mahesh,

I am attaching the execution plan observed after generating the DBMS stats and after deleting the DBMS stats.

Thanks in advance
Vikash
  • Attachment: Stats.zip
    (Size: 2.16KB, Downloaded 1395 times)
Re: Analyze Table [message #159751 is a reply to message #159671] Tue, 21 February 2006 04:17 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
why would you delete the statistics? It will not help the query anyhow. how did you delete the statistics?
As said before,
CBO decides the plan based on statistics available.
It considers a lot of patterns in data and decides the plan.
Histogram is most important thing.
Previous Topic: fragmented tables and indexes
Next Topic: Unique constraint versus unique index
Goto Forum:
  


Current Time: Sat Nov 23 14:22:14 CST 2024