Improving your queries
458
•
QUERY_TIMING
This option controls the collection of timing statistics
on subqueries and some other repetitive functions in the query engine.
Normally it should be
OFF
because for very short correlated subqueries
the cost of timing every subquery execution can be very expensive in
terms of performance.
Setting query optimization options
By adjusting the following options you can influence the speed at which
queries are processed.
•
AGGREGATION_ALGORITHM_PREFERENCE
Controls the choice of
algorithms for processing an aggregate (
GROUP BY
,
DISTINCT
,
SET
functions). This option is designed primarily for internal use; do not use it
unless you are an experienced database administrator. See the Adaptive
Server IQ Reference Manual for details.
•
AGGREGATION_CUTOFF
Specifies at which precision level to use a
more efficient internal storage type for
SUM
or
AVG
calculations. The
default is 10. The internal storage type is slower, but avoids risking
overflows.
•
INDEX_PREFERENCE
Sets the index to use for query processing. The
Adaptive Server IQ optimizer normally chooses the best index available to
process local
WHERE
clause predicates and other operations which can be
done within an IQ index. This option is used to override the optimizer
choice for testing purposes; under most circumstances it should not be
changed.
•
JOIN_ALGORITHM_PREFERENCE
Controls the choice of algorithms
when processing joins. This option is designed primarily for internal use;
do not use it unless you are an experienced database administrator. See the
Adaptive Server IQ Reference Manual for details.
•
JOIN_OPTIMIZATION
When this option is
ON
(the default), Adaptive
Server IQ optimizes the join order to reduce the size of intermediate results
and sorts and to balance the system load. When it is
OFF
, the join order is
determined by the order of the tables in the
FROM
clause of the
SELECT
statement. (The left-most table becomes the outer table of the topmost
join.) This option should be
ON
whenever queries are ad hoc and untried,
when you don't know optimum join order for a multi-table join query, or
when you cannot alter queries.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...