Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2017
    Posts
    1

    Unanswered: Sybase ASE maintenance - update stats or reorg rebuild

    Hello ,

    I am new to Sybase (previous oracle dba experience).

    I have inherited, some maintenance scripts, which take hours to run = 12 hours (85GB database), I have looked at the scripts and there appears to be duplication in what they are doing
    ie
    script 1
    update index statistics acct_class
    update index statistics acct_class_type

    script 2
    reorg rebuild acct_class acct_class_prim
    reorg rebuild acct_class acct_class_sec
    reorg rebuild acct_class acct_class_slct
    reorg rebuild acct_class_type acct_class_type_prim
    reorg rebuild acct_class_type acct_class_type_sec
    reorg rebuild acct_class_type acct_class_type_slct

    my question is .... if I am (reading the manuals correctly), If I 'reorg rebuild' a table and its index, then an update statistics is not required

    is this correct?

  2. #2
    Join Date
    Oct 2016
    Posts
    13
    I go for script 2 since reorg rebuild script will also do updating statistics for the leading index column. there's no point of running update index stats on top of reorg rebuild unless you want to have all subset columns to have statistics you will have to run UPDATE ALL STATISTICS <tablename>.

    just my thoughts

  3. #3
    Join Date
    Jan 2012
    Location
    Lisbon
    Posts
    119
    Provided Answers: 1
    Hi,

    12 hours for a 85GB db?
    Even if the used space is like 80GB, should not take so long... What are you server settings?

    Make it parallel runs, 2 or 3 reorgs simultaneously.

    As per leaving the update stats or no, you can leave it, I would do it after the reorg, potentially be faster after the reorg. And like bokswager said you updating indexes will make all the columns of the index be fresh, as opposed to the reorg rebuild table which will update the leading column of your index...
    Depends of how your indexes are created, lots of columns or not.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •