What does sp_configure "update statistics hashing" do? (ASE 16)

For ASE 16, I don't have this config option set, but I can still run update statistics with a explicit "with hashing" clause.

The docs for this just say "enables SAP ASE to gather hash-based statistics"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 04, 2017 at 04:04 PM

    Documentation needs some work ...

    By default ASE does not use hashing when running update (index) statistics.

    update statistics hashing allows the DBA to decide if hashing is used by default for all update (index) statistics commands that do not explicitly state a hashing option.

    You can see this behavior by running a series of tests with different config settings and update (index) statistics commands, and searching optdiag output for indications of hashing use.

    NOTE: Make sure you run delete statistics before each test to insure you're starting with a clean slate.

    NOTE: Not sure if there's another way to verify use of hashing other than watching for tempdb usage for non-hashed operations.

    NOTE: Explicitly providing a hashing option for update (index) statistics also sets some sticky attributes for column stats ... this doesn't seem to be the case (in my testing) when relying on the server-wide config setting; not sure if this is by design or it was overlooked.

    Add comment
    10|10000 characters needed characters exceeded

  • May 04, 2017 at 03:15 PM

    Hi Ben

    Is it a case of syntax you used is valid and therefore allowed to run

    but the actual gathering based on hashing is silently ignored ?

    It will be interesting if we have inputs from SAP/Sybase

    on checks/tests to run before and after the update stats with hashing option to verify that it did what it claimed to do.

    Avinash

    Add comment
    10|10000 characters needed characters exceeded

    • Re: Is it a case of syntax you used is valid and therefore allowed to run but the actual gathering based on hashing is silently ignored ?

      No, as discussed above, the "update statistics hashing" config parameter just controls the default behavior (of whether to use hashing for update stats commands). If you explicitly specify a "with hashing" option, it is used.

Skip to Content