The SCALAR
AGGREGATE
operator keeps track of running information
about an input data stream, such as the number of rows in the stream,
or the maximum value of a given column in the stream.
The SCALAR AGGREGATE
operator
prints a list of up to 10 messages describing the scalar aggregation
operations it executes. The message has the following format:
Evaluate Ungrouped <Type of Aggregate> Aggregate
<Type of Aggregate>
can
be any of the following: count, sum, average, min, max, any, once-unique, count-unique, sum-unique, average-unique,
or once.
The following query performs a SCALAR
AGGREGATE
(that is, unwrapped) aggregation
on the authors table in the pubs2 database:
select count(*) from authors QUERY PLAN FOR STATEMENT 1 (at line 1). STEP 1 The type of query is SELECT. 2 operator(s) under root ROOT:EMIT Operator (VA = 2) |SCALAR AGGREGATE Operator (VA = 1) | Evaluate Ungrouped COUNT AGGREGATE. | | |SCAN Operator (VA =0) | | FROM TABLE | | authors | | Index : aunmind | | Forward Scan. | | Positioning at index start. | | Index contains all needed columns. Base table will not be read. | | Using I/O Size 4 Kbytes for index leaf pages. | | With LRU Buffer Replacement Strategy for index leaf pages.
The SCALAR AGGREGATE
message
indicates that the query to be executed is an ungrouped count aggregation.