I have lately been wondering what is best due to performance on a huge table.
- To run "Update statictics for the whole table"
This seems to cause a big demand for IOps - and therefor causing a long running task, which sometimes takes up to 1500 seconds.
or
2. To declare a cursor and "Update statictics for every index on the table".
My hope is, that this will make shorter executions - maybe 10 indexes of 1 minute - and therefore makeing it easyer for the task scheduler to prioritise other jobs while updating the statistics for the whole table
When it comes to query's I know it's usually better to have more smaller querys than bigger querys due to transaction scopes - so I was wondering if its actually the same for statistics updates ?
Have any of you seen any benefit from changing to method 2. compared to method 1. ?
Thanks in regards