
> select max(foo) from bar where x = 'y';
> 
> How is the index used in this query?

Informix would use an index created on (x, foo) and I guess others too.

But I too usually find the "select first 1 * from y order by x desc" much more 
useful than an optimized max, since it can also return other columns from that row
(And is more performant than an optimally optimized subselect for this).

Andreas

Wed, 13 Mar 2002 22:39:49 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: select max(column) not using index