Update Statistics and Rebuild of Indexes
Hi friends,
If I execute the Update statistics for a given table thru DB20 does it have any effect on the indexes of this table or is it necessary to rebuild the index using db02
Regards
Aliila
Updating Statistics does not rebuild index while in update states logs it will show you information regarding which indexes needs to be rebuiled which you can rebuild by brtools or executing rsanaora prg in se38.
Shivam
Similar Messages
-
UPDATE STATISTICS and merry-go-round scanning
Hello everybody,
if I do UPDATE STATISTICS [table] SQL Server internally scans the table multiple times for different statistics objects (good description by Kendra Little at
http://www.brentozar.com/archive/2014/01/update-statistics-the-secret-io-explosion/).
Does anybody know whether these scans are executed parallel to each other and can profit from merry-go-round scan mechanism? (http://msdn.microsoft.com/en-us/library/ms191475.aspx).
Thanks in advance.My impression is that they executed one by one on the same thread, but I have not researched this very closely.
Erland Sommarskog, SQL Server MVP, [email protected] -
Automated Delete and Rebuild of BIA Indexes
We have several cubes that we will be loading into BIA that use non-cumulative key figures. We have heard that it is necessary to periodically rebuild these indexes to keep the BIA performance high. My question is how do we automate this process? I don't see a process chain step or program for deleting an index.
There is program RSDDTREX_AGGREGATES_FILL, but will this rebuild an index if it already exists?Hi
Deleting and rebuilding the Cube indexes will improve the the loading performance.
It is very much required for for Full loads and Big loads.
When it comes to Delta loads or Small loads, then it depends upon the volume of data you are going to get.
Say like you are getting below 10000 records in daily delta's, then i think no need to delete and rebuild indexes.
If you know that you will get more than1 lack records, then it's good to go for deletion and rebuild of indexes.
Example : I load an Infocube once by week in full upload (3 millions of records) after deleting all the content of the previous week. Is it a good idea to add steps of deleting/rebuilding indexes in this case ?
In this case, it is required.
Note: 1) If you want you can test in your development system, run the same load first time by deleting indexes and second time without deleting the indexes. you will come to know the time difference.
2) Anyhow deletion and rebuilding of indexes step will take less than 2 or 3 mins time unless if you have huge volume of uncomressed data in your cube.
Regards,
Venkatesh. -
Hi All,
I am geting the following error in the DB13 update statistics jobs.
BR0986W Index SAPRP1.DD31S~0 is unbalanced - please rebuild the index
BR0280I BRCONNECT time stamp: 2007-10-21 06.17.05
BR0301E SQL error -604 at location stats_ind_collect-2
ORA-00604: error occurred at recursive SQL level 1
ORA-01089: immediate shutdown in progress - no operations are permitted
BR0886E Checking/collecting statistics failed for index SAPRP1.DSYAX~0
BR0280I BRCONNECT time stamp: 2007-10-21 06.17.05
BR0301E SQL error -1089 at location stats_ind_collect-2
ORA-01089: immediate shutdown in progress - no operations are permitted
BR0886E Checking/collecting statistics failed for index SAPRP1.DSYAX~VIE
BR0280I BRCONNECT time stamp: 2007-10-21 06.17.05
BR0301E SQL error -3114 at location stats_ind_collect-2
ORA-03114: not connected to ORACLE
BR0886E Checking/collecting statistics failed for index SAPRP1.DSYBA~0
BR0280I BRCONNECT time stamp: 2007-10-21 06.17.05
BR0301E SQL error -3114 at location stats_ind_collect-2
ORA-03114: not connected to ORACLE
BR0886E Checking/collecting statistics failed for index SAPRP1.DSYBB~0
BR0280I BRCONNECT time stamp: 2007-10-21 06.17.05
BR0301E SQL error -3114 at location stats_ind_collect-2
ORA-03114: not connected to ORACLE
Please help me with it
Thanks and regards,
Tajinder'UPDATE SAP_SDBAD SET LINE = 'A 00000000 0000000000000000 00000000 00079877 00000174 00000172 00000000 00000000 00000
Hi ALL
i'm getting below error in db13, please help me
ORA-03114: not connected to ORACLE
BR0325W Writing to database log failed
BR0280I BRCONNECT time stamp: 2013-05-06 21.44.15
BR0301W SQL error -3114 at location thr_db_disconnect-1, SQL statement:
'COMMIT RELEASE'
ORA-03114: not connected to ORACLE
BR0327W Disconnect from database instance RGP failed
BR0806I End of BRCONNECT processing: celdhczg.sta2013-05-06 21.44.15
BR0280I BRCONNECT time stamp: 2013-05-06 21.44.15
BR0804I BRCONNECT terminated with errors
External program terminated with exit code 5
BRCONNECT returned error status E
Job finished -
Update statistics ends with error
Hi Techies
Few months back our BI system got crashed then ,we re-install the system & restore the database,Now the issue is whenever we are running the update statistics it gives the following error & terminates with error.
BR0301E SQL error -20000 at location stats_ind_collect-2, SQL statement:
'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"/BIC/B0000598000KE"', ESTIMATE_PERCENT => NULL, DEGREE => NULL,
ORA-20000: index "SAPSR3"."/BIC/B0000598000KE" or partition of such index is in unusable state
ORA-06512: at "SYS.DBMS_STATS", line 10613
ORA-06512: at "SYS.DBMS_STATS", line 10648
ORA-06512: at line 1
BR0886E Checking/collecting statistics failed for index SAPSR3./BIC/B0000598000KE
BR0301E SQL error -20000 at location stats_tab_collect-18, SQL statement:
'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000598000"', ESTIMATE_PERCENT => 30, METHOD_OPT => 'FOR A
ORA-20000: index "SAPSR3"."/BIC/B0000598000KE" or partition of such index is in unusable state
ORA-06512: at "SYS.DBMS_STATS", line 13159
ORA-06512: at "SYS.DBMS_STATS", line 13179
ORA-06512: at line 1
BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000598000
Environment Details
OS-AIX 5.3
DB-Oracle 10.2.0.2.0
SAP-SAP Netweaver 2004s
BI-SAP Netweaver BI 7.0
Quick response appreciated
Thanks
VijayHi,
ORA-20000: index "SAPSR3"."/BIC/B0000598000KE" or partition of such index is in unusable state
rebuild the index using BRTOOLS.
Run brtools
select 3 --> SEGMENT MANGEMENT --> 2 - Rebuild indexes --> 7 ~ Index names (index)
provide your index name here SAPSR3"."/BIC/B0000598000KE
and rebuild the index
after running rebuild index , start again Update Statistics.
it will run succesful
Thanks
Anil -
Database updates statistics maintenance plan issue.
Hi team,
We are configured one job through maintenance plan that job name is “database update statistics” and database size is 280 Gb, this job executing 13 to 15 hours but job was not finished still it’s continually running.
This same job I am running through below script it’s executing within 2 hours.
Use database
Go
Exec sp_updatestats
What is the main problem if this maintenance plan.
Note: on this server no jobs and no traffic, only abc_update subpaln1 Job.Hello,
Updating stats for whole database which is 280 G will always result in problem.It is better to run update statistics for tables and indexes which are changed frequently.
Now to your question few points which sp_Updatestas list in BOL
http://technet.microsoft.com/en-us/library/ms173804.aspx
sp_updatestats updates statistics on disabled nonclustered indexes and does not update statistics on disabled clustered indexes.
sp_updatestats updates only the statistics that require updating based on the rowmodctr information in the sys.sysindexes catalog view, thus avoiding unnecessary updates of statistics
on unchanged rows.
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Update statistics & DB check fail
Dear all,
During the update statistics and DB check, we are facing below problem
10.11.2008 07:00:56 TARGETSYSTEM = C1Pci-pub
10.11.2008 07:01:22 'CONNECT /'
10.11.2008 07:01:22 ORA-01033: ORACLE initialization or shutdown in progress
10.11.2008 07:01:22 BR0310E Connect to database instance C1P failed
10.11.2008 07:01:22 BR0280I BRCONNECT time stamp: 2008-11-10 07.01.22
10.11.2008 07:01:22 BR0301E SQL error -1033 at location db_connect-2,SQL statement:
10.11.2008 07:01:22 'CONNECT /'
10.11.2008 07:01:22 ORA-01033: ORACLE initialization or shutdown in progress
10.11.2008 07:01:22 BR0310E Connect to database instance C1P failed
Please guide us ..what need to be done
VimalHi
SAP VERSION ECC 6.0
BR TOOLS VERSION 7.00 (18)
BR0801I BRCONNECT 7.00 (18)
BR0805I Start of BRCONNECT processing: cdzfacge.cln 2008-11-07 15.28
BR0101I Parameters
Regards
Vimal -
Update Statistics for the database MS-SQL
hi all ,
I want to run the statistics programmatically ( update statistics ) and our database is MS-SQL. Can any one tell me which is the suitable function module to do the same.
Thanks,
RamIf you did not find this - I found the function module 'update_stats'.
How this helps
Or maybe you found somthing else? -
Error while rebuilding the index
HI
can any one help me with this.
while i am trying to drop and rebuild an index i got the error like...
ORA-01652: unable to extend temp segment by 8091 in tablespace SYSTEM
what have to be done....
Thanks in advance...user8884944 wrote:
HI
can any one help me with this.
while i am trying to drop and rebuild an index i got the error like...
ORA-01652: unable to extend temp segment by 8091 in tablespace SYSTEM
what have to be done....
Thanks in advance...It wasn't the direct cause of your error, but what were you doing trying to build an index in the SYSTEM tablespace?
As for the error itself
http://lmgtfy.com/?q=ORA-01652 -
Gents,
After trying various switches in the POA startup file to fix a very slow search issue, I am left with rebuilding the index files. I have looked at the GPW7 admin guide and found very little on this practice, Could someone point me to a support file or resource where i can delete and rebuild the index files.
thank youRemember to put /qflevel-999 in the poa startup file and unload/reload the
POA before you kick off the Ctrl-Q though
Cheers Dave
Dave Parkes [NSCS]
Occasionally resident at http://support-forums.novell.com/ -
Gathering schema Statistics and Index rebuilding
I want to know after how much time we must gather the schema Statistics and Index rebuilding.
In our system approximately 7 logfile generates in one day
Please suggest meIndex rebuilding sounds so much Oracle 7! Indexes today generally take care of themselves quite well, throughout inserts, deletes and updates. It rebalances itself automatically when necessary, without requiring any rebuild. As for the stats, run it for sure after large data movements (i.e. deletes and inserts). Besides that, implement table monitoring for your tables, and run once in a while dbms_stats with the options parameter as GATHER STALE. That way, Oracle will automatically know which objects need their stats refreshed.
Daniel -
Rebuild Index VS Drop and Rebuild?
Hey all,
I am currently redesigning a weekly process (weekly coz we pre determined the rate of index fragmentation) for specific indexes that get massive updates. The old process has proved to be able to fix and maintain reports performance.
In this process we rebuild specific indexes using the below command:
Alter index index_name rebuild online;
This command takes around 10 min for selected indexes.
Testing the below took 2 min for 6 or 7 indexes.
Drop Index Index_Name;
Create Index Index_Name on Table_name (Col1, col, ..);
I know that indexes might not be used, and the application performance would be degraded with stale or non-existent stats. But our production and all our test DBs have procedures that daily gather stats on them.
I tested the below script to make sure that execution plan does not change:
SELECT ProductID, ProductName, MfrID FROM PRODUCT WHERE MFRID = 'Mfr1';
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
| 0 | SELECT STATEMENT | | 37 | 3737 | 13 (0)|
| 1 | TABLE ACCESS BY INDEX ROWID| PRODUCT | 37 | 3737 | 13 (0)|
| 2 | INDEX RANGE SCAN | PRODUCT_X1 | 37 | | 3 (0)|
dropping PRODUCT_X1 and recreating it only changed the cost to 12.
Gathering the stats again took the cost to 14.
No performance issues were faced and index was still used.
My question is: Is there any oracle recommendation that requires rebuilding the index instead of dropping and recreating it?
Is there any side effect to my approach that I did not consider?
Thank youCharlov wrote:
I am currently redesigning a weekly process (weekly coz we pre determined the rate of index fragmentation)Nice. Not only have you defined and located index fragmentation but have also measured the rate at which it occurs.
Could you please share your definition of index fragmentation, how you detect it, and how you measure the rate of change of this fragmentation.
I am curious about all this since it can be repeatedly shown that Oracle btree indexes are never fragmented.
http://richardfoote.files.wordpress.com/2007/12/index-internals-rebuilding-the-truth-ii.pdf
The old process has proved to be able to fix and maintain reports performance.Great so you have traces and run time statistics from before and after the rebuild that highlight this mysterious fragmentation and show how the fragmentation caused the report to be slow, details what effects the rebuild had that caused the reports to perform better.
Please share them as these would be an interesting discussion point since no one has been able to show previously how an index rebuild caused a report to run faster or even show the fragmentation that caused it to be slow in the first place.
I mean it would be a pity if the report was just slow because of an inefficient plan and compressing an index or two that probably shouldn't be used in teh first place appears to temporarily speed it up. Could you imagine rebuilding indexes every week, because some developer put the wrong hint in a query? That would be pretty funny. -
Update statistics / missing index
The performance has been downgraded after the DB migration... The Query seems running slower than it used to be,
How can I update statistics / find missing index to fix it in Oracle?hi....
after the importing of the db please run the compilation script below
SET HEAD OFF
SET FEEDBACK OFF
SET PAGESIZE 0
SPOOL COM.SQL
SELECT 'ALTER '|| OBJECT_TYPE||' '|| OBJECT_NAME ||' COMPILE ; ' FROM
USER_OBJECTS
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE != 'PACKAGE BODY'
ORDER BY OBJECT_TYPE
SELECT 'ALTER PACKAGE '|| OBJECT_NAME ||' COMPILE BODY ; ' FROM USER_OBJECTS
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE = 'PACKAGE BODY'
ORDER BY OBJECT_TYPE
spool off
@com.sql
SET HEAD ON
SET FEEDBACK ON
SET PAGESIZE 100
this will compile database objects such as packages, functions and rebuilds indexes
regards,
steved -
Is reindexing and rebuilding statistics nessiary
I'm reducing the size of a SQL database from 115905 records to about 110000 records. My SQL server administrator is nowhere to be found. Is it critical to have the database rebuild
indexes and update statistics before I let users get back into the front end application and do regular work?
I've been doing these archives daily for a week and he rebuilds indexes and updates statistics each day before I let the users get in.Since you deleted large no of records updatiing stats would be a good option .And if you rebuild index with full scan,which i dont think would be necessary to do after delete process,stats would automatically be updated .
More or less index rebuild depends on fragmentation >30 % you rebuild and between 30 and 10 you reorganize.
Since it is your daily task I would suggest you to look at Ola hallengren script
http://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
What is the difference between the drop and create the index and rebuild index ?
Hi All,
what is the difference between drop and create index & rebuild index ? i think both are same...Please clarify if both are same or any difference...
Thanks in Advance,
rupBoth are same. Rebuilding an index drops and re-creates the index.
Ref:
SSMS - https://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx
TSQL - https://msdn.microsoft.com/en-us/library/ms188388.aspx
I would suggest you to also refer one of the best index maintenance script as below:
https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
Maybe you are looking for
-
Apple dvi to video adapter for macpro working?
hallo, is it possible to use the adapter for the geforce 7300 in the macpro for pal video output? will it work? the apple store lists the adapter only for g5 and mini, but i see no reason, why it shoud not work with the gforce... any idea? thank you.
-
Burning DVD's in Premiere Elements
Is it possible, or necessary to make DVD's in different formats eg .wmv in Premiere Elements?
-
Mac book air. its startup disk is jammed full. frozen
my assistant has a mac book air. its startup disk is jammed full. I was able to access iphoto so she could delete some files. The computer wont load the dock so i can empty the trash. what can I do to free up space and get the machine running aga
-
I click on the stamp to open my email and it does nothing. Don't know how to fix it. Can anyone help?
-
How do i run a Repair Disk from ARD
how do i run a Repair Disk from ARD