Ascending Keys and Auto Quick Corrected Statistics

A common problem for some SQL Server applications are cases where data typically ascends.  For example, datetime columns where the column represents a current date.  SQL Server builds statistics with the assumption that the data will by in large be similar in the future.  However, when data typically ascends, most new insertions are out of the…

4

Query Processor Modelling Extensions in SQL Server 2005 SP1

Trace flag 2301, available in SQL Server 2005 SP1, enhances the modelling ability of the query optimizer to better handle complex statements.  Improved modelling can lead to dramatically faster performing query plans in some cases.  These extensions to the query processor modelling abilities can lead to increased compile time and so should only be used by applications…

1

Disabling Constant-Constant Comparison Estimation

SQL Server 8.0 did not perform cardinality estimates based on the comparion of two constants.  Instead, SQL Server 8.0 guessed at the resulting selectivity.  The reasoning for this is that one or more of the constants may be statement parameters, which would change from one execution of the statement to the next.  However, SQL Server…

0

Make Functions Schema-bound

Create user defined functions with the SCHEMABINDING clause where possible.  In the absence of this clause, SQL Server must assume at compile time that statements using the function may bind to a function which accesses and updates data.  Note that even if the UDFs do not access data or perform any updates, the SQL Server…

0