Обсуждение: migrating statistics without data?

Поиск
Список
Период
Сортировка

migrating statistics without data?

От
Rob Audenaerde
Дата:

Hi all,

 

I am migrating a database with tables that contain over 5M rows. These tables are truncated and filled each day in a batch process. There are scripts that simply don’t run within 24hrs if the statistics are incorrect.

 

The current procedure is to run the process until it fails, then analyse all the tables that are filled sofar, and redo the batch. (As you can see the batch is not a transaction, but rather a set of scripts that follow each other in their own transactions.

 

My path of thought was to find a way to transfer the statistics somehow.

 

Is there a way to transfer the statistics of the old database to the new one, so we can reuse the statistics? Or is there a better alternative to achieve the same?

 

Kind regards,

 

-Rob