1

I have a new database (powers a new website) in a dev environment.

I have everything scripted out to create the DB, objects, and data in my production environment. In that DB, auto create and auto update statistics is turned on by default.

Is there any point in scripting the statistics from all of the DEV tables, or will they auto generate on their own in production?

I should have specified that I am not migrating an entire db file, but rather, I will be re-generating tables, procs, views, data, etc, in production via scripts...

  • When you restore backup of database from DEV to Prod statistics will also move. Let auto create stats be enabled on prod – Shanky Jun 6 '16 at 3:55
  • Sorry I should have specified that I am not migrating an entire db file, but rather, I will be re-generating tables, procs, views, data, etc, in production via scripts... – GWR Jun 6 '16 at 10:58
  • Any reason why you are doing this. Backup and restore would be suggested approach unless you have very good reason for what you are thinking of doing – Shanky Jun 6 '16 at 11:16
  • Good point, I will look into that approach. There is no good reason I wouldn't do it that way. It is a SQL Server instance provided by a shared hosting provider, so I was making assumptions that I wouldn't be able to do it that way, but I will check into it. – GWR Jun 6 '16 at 17:01
  • Doesn't look like I can do a restore from backup on the shared hosting instance. (confirmed again here stackoverflow.com/questions/15171124/…) SO - back to my original question... – GWR Jun 8 '16 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.