ORA-01555 while gathering table statistics
Hello All,
While running a job to gather table statics it failed and I saw in my alert logs ORA-01555, below is the job:
DBMS_STATS.GATHER_TABLE_STATS (SCHEMA_NAME, TABLE_NAME, PARTITION_NAME, ESTIMATE_PERCENT => DBMS_STATS.AUTO_SAMPLE_SIZE, METHOD_OPT=> 'FOR ALL COLUMNS SIZE AUTO');What is the reason behind the ORA-01555 ?
How can I prevent it in the future ?
Regards,
There are two queries,
Below query for optimal undo size based on your undo retention
select d.undo_size / (1024 * 1024) "ACTUAL UNDO SIZE (MEGS)",
substr(e.value, 1, 25) "UNDO RETENTION (Secs)",
(to_number(e.value) * to_number(f.value) * g.undo_block_per_sec) /
(1024 * 1024) "NEEDED UNDO SIZE (MEGS)"
from (select sum(a.bytes) undo_size
from v$datafile a, v$tablespace b, dba_tablespaces c
where c.contents = 'UNDO'
and c.status = 'ONLINE'
and b.name = c.tablespace_name
and a.ts# = b.ts#) d,
v$parameter e,
v$parameter f,
(select max(undoblks / ((end_time - begin_time) * 3600 * 24)) undo_block_per_sec
from v$undostat) g
where e.name = 'undo_retention'
and f.name = 'db_block_size';
Below is the result from my database;
ACTUAL UNDO SIZE (MEGS) UNDO RETENTION (Secs) NEEDED UNDO SIZE (MEGS)
20860 900 955.6171875
Another query is based how much undo retention you have to configure as per the undo size
select d.undo_size / (1024 * 1024) "ACTUAL UNDO SIZE (MEGS)",
substr(e.value, 1, 25) "UNDO RETENTION (Secs)",
round((d.undo_size / (to_number(f.value) * g.undo_block_per_sec))) "OPTIMAL UNDO RETENTION (Secs)"
from (select sum(a.bytes) undo_size
from v$datafile a, v$tablespace b, dba_tablespaces c
where c.contents = 'UNDO'
and c.status = 'ONLINE'
and b.name = c.tablespace_name
and a.ts# = b.ts#) d,
v$parameter e,
v$parameter f,
(select max(undoblks / ((end_time - begin_time) * 3600 * 24)) undo_block_per_sec
from v$undostat) g
where e.name = 'undo_retention'
and f.name = 'db_block_size';
Below is the result from my database;
ACTUAL UNDO SIZE (MEGS) UNDO RETENTION (Secs) OPTIMAL UNDO RETENTION (Secs)
20860 900 19646
BTW, have you tried again by executing the same ?Yes with no problem, it only happened once
In the link you mention I read the below
"The ORA-1555 happens when people try to save space typically. They'll have small
rollback segments that could grow if they needed (and will shrink using OPTIMAL). So,
they'll start with say 10 or so 1meg rollback segments. These rollback segments COULD
grow to 100meg each if we let them (in this example) however, they will NEVER grow unless
you get a big transaction.
If your database does lots of little transactions, the RBS will never grow on their own.
They will stay small.
Now, someone needs to run a query that will take 5 minutes. On your system however the
rollback wraps every 2 minutes due to lots of little transactions going on. In this
system, ORA-1555's will happen frequently. What you need to do here is size rollback so
that it wraps less frequently (less frequently then your long running queries). Here if
I sized the rollback so that I had 10, 10meg segments (not so they could GROW to 10meg
but that they are starting at 10meg) we would wrap maybe every 20minutes now. that'll
give that 5minute query plenty of time to complete without reusing rollback it needs.
I Think this is exactly my case, how can I resize my redo segments ? and how can I check its current size?
Similar Messages
-
i have used a script to export a table from a database located in a machine and i'm importing the content of the table to another machine.
The table has 207 7390260 records.
But in the process of importing the data, it occurs the error: ORA-01555: snapshot too old: rollback segment number 2 with name "_SYSSMU2$" too small.
i've tried to change my undo_retention parameter to 1800, but the error continues to occur. i'm not sure if i can increase the undo_retention to a much bigger size. can i?
I'm using oracle 10g
here are some information about the undo tablespace:
AUTOEXT Tablespace Name File Name Size (M) Size (MaxMBytes) Used (M) Free (M)
YES UNDOTBS1 undotbs01.dbf 6000 131071,94 15,25 5967,88there is no information in the alert.log about the query.
i only have a log file created that says:
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calling DBMS_METADATA.FETCH_XML_CLOB [TABLE_DATA:"SCHEMA"."TABLE1":"D090502H1559"]
ORA-01555: snapshot too old: rollback segment number 2 with name "_SYSSMU2$" too small
ORA-06512: at "SYS.DBMS_METADATA", line 1546 -
Gathering Table Statistics throws errors ORA-20001 and ORA-06512 on 11g
Hi Forum!
I try to gather statistics on a 11.2.0.1 DB for a Siebel application.
The script which generates the statistics errors out and I don't know why. so I tried to query sys.dba_tab_statistics manually, but event then I receive an error:
select * from sys.dba_tab_statistics
ORA-20001: BIN$PV5XQQHLSAYJ0KPMEY1MHG==$0 is an invalid identifier
ORA-06512: in "SYS-DBMS_STATS", Zeile 2082
ORA-06512: in "SYS-DBMS_STATS", Zeile 2098
ORA-06512: in "SYS-DBMS_STATS", Zeile 26789
Any ideas?
Edited by: Penky on Oct 10, 2011 2:51 PMPenky wrote:
Note that I even get the error when doing a straight select * from dba_tab_statistics which I think should work fine, no?Is that:
select * from dba_tab_statisticsor
select * from sys.dba_tab_statisticsIt's unusual for a SYS view to error, unless that's a specific bug in that version of the database, though I wonder if there are other schemas, such as SYS which have got something in their recycle bin (not that anyone should have been creating and/or dropping things in SYS)? -
ORA-00081 & ORA-00600 while analyzing tables in 10g 10.2.0.2
Did anyone face the below issue while analyzing the tables and table partitions?
ORA-00081: address range [0x600000000009EC20, 0x600000000009EC24) is not readable
ORA-00600: internal error code, arguments: [qkaffsindex3], [], [], [], [], [], [], []
The failing sql is
'ANALYZE TABLE "SAP<SID>"."/BIC/E100076" PARTITION ("/BIC/E100076142008007") COMPUTE STATISTICS FOR TABLE FOR COLUMNS SIZE 75 "SID_0FISCPER","KEY_
1000761","KEY_1000762","KEY_1000763","KEY_1000765","KEY_1000766","KEY_1000767","KEY_100076P","KEY_ZXGL_C19T","KEY_ZXGL_C19U" FOR ALL LOCAL INDEX
ES'
Oracle version is 10.2.0.2 and OS is HP-UX Itanium ia64 11.23.I almost forgot it, anyway:
Do not use the COMPUTE and ESTIMATE clauses of ANALYZE statement to collect optimizer statistics. These clauses are supported solely for backward compatibility and may be removed in a future release. The DBMS_STATS package collects a broader, more accurate set of statistics, and gathers statistics more efficiently.
You may continue to use ANALYZE statement to for other purposes not related to optimizer statistics collection:
To use the VALIDATE or LIST CHAINED ROWS clauses
To collect information on free list blocks
Further reference:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
Adith -
Hi,
I am trying to gather statistics on a sample table dept.I created a statstable as follows
begin
DBMS_STATS.CREATE_STAT_TABLE ( 'scott' ,'dept_stats_tab');
end;
But when i open the statstable "Dept_stats_tab" i am not able to understand the meaning of the columns.
Can anybody let me know the what is purpose of the following cols of statstab
C1..C5,N1--N12,D1,R1,R2,CH1.
cheers
RRKYou have a valid question but this is what the documentation says...
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1035018
>>
This procedure creates a table with name stattab in ownname's schema which is capable of holding statistics. The columns and types that compose this table are not relevant as it should be accessed solely through the procedures in this package.
>> -
Error ORA-02019: while selecting table from oracle10g to SQL Server 2005
Hi all,
our oracle 10g database is on AIX 5.2 and i configures heterogeneous service and install oracle 10g cleint on windows 2003 server where SQL Server reside . i configured the following things but i got the error ORA-02019. please help me its very urgent. quick response will higly appreciated. thanks alot in advance.
1)create Sytem DSN (mysqlserver) by selectin SQL Native cleint
2)copy the existing entry and paste it in listener.ora file and edit it as below
LISTENERMYSQLSERVERDSN =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST= hostname of oracle database)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_ =
(SID_LIST=
(SID_DESC=
(SID_NAME= mysqlserver)
(ORACLE_HOME = /u01/app/oracle/product/101)
(PROGRAM=hsodbc)
$lsnrctl status LISTENERMYSQLSERVERDSN
It is working fine
3) configure TNAMES.ora
mysqlserver =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 100.100.50.5)
(PORT = 1521)
(CONNECT_DATA =
(SID = mysqlserver)
(HS = OK)
c:>tnsping mysqlserver
it is workin fine
4)copy inithsodbc.ora and make it initmysqlserver.ora
HS_FDS_CONNECT_INFO = mysqlserver
HS_FDS_TRACE_LEVEL = off
4)create the database link
sql>create database link mysqlserver
connect to "sa" identified by "nsp@123" using 'mysqlserver';
when i selecting SQL Server object from oracle i got below error
SQL> select * from NSP_products@mysqlserver;
select * from NSP_products@mysqlserver
ERROR at line 1:
ORA-02019: connection description for remote database not found
pLease help me its very urgent.
BEST REGARDHi all,
our oracle 10g database is on AIX 5.2 and i configures heterogeneous service and install oracle 10g cleint on windows 2003 server where SQL Server reside . i configured the following things but i got the error ORA-02019. please help me its very urgent. quick response will higly appreciated. thanks alot in advance.
1)create Sytem DSN (mysqlserver) by selectin SQL Native cleint
2)copy the existing entry and paste it in listener.ora file and edit it as below
LISTENERMYSQLSERVERDSN =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST= hostname of oracle database)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_ =
(SID_LIST=
(SID_DESC=
(SID_NAME= mysqlserver)
(ORACLE_HOME = /u01/app/oracle/product/101)
(PROGRAM=hsodbc)
$lsnrctl status LISTENERMYSQLSERVERDSN
It is working fine
3) configure TNAMES.ora
mysqlserver =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 100.100.50.5)
(PORT = 1521)
(CONNECT_DATA =
(SID = mysqlserver)
(HS = OK)
c:>tnsping mysqlserver
it is workin fine
4)copy inithsodbc.ora and make it initmysqlserver.ora
HS_FDS_CONNECT_INFO = mysqlserver
HS_FDS_TRACE_LEVEL = off
4)create the database link
sql>create database link mysqlserver
connect to "sa" identified by "nsp@123" using 'mysqlserver';
when i selecting SQL Server object from oracle i got below error
SQL> select * from NSP_products@mysqlserver;
select * from NSP_products@mysqlserver
ERROR at line 1:
ORA-02019: connection description for remote database not found
pLease help me its very urgent.
BEST REGARD -
Error occurred while gathering RDF/SEM statistics
Hi,
I have problem:
BEGIN
SEM_PERF.GATHER_STATS();
END;
ORA-13199: Error occurred while gathering RDF/SEM statistics
ORA-06512: на "MDSYS.MD", line 1723
ORA-06512: на "MDSYS.MDERR", line 17
ORA-06512: на "MDSYS.SDO_SEM_PERF", line 8
ORA-06512: на line 3
Thanks,
AlekseyFixed.
This error result of “unusable” indexes in schema MDSYS, on table RDF_LINK$.
Rebuild indexes fix error. -
ORA-01555: snapshot too old while creating large index
Dear All,
I have a newly created partitioned table of size 300GB.
On which i am creating a composite unique index having 5 columns(local partitioned).
The size of the index may be around 250GB(assume from a similar type table).
My DB version in Oracle 9i release 2.
Size of my undo tablespace is 12GB.
Undo related parameters are as below:
undo_management AUTO
undo_retention 18000
undo_suppress_errors FALSE
At 10:40:36 AM i fired the "create index .... local;" query
All day long i was monitoring using "select used_ublk,addr from v$transaction" and same below output all the times:
USED_UBLK ADDR
1 C000000185ECF458
[ using v$session(column TADDR) i found that "C000000185ECF458" is the ADDR of my transaction (if i am not wrong) ]
But at 11:09:27 PM (about 12 hours later) i found: ORA-01555: snapshot too old
I am sure that at that time my undo tablespace usages was below < 30%
At that time some insertion & selection was going on but those were not on this table.
Why this happened ? As far as i know oracle in AUM oracle doesn't overwrite existing undo data as long as there
is free space available.
While searching on web i found one post as below:
likeThanks guys for your prompt replys.
Yes i've monitored v$TEMPSEG_USAGE and DBA_SEGMENTS for the progress of the index creation, but this are not related to my question and yes i could use nologging or parallel (in gact i'm going to try all these options for faster index creation). On my original post i missed below part, please go through it:
While searching on web i found one post as below:
metalinknote #396863.1 which describes it
=> 2) When are UNDO segments OFFLINED?
Answer:
SMON decides on the # of undo segs to offline and drop based on the max transaction concurrency over a 12 hour period in 9i. This behavior is altered in 10g where the max concurrency is maintained over a 7-day period. Moreover, in 10g SMON doesn't drop the extra undo segs, but simply offlines them. SMON uses the same values with "fast ramp up" to adjust the number of undo segments online.
Link:[http://kr.forums.oracle.com/forums/thread.jspa?threadID=620489]
I says "SMON decides on the # of undo segs to offline and drop based on the max transaction concurrency over a 12 hour period in 9i.".
what does it mean ? Is this the cause for me, as my query war 12 hours old and my undo_retention is set to 5 hours ?
I'll be very grateful if some one explains the cause.
BR
Obaid -
Hi,
While doing Re-org ,we getting Ora-01555.We using 11g.
Alter table CMAR.HISTT move;
ERROR at line 1:
ORA-01555: snapshot too old: rollback segment number 85 with name "_SYSSMU85_4050276716$" too small.
Can we restart again?
Thanksuser13809017 wrote:
Hi,
While doing Re-org ,we getting Ora-01555.We using 11g.
Alter table CMAR.HISTT move;
ERROR at line 1:
ORA-01555: snapshot too old: rollback segment number 85 with name "_SYSSMU85_4050276716$" too small.
Can we restart again?I give up.
Can you?
I would expect the same error as log as DML occurs against CMAR.HISTT table -
Why ORA-01555 (Snapshot too old) occures on an unchanged table
Hello,
we have to add a not null column into a large table. The simple update is not good, due to UNDO space.
alter table T add F INTEGER default 0 not null;
ORA-30036: unable to extend segment by in undo tablespace ''It is OK. (We cannot use create + insert + drop + rename due to not enough free space. The table is not partitioned current) So we try this script:
--create the column without default and not null
alter table T add F INTEGER;
--create temp table with the rowids of T (nologging -> minimal log)
create table TMP (row_id rowid) nologging;
--save the rowid-s. (direct -> minimal undo usage)
insert /*+APPEND*/ into TMP(row_id) select rowid from T;
commit;
--the "insert method"
--set the column to "0" with frequently commit
declare
i integer := 0;
commit_interval integer := 10000;
begin
for c in (select * from TMP) loop
update T set F=0 where rowid=c.row_id;
i := i + 1;
if( mod(i,commit_interval)=0) then commit;
end if;
end loop;
commit;
end;
--set to not-null
alter table T modify F default 0 not null;
--drop the temp table
drop table TMP;the insert method occures
ORA-01555: Snapshot too old (in row 5)The row 5 is the cursor "select * from TMP" in the insert method. The undo usage of this method is below 2 MB.
My question is:
Why oracle need snapshot, while the TMP table does not change during the insert method? The TMP table was populated and commited before the insert method. Why oracle try to read the rows of the TMP table from the undo tablespace?
Thx: lados.Thank, I have read this article, but there is something, what I don't understand.
As I see, the DML does not clear all the modified datablock header, but it clears only the rollback segment slots. Only the next SQL (even if this is a query) clears the datablock header. This next SQL can clear only when the info is still available in the rollback segment, else ORA-1555 occures.
My question is:
What happens when the next SQL comes only one year later on this block? I don't believe that oracle doesn't handle this situation, but I didn't find how it is handled.
Thx: lados. -
Hello,
I have some problems with dbms_xmlschema.registerschema
My database is: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
My XSD schema is (SEPA pain.002.001.03.xsd) also available on this url: http://code.google.com/p/leontestbed/source/browse/trunk/bc2/sample/Schema/pain.002.001.03.xsd?r=241
After
begin
DOK_XML_UTIL.p_vnesi_xsd_blob(401941242); -- store a XSD on file system from blob field
dbms_xmlschema.registerschema(
schemaurl => 'http://localhost/TEST1.XSD',
schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
csid => nls_charset_id('AL32UTF8'));
commit;
end;I get:
ORA-31084: error while creating table "INIS_PROD"."Document2781_TAB" for element "Document"
ORA-02320: failure in creating storage table for nested table column "XMLDATA"."CstmrPmtStsRpt"."OrgnlPmtInfAndSts"
ORA-01792: maximum number of columns in a table or view is 1000
ORA-02310: exceeded maximum number of allowable columns in table
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 65
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 136
ORA-06512: at line 4
What I'am doing wrong or what is the reason for this error..Arrgghhh.....
begin
DOK_XML_UTIL.p_vnesi_xsd_blob(401941242);
dbms_xmlschema.registerschema(
schemaurl => 'http://localhost/TEST1.XSD',
schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
csid => nls_charset_id('AL32UTF8')
, local => true
, genTypes => false
, genTables => false);
commit;
end;sorry... -
Error while executing the table statistics using Brtools
Dear Team,
We are getting ORA-01031: insufficient privileges error whenever we have tried to execute the update or table statistics using brtools on our SAP development server. I have checked the permissions of sapcheck directory and changed it to 775 still error remains the same. I have observed, it is failing to create the sta or chk files in sapcheck directory after executing update statistics using Brtools.
BR0291I BRCONNECT will be started with options '-p initDEV.sap -l E -f stats -t "USTUD" -p 1'
BR0280I BRTOOLS time stamp: 2010-07-20 12.02.33
BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
c
BR0280I BRTOOLS time stamp: 2010-07-20 12.02.34
BR0257I Your reply: 'c'
BR0259I Program execution will be continued...
BR0801I BRCONNECT 6.40 (50)
BR0280I BRCONNECT time stamp: 2010-07-20 12.02.42
BR0301E SQL error -1031 at location BrLicCheck-12
ORA-01031: insufficient privileges
BR0806I End of BRCONNECT processing: cedsegpe.log 2010-07-20 12.02.42
BR0280I BRCONNECT time stamp: 2010-07-20 12.02.42
BR0804I BRCONNECT terminated with errors
I have checked the owner for SAPUSER table and it is showing as OPS$DEVADM
Please, advise me on the same.
Thanks and Regards,
KedarDear All,
Thanks for your responses.
Permissions are set as below for br* files.
sap-dev:devadm 23> ls -ltr br*
-rwxrwxr-x 1 oradev sapsys 3437688 Oct 31 2008 brarchive
-rwxrwxr-x 1 oradev sapsys 3547760 Oct 31 2008 brbackup
-rwxrwxr-x 1 oradev sapsys 4632408 Oct 31 2008 brconnect
-rwxrwxr-x 1 devadm sapsys 3850224 Oct 31 2008 brrecover
-rwxrwxr-x 1 devadm sapsys 1480656 Oct 31 2008 brrestore
-rwxrwxr-x 1 devadm sapsys 4837672 Oct 31 2008 brspace
-rwxrwxr-x 1 oradev sapsys 2175208 Oct 31 2008 brtools
I guess it is fine because with these set of permissions, it is working absolutely fine in my quality system.
QAS Permissions are as belows for your information
sap-qas:qa1adm 22> ls -ltr br*
-rwsrwxr-x 1 oraqa1 sapsys 3437688 Oct 31 2008 brarchive
-rwsrwxr-x 1 oraqa1 sapsys 3547760 Oct 31 2008 brbackup
-rwsrwxr-x 1 oraqa1 sapsys 4632408 Oct 31 2008 brconnect
-rwxrwxr-x 1 qa1adm sapsys 3850224 Oct 31 2008 brrecover
-rwxrwxr-x 1 qa1adm sapsys 1480656 Oct 31 2008 brrestore
-rwxrwxr-x 1 qa1adm sapsys 4837672 Oct 31 2008 brspace
-rwsrwxr-x 1 oraqa1 sapsys 2175208 Oct 31 2008 brtools
So do you feel still it has something to do with permissions?
Thanks and Regards,
Kedar -
Error ORA-02375 while trying to export/import JTF.JTF_PF_REPOSITORY table
We have already created an SR, In the mean time, trying to see whether anyone else has come across this issue. Thanks.
On : 11.2.0.3 version, Data Pump Import
Error ORA-02375 while trying to import JTF.JTF_PF_REPOSITORY table
We are getting the below error while performing the full db
import.
ORA-02375: conversion error loading table
"JTF"."JTF_PF_REPOSITORY" partition "EBIZ"
ORA-22337: the type of accessed
object has been evolved
ORA-02372: data for row: SYS_NC00040$ :
0X'8801FE000004AD0313FFFF0009198401190A434F4E4E454354'
This issue is
stopping our upgrade of database from 10.2.0.4 to 11.2.0.3. This is very
critical for us to be resolved.Hi,
seems this is Character set issue fo source and Target DB check this doc:Unable to Export Table WF_ITEM_ATTRIBUTE_VALUES due to errors ORA-02374, ORA-22337, and ORA-02372 (Doc ID 1522761.1)
HTH -
Raising ora-01426 error while truncating table
Hi,
We have a procedure which executes in the following process for few set of tabls
1. disables the constraints
2. truncating the tables
3. enabling the constraints
but after processing for 5 tables, while truncating the error throws
BEGIN <procedure name >; END;
ERROR at line 1:
ORA-01426: numeric overflow
ORA-06512: at "<procedurename> ", line 33
ORA-06512: at line 1
this line 33 point to execute immeidate 'truncate table < table name>
Can i know what would be reason for throwing ' numeric overflow' error while truncating table..
Thanks in advanceuser9080289 wrote:
thanks.
My oracle verision is 11gThen you could have the bug described there. Follow the instruction how to workaround (monitoring flush, set stats to low value) or apply the patch #8226471.
Nicolas. -
Table Statistics Gathering Query
Hey there,
I'm currently getting trained in Oracle and one of the questions posed to me were create a table, insert a million rows into it and try to find the number of rows in it. I've tried the following steps to solve this,
First table creation
SQL> create table t1(id number);
Table created.Data insertion
SQL> insert into t1 select level from dual connect by level < 50000000;
49999999 rows created.Gathering statistics
SQL> exec dbms_stats.gather_table_stats('HR','T1');
PL/SQL procedure successfully completed.Finally counting the number of rows
SQL> select num_rows from user_tables where table_name='T1';
NUM_ROWS
49960410
SQL> select count(*) from t1;
COUNT(*)
49999999My database version is,
SQL> select * from v$version;
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - ProductionI would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
Thank You,
Vishalvishm8 wrote:
Gathering statistics
SQL> exec dbms_stats.gather_table_stats('HR','T1');
PL/SQL procedure successfully completed.I would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
Thank You,
VishalBecause you aren't specifying a value for estimate_percent in the procedure call (to gather_table_stats) Oracle will pick an estimate value for you. If you want to sample the entire table you would need to explicitly specify that in your procedure call.
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_stats.htm#ARPLS68582
Maybe you are looking for
-
Music won't correctly play on iPhone 5s
I generally don't have any music on my phone since I keep it all on my iPod but with my iCloud back up, a few songs did load on my phone and I'm having some issues. 1 -- if I don't have the music downloaded to my phone but rather it's playing directl
-
I've been working on a project for a few days now, everything's been fine. Last night while editing, something happened when I was trying to add a transition between two clips. Now I can't select or edit any clips in the timeline anymore, and can't a
-
Acrobat/CS5.5 won't open from a non-Administrator account
I have an intermittent problem that occurs when I double-click a .pdf file from a non-Administrator account. Acrobat.exe shows up as an active process in Task Manager, but Acrobat never actually launches or opens the file. My administrator doesn't
-
Display suddenly "enlarged" and now moves when i move cursor
So my toddler just did some random key pushing on my laptop and all of a sudden my display has "enlarged" and is moving around when my cursor moves (I move the cursor to the left, the screen moves to the right). All functions are working correctly, i
-
How to fix Illegal seek error .DMG?
Hi, I recently bought Call of Duty 4: Modern Warfare for Mac Download at Amazon after downloading it I tried to install it but a dialog box pops up and and says Warning the following disk images could not be opened reason/s: Illegal seek . I tried t