Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 688137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:11:56+00:00 2026-05-14T02:11:56+00:00

I am writing some new SQL queries and want to check the query plans

  • 0

I am writing some new SQL queries and want to check the query plans that the Oracle query optimiser would come up with in production.

My development database doesn’t have anything like the data volumes of the production database.

How can I export database statistics from a production database and re-import them into a development database? I don’t have access to the production database, so I can’t simply generate explain plans on production without going through a third party hosting organisation. This is painful. So I want a local database which is in some way representative of production on which I can try out different things.

Also, this is for a legacy application. I’d like to “improve” the schema, by adding appropriate indexes. constraints, etc.

I need to do this in my development database first, before rolling out to test and production.

If I add an index and re-generate statistics in development, then the statistics will be generated around the development data volumes, which makes it difficult to assess the impact my changes on production.

Does anyone have any tips on how to deal with this? Or is it just a case of fixing unexpected behaviour once we’ve discovered it on production? I do have a staging database with production volumes, but again I have to go through a third party to run queries against this, which is painful. So I’m looking for ways to cut out the middle man as much as possible.

All this is using Oracle 9i.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:11:56+00:00Added an answer on May 14, 2026 at 2:11 am

    See the documentation for the DBMS_STATS.EXPORT_SCHEMA_STATS and DBMS_STATS.IMPORT_SCHEMA_STATS packages. You’ll have to have someone with the necessary privileges do the export in the production database for you if you don’t have access. If your development hardware is significantly different than your production hardware, you should also export/import the system statistics with the EXPORT/IMPORT_SYSTEM_STATS procedures.

    Remember to turn off any jobs in the development database that recalculate statistics after you do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a SQL query that I would like to add a column
I am writing some new code that will throw a custom exception - I
I'm new to linq and having trouble writing two simple queries. For some reason,
I could use some help writing a SQL query. I'm trying to display some
I'm writing a new project in C# with a number of SQL queries in
I am new to object oriented programming and writing some of my first classes
I am new to Python, and I'm working on writing some database code using
I am fairly new to writing code, but I played around with some chrome
I'm new to web programming, so I need some help. I am writing a
Writing some test scripts in IronPython, I want to verify whether a window is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.