Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

How can a data table be pre-sized?

$
0
0

I am running 2008 R2 sp2 64.

I have a database with a target table whose content is calculated from other data in the system using stored procedures on saving of the source data.

I need to re-calculate all of the data due to regulatory changes.

I have a stored procedure that sequentially performs the calculations. The results are correct and error free.

To initialize the process I must delete all current data in the target table.

The re-calculation process runs very fast at first, then slows  - it takes 4-5 hours to complete. I suspect the issue is ms sql adjusting the storage. When the recalculation completes the table has 1,115,424 rows and 85.438 MB.

I note on a Top 10 Tips (in MSDN) a suggestion to pre-size data tables. I can't find any information on how to do that. I may be using the wrong terms, or what ever. I would appreciate direction on how to pre-size a table.

Thanks


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>