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

Similar Messages

  • 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

  • Is it required to update statistics once new index is created

    Hi,
    oracle version: 8i
    i had created new index(size 0f 10g) on one table is it Required to update statistics immediately for the better execution plan.
    bash-2.05$ sqlplus "/as sysdba"
    SQL*Plus: Release 8.1.7.0.0 - Production on Sun Jan 4 19:00:26 2009
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - 64bit Production
    SQL> select last_analyzed from dba_indexes where owner='PIN' and index_name='I_EVENT_SESSION_OBJ_ID0';
    LAST_ANAL
    SQL> show parameter optimizer_mode
    NAME TYPE VALUE
    optimizer_mode string CHOOSE
    Thanks
    Prakash
    Edited by: user612485 on Jan 4, 2009 5:34 AM

    It should be possible to add the "compute statistics" clause to the create index statement so that statistics do not need to be collected on the entire object (table and indexes) immediately after adding a new index. However, if you fail to generate statistics for the new index you may find that the index is not used where you expect it to be.
    HTH -- Mark D Powell --

  • Update statistics error in prod

    Dear Experts ,
    we are facing an error while updating statistics by using db13
    please check on log below
    18.05.2011     18:52:41     Job started
    18.05.2011     18:52:41     Step 001 started (program RSDBAJOB, variant &0000000000047, user ID BASIS)
    18.05.2011     18:52:42     No application server found on database host - rsh/gateway will be used
    18.05.2011     18:52:42     Execute logical command BRCONNECT On host PRDHOSR
    18.05.2011     18:52:42     Parameters: -u / -jid STATS20110518185240 -c -f stats -t ALL
    18.05.2011     18:53:34     BR0801I BRCONNECT 7.00 (40)
    18.05.2011     18:53:34     BR1304W Checking SAP license failed at location BrLicCheck-108
    18.05.2011     18:53:34     BR0602W No valid SAP license found - please contact SAP
    18.05.2011     18:53:34     BR0805I Start of BRCONNECT processing: cefxifuy.sta 2011-05-18 18.52.44
    18.05.2011     18:53:34     BR0484I BRCONNECT log file: /oracle/PRD/sapcheck/cefxifuy.sta
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.52.53
    18.05.2011     18:53:34     BR0813I Schema owners found in database PRD: SAPSR3*, SAPSR3DB%
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.05
    18.05.2011     18:53:34     BR0814I Number of tables/partitions in schema of owner SAPSR3: 32818/10
    18.05.2011     18:53:34     BR0836I Number of info cube tables found for owner SAPSR3: 143
    18.05.2011     18:53:34     BR0814I Number of tables in schema of owner SAPSR3DB: 722
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.24
    18.05.2011     18:53:34     BR0815I Number of indexes/partitions in schema ofowner SAPSR3: 43208/13
    18.05.2011     18:53:34     BR0815I Number of indexes in schema of owner SAPSR3DB: 1051
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.29
    18.05.2011     18:53:34     BR0818I Number of tables found in DBSTATC for owner SAPSR3: 814
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.29
    18.05.2011     18:53:34     BR0807I Name of database instance: PRD
    18.05.2011     18:53:34     BR0808I BRCONNECT action ID: cefxifuy
    18.05.2011     18:53:34     BR0809I BRCONNECT function ID: sta
    18.05.2011     18:53:34     BR0810I BRCONNECT function: stats
    18.05.2011     18:53:34     BR0812I Database objects for processing: ALL
    18.05.2011     18:53:34     BR0851I Number of tables with missing statistics:0
    18.05.2011     18:53:34     BR0852I Number of tables to delete statistics: 0
    18.05.2011     18:53:34     BR0854I Number of tables to collect statistics without checking: 0
    18.05.2011     18:53:34     BR0855I Number of indexes with missing statistics: 0
    18.05.2011     18:53:34     BR0856I Number of indexes to delete statistics: 0
    18.05.2011     18:53:34     BR0857I Number of indexes to collect statistics: 0
    18.05.2011     18:53:34     BR0853I Number of tables to check (and collect ifneeded) statistics: 33537
    18.05.2011     18:53:34     BR0126I Unattended mode active - no operator confirmation required
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.31
    18.05.2011     18:53:34     BR0817I Number of monitored/modified tables in schema of owner SAPSR3: 32818/1055
    18.05.2011     18:53:34     BR0817I Number of monitored/modified tables in schema of owner SAPSR3DB: 722/8
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.33
    18.05.2011     18:53:34     BR0301E SQL error -2132 at location thr_db_connect-3, SQL statement:
    18.05.2011     18:53:34     'ENABLE THREADS'
    18.05.2011     18:53:34     SQL-02132: Message 2132 not found; No message file for product=precomp, facility
    18.05.2011     18:53:34     BR0310E Connect to database instance PRD failed
    18.05.2011     18:53:34     
    18.05.2011     18:53:34     BR0806I End of BRCONNECT processing: cefxifuy.sta2011-05-18 18.53.33
    18.05.2011     18:53:34     BR0280I BRCONNECT time stamp: 2011-05-18 18.53.34
    18.05.2011     18:53:34     BR0804I BRCONNECT terminated with errors
    18.05.2011     18:53:34     External program terminated with exit code 5
    18.05.2011     18:53:34     BRCONNECT returned error status E
    18.05.2011     18:53:34     Job finished
    please help to solve this error in production
    Regards

    Dear Experts ,
    now i got an error
    because of oracle client update statistics are failed now i required to upgrade oracle client
    please share your valiable knoledge how can i upgrade my oracle client 10.2.0.2 to 10.2.0.4, i checked note 819829 now i need your suggesitions on this activity
    and also pre - requsits to upgrade (steps)
    Regards

  • Missing Index for /BI0/A*

    My system has missing Indexes for
    /BI0/ABP_ID40-0
    /BI0/ABP_REL40-0
    /BI0/AFORM_DS140-0
    /BI0/AGN_CONV40-0
    /BI0/APERS_BOD40-0
    /BI0/APERS_VAR40-0
    /BI0/APERS_WTE40-0
    /BI0/ATCA_DS0140-0
    /BI0/ATCA_DS0240-0
    /BI0/ATCA_DS0340-0
    /BI0/ATCA_DS0440-0
    /BI0/ATCA_DS0540-0
    /BIC/AEFIO99AT40-0
    I ran a a program SAP_INFOCUBE_INDEXES_REPAIR which fixed my secondary Indexes. But the primary indexes doesn't work.
    What can I do to resolve this issue
    Regards
    Naziem Mahomed

    Hi,
    these looks like active tables of ODS/DSOs...
    You position you cursor on the missing object in DB02 and hit the create in DB button; better choose in background.
    Note that they will remain showing missing in DB02 until statistics are refreshed...
    After the background jobs are completed hit the dsplay definition button; you will be lead to the SE14 screen for this IDX; it should say that the index exists in the DB;
    Tomorrow your DB02 screen should be updated...
    hope this helps...
    Olivier.

  • DB Statistics & BI Indexes

    Hi All,
    I have been going through a lot of threads related to DB Statistics & BI Indexes and I am confused.
    1) How do I come to know that the DB Statistics and BI Indexes for a cube are active or created?
        Is it through RSDDSTAT where the status is X means stats are active? Is there another way to find out?
        What about BI Indexes?
    2) How do I create DB Statistics?
    3) Does creatting DB statistics for query help the query performance or creating DB statistics on cube helps the Query performance or is it both?
    4) I understand primary indexes are created while creating the cube.However, when we try to create secondary indexes through performance tab in which table the details are stored? Can it be deleted later?
    5) Is there another way to create BI Indexes other than performance tab?

    P.S: the formatting went nuts... I added *** before each of my replies... COME ON SAP!! Cant you fix this???
    Hi.
    1) How do I come to know that the DB Statistics and BI Indexes for a cube are active or created?
    Is it through RSDDSTAT where the status is X means stats are active? Is there another way to find out?
    What about BI Indexes?
    In addition to the performance tab where you got the traffic lights, you can check the indexes through tcode SE11. Just input the table name and on the next sceen click the button reading "Indexes...". A popup will show you the indexes that exist for the table you are looking at. Doubleclicking any of the indexes will take you to the details.
    You can also define a new, secondary index here. You might have to go to DB02->missing indexes to have it created on the database, even though it says it exists and is active in se11... get your basis guy in on all of this.
    2) How do I create DB Statistics?
    Through Performance tab or step in process chain, but you should schedule db stats at least once a week in that DB-maintenance-calendar-thingy you can get to with a tcode I cannot remember... DBxx where xx is two numbers...ask your basis guy.
    3) Does creatting DB statistics for query help the query performance or creating DB statistics on cube helps the Query performance or is it both?
    You cannot create statistics for a query. You can collect statistics about the query use. This is the statistics stuff you can activate from bct; the "statistics-cubes" and all that. They store the info you collect and this is then called BI Statistics. It is of absolutely no use whatsoever with regards to performance. You can learn a lot about your system by analysing this, but starting to collect the BI Statistics wont help your slow running queries.
    You can create statistics for cubes. This is the DB Stats and the effect of creating it is that the system will know how the data is distributed in the cube and because of that, it will have a better chance of reading data according to your selections faster. Much faster in some cases! This goes for both queries and loads (a load is just a special kind of query, where results are not put on the screen but in another table). Try to keep your DB Stats as up to date as you can - I always update the stats after each load and compression... It is especially important on transactional cubes, because data is more volatile here than when you only load every second day or so.
    4) I understand primary indexes are created while creating the cube.However, when we try to create secondary indexes through performance tab in which table the details are stored? Can it be deleted later?
    I dont know the tables this is stored in, but you can delete any index using SE11as mentioned above. Secondary indexes will need to be re-defined in SE11 when your system has been taken down... or if you activate the cube. In that case, only the hardwired primary indexes are created.
    5) Is there another way to create BI Indexes other than performance tab?
    I think you can only create/define an index in SE11, but you can refresh it from the Performance tab or in a process chain.
    Regards,
    Jacob
    Edited by: Jacob Jansen on Aug 10, 2010 9:56 PM

  • DB statistic missing & Missing index for critical tables  after TDM refresh

    Hello SAP expert,
    We have completed our refresh using TDM, but after the refresh we encounter problem at the receiver system,
    Issue Encounter
    1. System too slow
    2. When running tcode it resulted to time_out dump
    3. Db statistics are missing
    4. missing index for critical tables
    Appreciate your help. How can we check tdm log if the data transfer really transferred or completed succesfuly.
    Thanks

    Thanks for your reply.
    We are looking the possible root cause of the issue, everything is fine in the target system before the refresh even the DB statistics update job is working fine before the refresh.
    is there a way we could find logs or report from tdms server if there something happen during the execution of the tdm jobs or data selection and transfer. as we only find logs of the latest run. let say we execute the data transfer 4 times where we could find a report or logs stating the error or execution logs from the 2nd or on 3rd run?
    thanks

  • MC-q report is not updating the missing Sales Orders, Deliveries andInvoice

    Hi Friends,
    Before setting the configuration of MC-q report I have created some Sales orders, deliveries and Invoices
    But I want to update the missing above documents  in MC-q report sales report.
    Could you please suggest me how can I update all the missing details in MC-q report report (Sales Orders, Deliveries and Invoices)
    Thank you for your support
    Best Regards
    Amjathpasha

    Hello Amjathpasha,
    You will need to perform a rebuild of statistics with transactions OLI7, OLI8, OLI9.
    I hope this helps.
    Best regards,
    Ian Kehoe

  • IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan

    Hi Experts,
    IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan for Daily/weekly??
    Vinai Kumar Gandla

    Hi Vikki,
    Many systems rely solely on SQL Server to update statistics automatically(AUTO UPDATE STATISTICS enabled), however, based on my research, large tables, tables with uneven data distributions, tables with ever-increasing keys and tables that have significant
    changes in distribution often require manual statistics updates as the following explanation.
    1.If a table is very big, then waiting for 20% of rows to change before SQL Server automatically updates the statistics could mean that millions of rows are modified, added or removed before it happens. Depending on the workload patterns and the data,
    this could mean the optimizer is choosing a substandard execution plans long before SQL Server reaches the threshold where it invalidates statistics for a table and starts to update them automatically. In such cases, you might consider updating statistics
    manually for those tables on a defined schedule (while leaving AUTO UPDATE STATISTICS enabled so that SQL Server continues to maintain statistics for other tables).
    2.In cases where you know data distribution in a column is "skewed", it may be necessary to update statistics manually with a full sample, or create a set of filtered statistics in order to generate query plans of good quality. Remember,
    however, that sampling with FULLSCAN can be costly for larger tables, and must be done so as not to affect production performance.
    3.It is quite common to see an ascending key, such as an IDENTITY or date/time data types, used as the leading column in an index. In such cases, the statistic for the key rarely matches the actual data, unless we update the Statistic manually after
    every insert.
    So in the case above, we could perform manual statistics updates by
    creating a maintenance plan that will run the UPDATE STATISTICS command, and update statistics on a regular schedule. For more information about the process, please refer to the article:
    https://www.simple-talk.com/sql/performance/managing-sql-server-statistics/
    Regards,
    Michelle Li

  • Missing Indexes in Database

    Hi,
    In tcode DB02, when seeing database statistics, i found that there were some missing indexes in database. ie., for some tables there are no indexes created.
    Please tell me whether we need to create indexes or not. Is there any serious effect of a table not having any index?
    Please suggest me a good solution for this.
    Thanks,
    Sailesh K

    Not necessarily.  You must decide if an index will assist in making a table scan faster. FULL table scans indicate that an index is not available.  Creating an index in this case, will improve preformance and prevent full table scans from occuring.
    Also, check oracle to see if the index exists.  Somestimes the Data Dictionary is unaware of the index due to how it ws created.
    In summary missing indexes are not a problem.  FULL table scans are problems and require new indexes to be created for performance reasons.
    Hope this helps.

  • Generated index is missing indexed items

    Working with book and separate chapter for index. Index generates but is missing index entries. Is it something I'm doing or an InDesign problem?

    Thanks for input. All available updates have been applied. Long telcon with India so far has produced no cure but at last they are 'escalating' problem to find a solution. It seems to only happen in the 'Symbols' heading (non-alphabetic entries) of the index. Not only are items missing but reference page numbers are missing and/or scrambled. Looks like several indexed subjects are loosing page references and/or picking up page references from following index lines. If you can read the image attached you'll see what I'm talking about if you compare the index flyout lines with what shows up in the generated index. Quite a time consuming pain. It took me almost an hour on the phone to get India to the point they wanted to see this.

  • Missing indexes found in DB02

    Respected All,
    We found a huge number of missing indexes(primary and secondary both) in DB02.Is there any way to rebuilt or produce all these missing indexes in a mass or in a single step?? Thanks in advance for your supports

    Dear,
    You can create indexes as per your requirement. You can create by BRTOOLS as well as from SE14 t-code. After creating index you have to run Update statastics job.
    Regards,
    Charanjit

  • Missing indexes in db02

    Hello,
    Checking DB02 i've found a list of missing primary indexes. I know that i can use SE14 to adjust the indexes but i found some decumentation that says that i should first check if double index for the primary index exist and elimenate them.
    Please Advice.
    David.

    hi David,
    oss note 157918
    BW: DB02 shows "missing indexes"  
    Symptom
    DB02 shows indexes of a fact table to be missing. Such indexes have names that start with prefixes /BI0/F or /BIC/F (BW 1.2, BW 2.x) or /BI0/E or /BIC/E (BW 2.x only).
    Additional key words
    Business Information Warehouse, InfoCube, Fact Table, Bitmap Indexes, Oracle, DB02, Unique Index
    Cause and prerequisites
    For BW 1.2, this only applies to Oracle-based systems. For BW 2.x, this might apply to any DB-platform.
    BW 1.2 and BW 2.x take advantage of certain DB-specific features which are not supported by the data dictionary of R/3 4.0, 4.5 or 4.6 base systems. Prominent examples are bitmap indexes on fact tables (Oracle-based BW systems), partitioned/fragmented indexes, nologging and parallel index building facilities etc. Such features are used in BW by triggering native SQL statements which bypass the data dictionary.
    While all these features improve performance of the BW system, there are, however, some other transactions that are also affected when the data dictionary is bypassed. Amongst these is DB02. It sometimes claims that certain indexes of infocube fact tables are missing while direct checks on the database level show that those indexes are not missing at all or substituted by equivalent indexes. The latter might happen in BW 2.x where the primary index on fact tables might be replaced by a non-unique index or simply skipped as it is not required. Therefore you can usually ignore those messages. Obviously, we are currently working on removing such inconsistent information. If you want to be sure on the indexing then check the solution section of this note.
    Solution
    For BW 1.2A systems (Oracle only):
    You have to ask your local DBA to check the state of the indexes directly by looking at the USER_INDEXES table on the Oracle database.
    For BW 1.2B systems (Oracle only):
    There are two alternatives to check the secondary indexes of infocube and aggregate cubes fact tables:
               (1) Go to the Admin Workbench. Go to the infocube. Click the right mouse button and choose "InfoCube Performance". This leads you to a screen that shows the state of those indexes via traffic light semantics. There are also buttons to repair inconsitent states of the indexes.
               (2) Use transaction RSRV. Go to the tabstrip "Database". Choose the item "Indices of an InfoCube and its aggregates" and insert the (technical) infocube name (e.g. 0BWTC_C01) in the input box at the bottom of the screen. Press F8 ("Analysis") and wait until a red, yellow or green light appears beside "Indices of an InfoCube and its aggregates", i.e. in the "Result" column. Then press F6 ("Results") in order to see a detailed report on the index situation of that cube.
               (3) Go to SE37 and do a "single test" for the function module RSDU_CHECK_SECONDARY_INDEXES. Use the infocube's technical name (e.g. 0BWTC_C01) as the input parameter and 'X' for both, the I_COMPLETE_CHECK and I_WITH_AGGREGATES, parameters. Press F8 to run the module. Only the C_T_INDEX output parameter is relevant. It shows a list of indexes. Check the TYPE and STATUS columns. These should show 'BITMAP' and 'VALID' respectively.
    For BW 2.0A systems (all DB-platforms):
    For checking secondary indexes on individual infocubes the following methods can be applied, similar to the BW 1.2B solution:
               (1) Go to the Admin Workbench. Go to the infocube. Click the right mouse button and choose "Manage". Choose the tabstrip "Performance". This leads you to a screen that shows the state of those indexes via traffic light semantics. There are also buttons to repair inconsitent states of the (secondary) indexes.
               (2) same as (2) for BW 1.2B.
               (3) Go to SE37 and do a "single test" for the function module RSDU_INFOCUBE_INDEXES_CHECK. Use the infocube's technical name (e.g. 0BWTC_C01) as the input parameter, leave the I_FACTTAB initial, use 'X' for both, the I_COMPLETE_CHECK and I_WITH_AGGREGATES, parameters and use 'U' in the I_DOUBLE_FACTTAB parameter. Press F8 to run the module. Only the C_T_INDEX output parameter is relevant. It shows a list of indexes. Check the TYPE_CHECK, UNIQUE_CHECK, PARTITIONED_CHECK and STATUS_CHECK columns. These should show 'G' (= "green" = ok) respectively.
    If your BW 2.0A system is on patch level 11 Make DB02 consistent by running the report SAP_UPDATE_DBDIFF (via SE38), go to DB02 and press the "Refresh" button in order to synchronise the information in DB02 with the DBDIFF table. This should provide you with a consistent view.
    For BW 2.0B and BW 2.1C systems (all DB-platforms):
    DB02 should work consistently in BW 2.0B / BW 2.1C  with infocubes created in 2.0B / BW 2.1C. If you wish, you can still use the BW 2.0A approach. For infocubes that were created in BW 2.0A or BW 1.2 you need to adjust the index setup (on the facttables) by running the report SAP_INFOCUBE_INDEXES_REPAIR. The latter is available from BW 2.0B patch 3 onwards. It should be run in a background process as it might take a while to run through.
    You also might want to run the report SAP_UPDATE_DBDIFF once in order to update the table DBDIFF that lists database objects whose data dictionary setting do not correspond to the actual setup and that should therefore be omitted in DB02 checks.
    Source code corrections

  • Missing Index in DB02

    Hi,
    When I go to DB02->Diagnostics->Missing Tables and Indexes in our ECC6 system.
    I see some missing primary and secondry indexes there.I also see option " Create on Db" there.
    Please suggest should I create such indexes by option "Create in Db" and also suggest how SAP find out such missing indexes in Database,,, Does CheckkDB or Update stats provide this information to SAP.
    Please confirm.
    Regards,
    Shivam

    >
    Shivam Mittal wrote:
    > Hi,
    >
    > When I go to DB02->Diagnostics->Missing Tables and Indexes in our ECC6 system.
    >
    > I see some missing primary and secondry indexes there.I also see option " Create on Db" there.
    >
    > Please suggest should I create such indexes by option "Create in Db" and also suggest how SAP find out such missing indexes in Database,,, Does CheckkDB or Update stats provide this information to SAP.
    >
    > Please confirm.
    >
    > Regards,
    >
    > Shivam
    Yes you can create them on DB.
    SAP doesnt find out that information until and unless then login into ur system through saprouter.
    Regards,
    Nirmal.K

  • SQL 2008 R2 Best Practices for Updating Statistics for a 1.5 TB VLDB

    We currently have a ~1.5 TB VLDB (SQL 2008 R2) that services both OLTP and DSS workloads pretty much on a 24x7x365 basis. For many years we have been updating statistics (full scan- 100% sample size) for this VLDB once a week on the weekend, which
    is currently taking up to 30 hours to complete.
    Somewhat recently we have been experiencing intermitent issues while statistics are being updated, which I doubt is just a coincidence. I'd like to understand exactly why the process of updating statistics can cause these issues (timeouts/errors). My theory
    is that the optimizer is forced to choose an inferior execution plan while the needed statistics are in "limbo" (stuck between the "old" and the "new"), but that is again just a theory. I'm somewhat surprised that the "old" statistics couldn't continue to
    get used while the new/current statistics are being generated (like the process for rebuilding indexes online), but I don't know all the facts behind this mechanism yet so that may not even apply here.
    I understand that we have the option of reducing the sample percentage/size for updating statistics, which is currently set at 100% (full scan).  Reducing the sample percentage/size for updating statistics will reduce the total processing time, but
    it's also my understanding that doing so will leave the optimizer with less than optimal statistics for choosing the best execution plans. This seems to be a classic case of not being able to have one’s cake and eat it too.
    So in a nutshell I'm looking to fully understand why the process of updating statistics can cause access issues and I'm also looking for best practices in general for updating statistics of such a VLDB. Thanks in advance.
    Bill Thacker

    I'm with you. Yikes is exactly right with regard to suspending all index optimizations for so long. I'll probably start a separate forum thread about that in the near future, but for now lets stick to the best practices for updating statistics.
    I'm a little disappointed that multiple people haven't already chimed in about this and offered up some viable solutions. Like I said previously, I can't be the first person in need of such a thing. This database has 552 tables with a whole lot more statistics
    objects than that associated with those tables. The metadata has to be there for determining which statistics objects can go (not utilized much if at all so delete them- also produce an actual script to delete the useless ones identified) and what
    the proper sample percentage/size should be for updating the remaining, utilized statistics (again, also produce a script that can be used for executing the appropriate update statistics commands for each table based on cardinality).
    The above solution would be much more ideal IMO than just issuing a single update statistics command that samples the same percentage/size for every table (e.g. 10%). That's what we're doing today at 100% (full scan).
    Come on SQL Server Community. Show me some love :)
    Bill Thacker

Maybe you are looking for