Performance of Sort-Based Operators in View Models

Several operators must sort their inputs. These include Order By, Join (only when using the Sort Merge algorithm), Group By, and Intersection, as well as any operator that uses the Distinct option to eliminate duplicate rows.

WorkSpace Data Federation uses an O(n log n) algorithm to perform all its sorting operations. This algorithm writes temporary data to disk if the result set to be sorted is too large to fit into memory; thus it scales to accommodate arbitrarily large result sets.

When operators in your model sort their data, WorkSpace remembers which columns the data was sorted by and passes that information along to downstream operators in the view model. Consequently, operators that need sorted data don’t have to re-sort data unnecessarily. This feature can dramatically increase the performance of WorkSpace-generated data services.

Two factors that can affect sort performance are sort chunk size and disk space for temporary sort files.

Note: This information is for advanced users who want to improve the performance of data services deployed from view models. Most users do not need to adjust the parameters that control sort chunk size and the location of temporary sort files.
Related concepts
Operators in View Models
Access to Columns from Incoming Result Sets
Access to Global Parameters
Variables in Expressions
Related tasks
Using Expressions and Control Variables in Operators
Setting Group By Properties
Setting Intersection Properties
Setting Join Properties
Setting Order By Properties
Setting Projection Properties
Setting Union Properties

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com