Thanks a lot Anand. That worked !!!
I was wondering, why it did not improve the value of datachange() function even after running update stats successfully. The value still looks very unhealthy.
1> set quoted_identifier on
2> go
1> update index statistics SAPSR3."/BI0/F0SMD_PE2H" with sampling = 2 percent
2> go
1> select datachange ('S30.SAPSR3./BI0/F0SMD_PE2H',null,null)
2> go
---------------------------
48377.814731
(1 row affected)
1> update all statistics SAPSR3."/BI0/F0SMD_PE2H" with sampling = 2 percent
2> go
1> select datachange ('S30.SAPSR3./BI0/F0SMD_PE2H',null,null)
2> go
---------------------------
50181.052529
1> sp_recompile 'S30.SAPSR3./BI0/F0SMD_PE2H'
2> go
Each stored procedure and trigger that uses table 'S30.SAPSR3./BI0/F0SMD_PE2H' will be recompiled the next time it is executed.
(return status = 0)
1> select datachange ('S30.SAPSR3./BI0/F0SMD_PE2H',null,null)
2> go
---------------------------
50181.052529
(1 row affected)
Any idea about this?