HPlogo ALLBASE/SQL Performance and Monitoring Guidelines: HP 9000 Computer Systems > Chapter 1 Basic Concepts in ALLBASE/SQL Performance

Sorting

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Allbase/SQL uses sorting in several ways:

  • When creating an index on a table that contains data.

  • When processing a query that contains an ORDER BY, DISTINCT, UNION, or GROUP BY clause.

  • When processing a join query with the sort/merge join algorithm.

Sorting operations require both disk space and CPU time, so they often raise performance issues. Space for sorting may be required in temporary files which can be in the current group or directory or in TempSpaces you define for the purpose. You can avoid the use of temporary files at run time by creating an index on the sort key. In many cases, the index can be used to carry out the sort.

Space is also needed for the temporary storage of sort output. This space is allocated in the SYSTEM DBEFileSet, which must have enough TABLE or MIXED DBEFile space to accomodate each query result.

Performance issues in sorting are discussed in more detail in the section "Sorting Operations" in the "Guidelines on System Administration" chapter.

Feedback to webmaster