Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746

    Unanswered: Please acknowledge/reject my assumption

    When I study the index-advices coming from db2advis it always recommend the "COLLECT SAMPLED DETAILED STATISTICS" syntax during the "CREATE INDEX". So I google to try to understand what that phrase does.
    Inferieur to Einstein as I am, I'm not sure I fully understand so I assume:

    "this option helps you when you have a problem in your housekeeping-window (runstats taking too long). As long as you do NOT suffer that problem, you do not need that"

    Did I understand or am I off target?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    When an index is created, DB2 will need statistics generated for the index to ensure that the index will be used. Using sampled stats is better than no stats at all, and since obtaining sampled stats is usually quicker (especially for large tables) that is what is produced by the adviser. And the reason is because, as you guessed, most maintenance windows are small.

    Andy

  3. #3
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    Yeah, maintenance windows are small, but I run a runstats script once every 24 hours early in the morning during up-time without problems. That should be sufficient and I do not change my "create index" syntax.

Posting Permissions

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