does update statistic table (UPDATE STATISTICS Sales.SalesOrderDetail) updates system generate statistics (_WA_sys_xxx)?
Yes.
You can use the "ALL" directive if you like - but I would only bother if I needed to indicate to future maintainers of the code that that was explicity what I meant. A comment would do just fine
Hi Kristen,
Apart from that, in mssql 2014, we can create clustered column stored index; and in there (CCI) it will have A Statistic covering all column. if that the case, should we/system create additional statistic?
Not using 2014 as yet, so don't know the answer.
how about i take it in this way,
create table test(col1 int, col2 int)
create clustered index idx_test on test(col1, col2)
should i still need to do the following?
create statistics ustat_col1 on test(col1)
create statistics ustat_col2 on test(col2)
and if col1 and col2 is the joining key to another table, should the statistic created as a combined statistic or individual; If is a combined statistic does the column ordering in the statistic (assuming same with columns ordering in index) will affect the execution plan?