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

SQL Anywhere 11.0.1 » UltraLite - .NET Programming » UltraLite .NET 2.0 API reference » ULConnectionStringBuilder class


OrderedTableScans property

Specifies whether SQL queries without ORDER BY clauses should perform ordered table scans by default.

Visual Basic
Public Property OrderedTableScans As String
public string  OrderedTableScans { get; set; }
Property value

A boolean string specifying whether to use ordered table scans or not. For example, true/false, yes/no, 1/0, and so on. The default value is a null reference (Nothing in Visual Basic).


As of release 10.0.1, when using dynamic SQL in UltraLite, if order is not important for executing a query, UltraLite will access the rows directly from the database pages rather than using the primary key index. This improves performance of fetching rows. To use this optimization, the query must be read only and must scan all the rows.

When rows are expected in a specific order, an ORDER BY statement should be included as part of the SQL query. However, it's possible that some applications have come to rely on the behavior that defaults to returning rows in the primary key order. In this case, users should set the OrderedTableScans parameter to 1 (true, yes, on) to revert to the old behavior when iterating over a table.

When OrderedTableScans is set to 1 (true, yes, on) and the user does not specify an ORDER BY clause or if a query would not benefit from an index, UltraLite will default to using the primary key.

See also