table analyze issue [message #522035] |
Tue, 06 September 2011 00:39 |
andy huang
Messages: 498 Registered: July 2011
|
Senior Member |
|
|
Dear all,
The rows of table tb_hxl_list is 100,000,and set the parameters Estimate_Percent to 2 ,after analyzed,the sample_size is 4939,how do oracle to calculate?
SQL> Select Count(1)
2 From hxl.TB_HXL_LIST;
COUNT(1)
----------
100000
SQL> show user;
USER is "HXL"
SQL> Begin
2 Dbms_Stats.Delete_Schema_Stats(Ownname => 'HXL');
3 End;
4 /
PL/SQL procedure successfully completed.
SQL> Begin
2 Dbms_Stats.Gather_Schema_Stats(Ownname => 'HXL',
3 Estimate_Percent => 2,
4 Method_Opt => 'for all indexed columns',
5 Degree => 2,
6 Cascade => True);
7 End;
8 /
PL/SQL procedure successfully completed.
SQL> Select a.num_rows,a.sample_size
2 From Dba_Tables a
3 Where a.table_name In ('TB_HXL_LIST');
NUM_ROWS SAMPLE_SIZE
-------- -----------
99521 4939
|
|
|
|
|
|
|
Re: table analyze issue [message #522055 is a reply to message #522045] |
Tue, 06 September 2011 03:51 |
cookiemonster
Messages: 13959 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Well unless you what dodgy statistics you're going to have to replicate everything the job was doing. Have you considered moving the time it runs at instead?
|
|
|