For that reason, having accurate and up-to-date statistics is crucial.
One is via the sp_updatestats system stored procedure. While the sp_updatestats procedure is an easier way to program the command, the UPDATE STATISTICS command is much more flexible and much more powerful.The prefered method for updating SQL Server statistics is the UPDATE STATISTICS command.This command allows much greater flexibility when programming, however it does require more initial programming.They are the FULLSCAN, SAMPLE (PERCENT, ROWS), RESAMPLE, ALL | COLUMNS | INDEX, and NORECOMPUTE options. The FULLSCAN performs a full scan of the index or column in question and uses all values in the column when generating the statistic.The SAMPLE option allows you to recommend the percentage of rows or the number of rows to use as the sample when generating the statistic.
Even worse, it would perform a table scan instead of any index operation at all.