Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

ESTIMATE function [Miscellaneous] Next Page

ESTIMATE_SOURCE function [Miscellaneous]


Provides the source for selectivity estimates used by the query optimizer.

Syntax

ESTIMATE_SOURCE(
column-name
[, value
[, relation-string ] ]
)

Parameters

column-name    The name of the column that is being investigated.

value    The value to which the column is compared. The default is NULL.

relation-string    The comparison operator used for the comparison, enclosed in single quotes. Possible values for this parameter are: =, >, <, >= , <=, <>, !=, !<, and !>. The default is =.

Remarks

If value is NULL then the relation strings '=' and '!=' are interpreted as the IS NULL and IS NOT NULL conditions, respectively.

Return value

The source of the selectivity estimate can be one of the following:

See also
Standards and compatibility
Example

The following statement returns the value Index, which means that the query optimizer probed an index to estimate the selectivity.

SELECT FIRST ESTIMATE_SOURCE( EmployeeID, 200, '>' )
FROM Employees;