Table statistics / index statistics generation
Hi,
How often do you run/should system run table & index statistics through DBA calendar/BRtool? What impact on system load does it have? Do you run it for all tables & indecies above certain size?
Thank you,
Mike
hi Dear,
How often do you run/should system run table & index statistics through DBA calendar/BRtool*S*?
basically we can run with DB13 and if you want to run through BRTOOLS then following steps:
Run --> brtools
select 7
select 1
press C three time
process will be executing the table.
press c // now i m applying
What impact on system load does it have?
it maintain the update and good for health of database...// like.. you don't stable yourseft with out exercise mean it is exercise of datebase
Do you run it for all tables & indecies above certain size?
yea
don't forget the point
regards,
majamil
Similar Messages
-
How to Gather Statistics of Tables and Indexes
Hi all,
Plz help me in Gathering Statistics of Tables and Indexes.
Thanksfor tables
exec dbms_stats.gather_table_stats('SCOTT', 'EMPLOYEES');
for indexes
exec dbms_stats.gather_index_stats('SCOTT', 'EMPLOYEES_PK');
check this link for detail
http://nimishgarg.blogspot.com/2010/04/oracle-dbmsstats-gather-statistics-of.html -
How to handle the MISSING STATISTICS:Table or Index has no optimizer stats
Dear All,
For some of our recently created Ztables, we have been receiving an error message of MISSING STATISTICS in the system saying that Table or Index has no optimizer statistics. To solve the problem, when I go for creating an index with the key fields of the table, I receive a message that these fields are already there in the index 0 (primary index).
Pls advice how to solve this issue.
Regards,
Alok.Hi friend,
Please delete all primary and secondary indexes and redo creation of index. Now u will surely be able to create it. -
Display statistics history of tables and indexes
hi,
in display statistics history of tables and indexes i can see only one year old table history, how we can check the table history for more than one year?
Thanks,
NithinWelcome to SDN,
Please search on help.sap.com or SDN before you post your query to avoid duplicate thread.
I think below link will clear your doubt. help.sap.com/saphelp_nw70ehp1/helpdata/en/a6/8c933bf687e85de10000000a11402f/frameset.htm -
i need collect the statistics for few tables from a schema. i am doing the following:
i am creating a table to save the statistics.
begin
dbms_stats.create_stat_table(ownname =>'TEST',
statab =>'TEST_ORD',);
end;
and then i am gathering the table stats for a particular table as follows:
exec dbms_stats.gather_table_stats(
ownname => 'BNS',
estimate_percent =>'10,
statown =>'TEST',
tabname =>'ORDERS',
stattab =>'TEST_ORD',
statid =>'CR');
my question is how can do for multiple tables ? the reason is i have to create a Job to run this script automatically daily.
can i put this into a procedure? or any other ideas?
Appreciate all your help!In many environments the default job does a pretty good job of generating statistics, but I have to agree that there are environments where the default job does not produce very good statistics which is why I mentioned the ability to lock statistics. For anyone who has not had to deal with statistics much you can generate a workable set of statistics manually and then lock them in place so the provided automatich statistics generation task does not re-generate a specific set of statistics.
Also by default the 10g task collects histograms. If histograms were not in use in 9i then removing the histograms often 'fixes' most of the query performance issues encounted upon upgrading to 10g in these cases. 11g adds the ability set dbms_stats parameters at the table level and have those settings retained for use with future stats collection.
Yes cron assumes a UNIX (or Linux) platform but Windows also has a job scheduler available. I am not sure what difference RAC would make. We use cron tasks against RAC all the time. We do normally just run the tasks against the local instance.
Nicely organized script/code library.
HTH -- Mark D Powell -- -
Re: Unable to see Table statistics on when I click on the Table
I have lost the ability to see table statistics when I click on the table. I use to be able to click on the table name under the connection window and would get a display of The columns, data, constraints, index,dependencies etc..... Now It does not seem to work any more I tried preferences but I don't seem to be able to change the behavior back to the way it was any suggestions.
I upgraded to 1.2 and it solved the problem. I would however love to know the settings that control this display.
-
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 -
Import Table Statistics to another table
Hi,
Just like to know if I can use dbms_stats.import_table_stats to import table statistics to another table?
Scenario:
I exported the table statistics of the table (T1) using the command below.
exec dbms_stats.export_table_stats('<user>','T1',NULL,'<stat table>');
PL/SQL procedure successfully completed.
And then, I have another table named T2, T1 and T2 are identical tables. T2 does not have statistics (I intentionally did not run gather statistics). I am wondering
if I can import table statistics from T1 to T2 using dbms_stats package?.
For what I understand, statistics can be imported back at the same table which is T1 but not for another table using dbms_stat package. If I am wrong, anyone can correct me.
Thankshi
just try ;-) you lose nothing probably,
check afterwards last_analyzed value for that table in user_tables
if something is wrong, run regular stats -
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 -
Hi
Is there any command to delete gathered statistics of a table
suppose : I have gather table statistics as under
exec dbms_stats.gather_table_stats('TEST1','EMP');
now I want to delete the statistics from the above table EMP
Regards
JewelThe package dbms_stats is fully documented in the Oracle supplied package and type reference manual for your unknown version of Oracle.
It has a call to delete statistics.
As per forums etiquette, please do the obvious first and consult documentation.
Sybrand Bakker
Senior Oracle DBA -
IMPDP take too much time at TABLE STATISTICS
Hi experts.
on of my database is taking taking to much time during IMPDP at TABLE STATISTICS. it take alomost 20 mints to import TABLE STATISTICS while on the other hand all other objects are imported within 5 to 7 minits.
my database version is 10.2.0.1 and O/S Red Hat Enterprise Linux AS release 3 (Taroon Update 5)
please guide how i can fix this issue
thanx in Advance.
regardsplease guide how i can fix this issueSeems to be a bug. Upgrade to 10.2.0.4.0 or 10.2.0.5.0 and check again.
Ronny Egner
My Blog: http://blog.ronnyegner-consulting.de -
Table Statistics failed during Import
Hi All,
I am trying to import an existing schema in Oracle 10g.
I am using the impdp utility.
The export dump consists of the complete schema (metadata and data).
But it failed with the following logs.
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS while calling DBMS_METADATA.CONVERT []
ORA-06502: PL/SQL: numeric or value error
LPX-00007: unexpected end-of-file encountered
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPW$WORKER", line 6235
----- PL/SQL Call Stack -----
object line object
handle number name
1945A21C 14916 package body SYS.KUPW$WORKER
1945A21C 6300 package body SYS.KUPW$WORKER
1945A21C 12279 package body SYS.KUPW$WORKER
1945A21C 3279 package body SYS.KUPW$WORKER
1945A21C 6889 package body SYS.KUPW$WORKER
1945A21C 1262 package body SYS.KUPW$WORKER
1CD814AC 2 anonymous block
Job "THHIS"."SYS_IMPORT_FULL_02" stopped due to fatal error at 11:47:38
I had then used the parameter EXCLUDE=STATISTICS and then the import was successful.
I would like to the significance of this STATISTICS.
I mean would EXCLUDE=STATISTICS always be ok?
I have exported and imported the scheme as a user and not as sysdba. Does this make any difference?
any suggestion would be highly appreciated.
Thanks,
TanujaHi,
See related threads here:
ORA-39125 & DBMS_METADATA
Error ORA-39125 and ORA-04063 during export for transportable tablespace
ORA-39125: Worker unexpected fatal error in string while calling string [string]
Cause: An unhandled exception was detected internally within the worker process for the Data Pump job while calling the specified external routine. This is an internal error. Additional information may be supplied.
Action: If problem persists, contact Oracle Customer Support.
Hope this helps . . .
Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: The Definitive Reference"
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm -
DB02 view is empty on Table and Index analyses DB2 9.7 after system copy
Dear All,
I did the Quality refresh by System copy export/import method. ECC6 on HP-UX DB29.7.
After Import Runstats status n Db02 for Table and Index analysis was empty and all value showing '-1'. Eventhough
a) all standard backgrnd job scheduled in sm36
b) Automatic runstats are enabled in db2 parameters
c) Reorgchk all scheduled periodically from db13 and already ran twice.
4) 'reorgchk update statistics on table all' was also ran on db2 level.
but Run stats staus in db02 was not getting updated. Its empty.
Please suggest.
Regards
VinayHi Deepak,
Yes, that is possible (but only offline backup). But for the new features like reclaimable tablespace (to lower the high watermark)
it's better to export/import with systemcopy.
Also with systemcopy you can use index compression.
After backup and restore you can have also reclaimable tablespace, but you have to create new tablespaces
and then work with db6conv and online table move to move one tablespace online to the new one.
Best regards,
Joachim -
Hi all,
we have checked "missing table and indexs" status with DBACOCKPIT and there it show 362 Indexes are not created.
all are the standard table indexes.
we have updated the indexes and statistics with BRCONNECT also.and its complited successfully.after this also "it show 362 Indexes are not created". we are using SOLARIS OS and oracle database.
Can anybody help me out how to rebuilt the missing indexes .....plz mention the steps.
Thanks,
Rableen khuranaHi,
Refer to the note and lins on how to fix it
Note 1320008 - DBA Cockpit: Selection in "Missing Tables and Indexes"
http://wiki.sdn.sap.com/wiki/display/TechTSG/(DB)IndexReportedasMissing
http://help.sap.com/saphelp_nwpi711/helpdata/en/33/5b277b8b0745b8b60e67ca04c77ebb/content.htm
Thanks,
Arjun -
Reorganization of tablespaces, tables and indexes.
Hello Experts,
What is the concept of tablespaces, statistics , tables and indexes in SAP/Oracle ? Where are they used and what are they meant for ?
Wt is the concept and procedure of performing Reorganization of tablespaces, tables and indexes ? why do we need it for ?
Requested to revertb at earliest as its urgent . points guaranteed .
Regards,
SomyaHello Somya,
Probably difficult to explain entire information in this thread. But you definately get good information in the following link
http://help.sap.com/saphelp_47x200/helpdata/en/0d/d2fafd4a0c11d182b80000e829fbfe/frameset.htm
Please drill down through menus, and you will be able to get good information.
Also you can check the following SAP notes
666061 FAQ: Database objects, segments and extents
912620 FAQ: Oracle indexes
588668 FAQ: Database statistics
592393 FAQ: Oracle
541538 FAQ: Reorganizations
Regards,
Madhukar -
TABLE SIZE 및 INDEX SIZE(크기) 계산
제품 : ORACLE SERVER
작성날짜 : 2002-10-15
TABLE SIZE 및 INDEX SIZE(크기) 계산
===================================
1. TABLE SIZE 계산 공식(ORACLE BLOCK SIZE : 2K 로 가정)
$ sqlplus scott/tiger
SQL> SELECT GREATEST(4, ceil(ROW_COUNT /
((round(((1958 - (initrans * 23)) *
((100 - PCTFREE) /100)) / ADJ_ROW_SIZE)))) * BLOCK_SIZE)
TableSize_Kbytes
FROM dual;
*. 한 개의 BLOCK에 Available 한 Bytes - 1958
*. 각 initrans 는 23 Bytes
*. PCT_FREE : Table 의 pctfree 값(default 10)
*. ADJ_ROW_SIZE : 각 row 의 평균 SIZE 추정치
*. ROW_COUNT : table 의 row 의 갯수
*. BLOCK_SIZE : 1 block의 크기 (단위: K)
예) table 이름이 EMP 일 경우
ROW_COUNT : select count(*) from emp;
ADJ_ROW_SIZE :
analyze table emp compute statistics;
(또는 건수가 매우 많을 때에는 compute 대신 estimate 사용)
select avg_row_len
from user_tables
where table_name='EMP';
2. INDEX SIZE 계산 공식
SQL> SELECT GREATEST(4, (1.01) * ((ROW_COUNT /
((floor(((2048 - 113 - (initrans * 23)) *
(1 - (PCTFREE/100))) /
((10 + uniqueness) + number_col_index +
(total_col_length)))))) * DB_BLOCK_SIZE))
IndexSize_Kbytes
FROM dual;
*. 한 개의 block에 available 한 bytes ( 1935 or 2048 - 113 )
*. 각 initrans 는 23 Bytes
*. ROW_COUNT : table 의 row 의 갯수
*. PCTFREE : Index 의 pctfree 값(default 10)
*. number_col_index : Index 에서 column 의 수
*. total_col_length : Index 의 길이 추정치
*. uniqueness : 만일 unique index 이면 1, non-unique index 이면 0.
*. DB_BLOCK_SIZE : 1 block의 크기 (단위: K)데이터블록 레이아웃을 보면..
Data Block Layout
Block header에는 cache layer와 Transaction layer을 가지고 있습니다.
Data layer에는 Table directory, Row directory, Free space, Row data
이렇게 나누어지구요..
v$type_size를 보면.. KCB와 KTB의 크기가 실제로 헤더의 크기입니다.
여기서는 92로 계산되었는데..
2048-92=1956 으로 나옵니다.
여기서의 값이 아닐지요? 2바이트가 차이나긴 하군요.;
COMPONENT TYPE DESCRIPTION TYPE_SIZE
KCB KCBH BLOCK COMMON HEADER 20
KTB KTBIT TRANSACTION VARIABLE HEADER 24
KTB KTBBH TRANSACTION FIXED HEADER 48
Maybe you are looking for
-
Hello all, Is there any way to use sy-datum or something like that to store execution date of a query? Thanks in advance Carmen
-
I can't export anymore pages file to pdf
When I try to export pages file in pdf format (ever done without problems till few hours ago!) there is an alert advising me that files name having more than 31 characters can't be saved in the destination volume. But although I cut the lenght of the
-
I need password reset bios for mini cq10 115ss with code CNUO180Y4M,please help me and sorry for mi bad lenguage.
-
TCT* Info objects and Authorization objects
When defining an authorisation object do I need to include TCT* info objects as fields in the authorisation object and if so why and which ones are required - if this is different for different scenario could someone elaborate? Thanks
-
Screen Capture and Game Capture Frames are "Jittery"
I took a capture of and OpenGL game "Minecraft" (it saved in .avi), but when I import it into Premiere Elements the footage will go smoothly, then cut back multiple frames, then skip ahead resulting in unusable video. The same thing happens when I s