pl/sql to gather statistics for a View
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: pl/sql to gather statistics for a View

  1. #1
    Join Date
    Mar 2009
    Posts
    6

    pl/sql to gather statistics for a View

    I need a pl/sql script to gather statistics from a particular view. The view takes a long time to execute.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Is it a view or a materialized view?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Mar 2009
    Posts
    6

    View

    It is a regular view.

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    A regular view is nothing but a query saved in a catalog, you don't gather performance stats on views but in base tables.

    Use DBMS_STATS package.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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



Click Here to Expand Forum to Full Width