SQL Server Performance Forum – Threads Archive
worring about the performance issueHi!
I have written 2 sp which will give the db size of all db on a weekely basis.However I am worring about the performance issue.Here is the difference between the two.
sp 1)Truncating the table and inserting the dbsize weekely
sp 2)dropping -reating a new table each time and inserting dbsize weekely.
I want to exec the sp by a job step scheduled weekly.I dont want a temp tbl as I need to query the tbl created, every monday.I dont want data to be stored more than 1 week.
Now I am wondering which of this 2 will gv a better performance.Will be there any fragmentation issue of data pages if we truncate-insert again and again?
What is the size of table you’re talking here, it is very very minimal compared to return the query results. In order to update the statistics of the table after the data load, you can either run DBCC DBREINDEX on that table or UPDATE STATISTICS in order keep the upto date stats. And do not keep this table under a user database which is used frequently by other applications. Satya SKJ
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.