optional_sample_flag, if included, is SAMPLE
This optional flag has an effect only in the case where the set_expression contains multiple nested CROSSJOIN expressions. In such cases, by default, the system does not attempt to determine the subset until set_expression has been fully evaluated and all the set elements are known. If you include the optional_sample_flag, the system truncates the results as each CROSSJOIN is evaluated; this approach can be considerably faster but can result in a subset that contains fewer elements than given by the optional_integer_expression.
Note that when you use drag and drop actions in the Analyzer to create queries that use the HEAD function for a set that contains multiple nested CROSSJOIN expressions, the Analyzer automatically adds this flag.