Queries that use both min and max

If you have max and min aggregates that can be optimized, you should get much better performance by putting them in separate queries. For example, even if there is an index with price as the leading key, this query results in a full leaf-level scan of the index:

select max(price), min(price) 
    from titles

When you separate them, Adaptive Server uses the index once for each of the two queries, rather than scanning the entire leaf level. This example shows two queries:

select max(price) 
    from titles
select min(price) 
    from titles