Re: Query Performance Issue

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Wed, 24 Apr 2019 03:27:51 -0400
Message-ID: <043f86b5-1b75-6c33-baa1-ab1d13770a07_at_gmail.com>


Try this:

begin
dbms_stats.gather_table_stats(
ownname=> 'TMS',
tabname=> 'USERS' ,
estimate_percent=> DBMS_STATS.AUTO_SAMPLE_SIZE, cascade=> TRUE,
degree=>  4,
no_invalidate=> false,
granularity=> 'AUTO',
method_opt=> 'FOR ALL COLUMNS SIZE 254'); end;
/

You can also try flushing the shared pool afterwards.

On 4/24/19 2:25 AM, Rakesh Ra wrote:
> begin
> dbms_stats.gather_table_stats(
> ownname=> 'TMS',
> tabname=> 'USERS' ,
> estimate_percent=> DBMS_STATS.AUTO_SAMPLE_SIZE,
> cascade=> DBMS_STATS.AUTO_CASCADE,
> degree=> DBMS_STATS.AUTO_DEGREE,
> no_invalidate=> false,
> granularity=> 'AUTO',
> method_opt=> 'FOR ALL COLUMNS SIZE REPEAT');
> end;
> /

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Apr 24 2019 - 09:27:51 CEST

Original text of this message