Welcome to Sign in | Help

Re: Estimated number of rows

  •  01-11-2008, 6:20 PM

    Re: Estimated number of rows

    Am citit articolul si am vazut ca atunci cand valoarea parametrului e cunoscuta se foloseste de histograma ca sa dea estimated number of rows. Dar cand nu e cunoscuta valoarea (cum e cazul acestui batch), iata ce face:

    Even when local variables are used in a query, an estimate that is better than a guess is used in the case of equality predicates. Selectivity for conditions of the form "@local_variable = column_name" is estimated using the average value frequency from the histogram for column_name. So, for example, if the column column_name contains all unique values, then a selectivity estimate of 1/(number of unique values in column) will be used, which is accurate.

    Cred ca asta ma lamureste, multumesc.

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems